diff options
Diffstat (limited to 'Software/Visual_Studio/Tango.UnitTesting')
4 files changed, 20 insertions, 18 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 94d30df98..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 @@ -17,7 +18,7 @@ namespace Tango.UnitTesting public void Check_For_Updates() { IWebTransportClient client = new WebTransportClient(); - var result = client.Post<CheckForUpdateRequest, CheckForUpdateResponse>("http://localhost:51581/api/PPC/CheckForUpdate", new CheckForUpdateRequest() + 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 |
