From 2ab54573d10ca59351100ab8416178be2223fc91 Mon Sep 17 00:00:00 2001 From: Roy Ben-Shabat Date: Wed, 27 Feb 2019 16:49:42 +0200 Subject: Added support for caching on machine studio. --- .../Visual_Studio/Tango.UnitTesting/App.config | 67 +++++++++++++--------- .../MachineService/MachineStudio_Controller_TST.cs | 30 ++++++++++ .../Tango.UnitTesting/Tango.UnitTesting.csproj | 28 ++++++++- .../Tango.UnitTesting/packages.config | 3 + 4 files changed, 97 insertions(+), 31 deletions(-) (limited to 'Software/Visual_Studio/Tango.UnitTesting') diff --git a/Software/Visual_Studio/Tango.UnitTesting/App.config b/Software/Visual_Studio/Tango.UnitTesting/App.config index 1a3af14d9..074da9ac0 100644 --- a/Software/Visual_Studio/Tango.UnitTesting/App.config +++ b/Software/Visual_Studio/Tango.UnitTesting/App.config @@ -4,6 +4,24 @@
+ + + + + + + + + + + + + + + + + + @@ -14,9 +32,26 @@ + - - + + + + + + + + + + + + + + + + + + @@ -59,32 +94,8 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - + + diff --git a/Software/Visual_Studio/Tango.UnitTesting/MachineService/MachineStudio_Controller_TST.cs b/Software/Visual_Studio/Tango.UnitTesting/MachineService/MachineStudio_Controller_TST.cs index 21ab16307..d4585388a 100644 --- a/Software/Visual_Studio/Tango.UnitTesting/MachineService/MachineStudio_Controller_TST.cs +++ b/Software/Visual_Studio/Tango.UnitTesting/MachineService/MachineStudio_Controller_TST.cs @@ -5,6 +5,7 @@ using Tango.BL; using Tango.MachineStudio.Common.Web; using Tango.Transport.Web; using System.Linq; +using System.Configuration; namespace Tango.UnitTesting.MachineService { @@ -74,5 +75,34 @@ namespace Tango.UnitTesting.MachineService Assert.IsFalse(res5.IsUpdateAvailable); } + + [TestMethod] + public void Login_with_new_user() + { + //LoadConfiguration(); + + Tango.MachineService.Controllers.MachineStudioController controller = new Tango.MachineService.Controllers.MachineStudioController(); + + + + controller.Login(new LoginRequest() + { + Email = "Mati@twine-s.com", + Password = "Futo8985", + }); + } + + //private void LoadConfiguration() + //{ + // ExeConfigurationFileMap fileMap = new ExeConfigurationFileMap(); + // fileMap.ExeConfigFilename = @"web.config"; + + // Configuration config = ConfigurationManager.OpenMappedExeConfiguration(fileMap, ConfigurationUserLevel.None); + + // foreach (var item in config.AppSettings.Settings.OfType()) + // { + // ConfigurationManager.AppSettings.Add(item.Key, item.Value); + // } + //} } } diff --git a/Software/Visual_Studio/Tango.UnitTesting/Tango.UnitTesting.csproj b/Software/Visual_Studio/Tango.UnitTesting/Tango.UnitTesting.csproj index 4e852fed8..d1bba995e 100644 --- a/Software/Visual_Studio/Tango.UnitTesting/Tango.UnitTesting.csproj +++ b/Software/Visual_Studio/Tango.UnitTesting/Tango.UnitTesting.csproj @@ -25,7 +25,7 @@ true full false - ..\Build\Core\Debug\ + bin\Debug\ DEBUG;TRACE prompt 0 @@ -35,7 +35,7 @@ pdbonly true - ..\Build\Core\Release\ + bin\Release\ TRACE prompt 4 @@ -60,6 +60,16 @@ ..\packages\JWT.5.0.0\lib\net46\JWT.dll + + False + ..\packages\Microsoft.IdentityModel.Clients.ActiveDirectory.2.7.10707.1513-rc\lib\net45\Microsoft.IdentityModel.Clients.ActiveDirectory.dll + + + ..\packages\Microsoft.IdentityModel.Clients.ActiveDirectory.3.13.5\lib\net45\Microsoft.IdentityModel.Clients.ActiveDirectory.Platform.dll + + + ..\packages\Microsoft.IdentityModel.Clients.ActiveDirectory.2.7.10707.1513-rc\lib\net45\Microsoft.IdentityModel.Clients.ActiveDirectory.WindowsForms.dll + True @@ -76,6 +86,7 @@ + @@ -91,6 +102,13 @@ ..\packages\System.Data.SQLite.Linq.1.0.108.0\lib\net46\System.Data.SQLite.Linq.dll True + + + ..\packages\Microsoft.AspNet.WebApi.Client.5.2.3\lib\net45\System.Net.Http.Formatting.dll + + + ..\packages\Microsoft.AspNet.WebApi.Core.5.2.3\lib\net45\System.Web.Http.dll + ..\packages\TestStack.White.0.13.3\lib\net40\TestStack.White.dll @@ -216,6 +234,10 @@ {ebb7cb9f-6af2-456b-a5dd-1b136b605d90} Tango.DBObservablesGenerator.CLI + + {3f09b230-5aac-4651-ba7a-19f3bdfcf701} + Tango.MachineService + @@ -242,7 +264,7 @@ - + \ No newline at end of file diff --git a/Software/Visual_Studio/Tango.UnitTesting/packages.config b/Software/Visual_Studio/Tango.UnitTesting/packages.config index 0528c7ef0..e3fc2d3b6 100644 --- a/Software/Visual_Studio/Tango.UnitTesting/packages.config +++ b/Software/Visual_Studio/Tango.UnitTesting/packages.config @@ -5,6 +5,9 @@ + + + -- cgit v1.3.1