diff options
| author | Shlomo Hecht <shlomo@twine-s.com> | 2018-12-20 15:07:43 +0200 |
|---|---|---|
| committer | Shlomo Hecht <shlomo@twine-s.com> | 2018-12-20 15:07:43 +0200 |
| commit | 64367a944ebddc998b06eb2673928ef95ffc3627 (patch) | |
| tree | b30eff3671d388d23c10a91a82cc25a6d42d548f /Software/Visual_Studio/Tango.UnitTesting | |
| parent | 4554080793bd46fcb8f55578d2f67917584dc332 (diff) | |
| parent | d204e56c57dcf52f31c9e64222f32a678150e721 (diff) | |
| download | Tango-64367a944ebddc998b06eb2673928ef95ffc3627.tar.gz Tango-64367a944ebddc998b06eb2673928ef95ffc3627.zip | |
Merge branch 'master' of https://twinetfs.visualstudio.com/Tango/_git/Tango
Diffstat (limited to 'Software/Visual_Studio/Tango.UnitTesting')
4 files changed, 21 insertions, 19 deletions
diff --git a/Software/Visual_Studio/Tango.UnitTesting/DAL_TST.cs b/Software/Visual_Studio/Tango.UnitTesting/DAL_TST.cs index 0ea7b59ef..02862350f 100644 --- a/Software/Visual_Studio/Tango.UnitTesting/DAL_TST.cs +++ b/Software/Visual_Studio/Tango.UnitTesting/DAL_TST.cs @@ -17,24 +17,20 @@ namespace Tango.UnitTesting { String guid = Guid.NewGuid().ToString(); - using (var db = new DAL.Remote.DB.RemoteDB(SettingsManager.Default.GetOrCreate<CoreSettings>().DataSource)) - { - var action = new DAL.Remote.DB.ACTION_TYPES(); - action.CODE = 1; - action.NAME = "Action 1"; - action.DESCRIPTION = "Description 1"; - action.GUID = guid; - action.LAST_UPDATED = DateTime.UtcNow; + DataSource s = new DataSource(); + s.Type = DataSourceType.SQLServer; + s.Address = "twine.database.windows.net"; + s.Catalog = "Tango"; + s.IntegratedSecurity = false; + s.UserName = "Roy"; + s.Password = "Aa123456"; - db.ACTION_TYPES.Add(action); - db.SaveChanges(); - } - using (var db = new DAL.Remote.DB.RemoteDB(SettingsManager.Default.GetOrCreate<CoreSettings>().DataSource)) + using (var db = new DAL.Remote.DB.RemoteDB(s)) { - var action = db.ACTION_TYPES.Single(x => x.GUID == guid); - db.ACTION_TYPES.Remove(action); - db.SaveChanges(); + var events = db.EVENT_TYPES.ToList(); + var motors = db.HARDWARE_MOTOR_TYPES.ToList(); + var monitors = db.TECH_MONITORS.ToList(); } } diff --git a/Software/Visual_Studio/Tango.UnitTesting/Logging_TST.cs b/Software/Visual_Studio/Tango.UnitTesting/Logging_TST.cs index 6d95674ff..c4a697715 100644 --- a/Software/Visual_Studio/Tango.UnitTesting/Logging_TST.cs +++ b/Software/Visual_Studio/Tango.UnitTesting/Logging_TST.cs @@ -4,7 +4,8 @@ using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; -using Tango.MachineStudio.Logging.Parsing; +using Tango.Integration.Logging; +using Tango.Logging; namespace Tango.UnitTesting { diff --git a/Software/Visual_Studio/Tango.UnitTesting/MachineService_TST.cs b/Software/Visual_Studio/Tango.UnitTesting/MachineService_TST.cs index 4afa31edf..0edab542a 100644 --- a/Software/Visual_Studio/Tango.UnitTesting/MachineService_TST.cs +++ b/Software/Visual_Studio/Tango.UnitTesting/MachineService_TST.cs @@ -5,6 +5,7 @@ using System.Linq; using System.Text; using System.Threading.Tasks; using Tango.PMR.Synchronization; +using Tango.PPC.Common.MachineUpdate; using Tango.Transport.Web; namespace Tango.UnitTesting @@ -16,8 +17,8 @@ namespace Tango.UnitTesting [TestMethod] public void Check_For_Updates() { - ITransportWebClient client = new ProtoWebClient(); - var result = client.Post<CheckForUpdateRequest, CheckForUpdateResponse>("http://localhost:51581/api/Synchronization/CheckForUpdate", new CheckForUpdateRequest() + IWebTransportClient client = new WebTransportClient(); + var result = client.PostJson<CheckForUpdateRequest, CheckForUpdateResponse>("http://localhost:51581/api/PPC/CheckForUpdate", new CheckForUpdateRequest() { SerialNumber = "0000", Version = "0.0.0.0", diff --git a/Software/Visual_Studio/Tango.UnitTesting/Tango.UnitTesting.csproj b/Software/Visual_Studio/Tango.UnitTesting/Tango.UnitTesting.csproj index aa8b71dd1..6c547102c 100644 --- a/Software/Visual_Studio/Tango.UnitTesting/Tango.UnitTesting.csproj +++ b/Software/Visual_Studio/Tango.UnitTesting/Tango.UnitTesting.csproj @@ -128,6 +128,10 @@ <Project>{cb0b0aa2-bb24-4bca-a720-45e397684e12}</Project> <Name>Tango.MachineStudio.Common</Name> </ProjectReference> + <ProjectReference Include="..\PPC\Tango.PPC.Common\Tango.PPC.Common.csproj"> + <Project>{0BE74EEE-22CB-4DBA-B896-793B9E1A3AC0}</Project> + <Name>Tango.PPC.Common</Name> + </ProjectReference> <ProjectReference Include="..\Tango.BL\Tango.BL.csproj"> <Project>{f441feee-322a-4943-b566-110e12fd3b72}</Project> <Name>Tango.BL</Name> @@ -211,7 +215,7 @@ <Import Project="..\packages\System.Data.SQLite.Core.1.0.108.0\build\net46\System.Data.SQLite.Core.targets" Condition="Exists('..\packages\System.Data.SQLite.Core.1.0.108.0\build\net46\System.Data.SQLite.Core.targets')" /> <ProjectExtensions> <VisualStudio> - <UserProperties BuildVersion_StartDate="2000/1/1" BuildVersion_UseGlobalSettings="False" BuildVersion_BuildVersioningStyle="None.None.Increment.TimeStamp" BuildVersion_UpdateAssemblyVersion="True" BuildVersion_AssemblyInfoFilename="Properties\AssemblyInfo.cs" /> + <UserProperties BuildVersion_AssemblyInfoFilename="Properties\AssemblyInfo.cs" BuildVersion_UpdateAssemblyVersion="True" BuildVersion_BuildVersioningStyle="None.None.Increment.TimeStamp" BuildVersion_UseGlobalSettings="False" BuildVersion_StartDate="2000/1/1" /> </VisualStudio> </ProjectExtensions> </Project>
\ No newline at end of file |
