aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/Tango.UnitTesting
diff options
context:
space:
mode:
authorAvi Levkovich <avi@twine-s.com>2018-06-03 10:34:59 +0300
committerAvi Levkovich <avi@twine-s.com>2018-06-03 10:34:59 +0300
commit34b3f33ec9ccb682c430b3c9e206507d0a396e1c (patch)
tree4d67c5f052c5583283f5c7ce02ad77fab8a875c6 /Software/Visual_Studio/Tango.UnitTesting
parent565d4cfcfc382e1ab63fd8fc6bbb3bb4562d16d9 (diff)
parent7399e15a1456064fc2e25daf841e0d3027d83489 (diff)
downloadTango-34b3f33ec9ccb682c430b3c9e206507d0a396e1c.tar.gz
Tango-34b3f33ec9ccb682c430b3c9e206507d0a396e1c.zip
Merge branch 'master' of https://twinetfs.visualstudio.com/_git/Tango
Diffstat (limited to 'Software/Visual_Studio/Tango.UnitTesting')
-rw-r--r--Software/Visual_Studio/Tango.UnitTesting/App.config18
-rw-r--r--Software/Visual_Studio/Tango.UnitTesting/DAL_TST.cs14
-rw-r--r--Software/Visual_Studio/Tango.UnitTesting/Synchronization_TST.cs4
-rw-r--r--Software/Visual_Studio/Tango.UnitTesting/Tango.UnitTesting.csproj17
-rw-r--r--Software/Visual_Studio/Tango.UnitTesting/packages.config8
5 files changed, 37 insertions, 24 deletions
diff --git a/Software/Visual_Studio/Tango.UnitTesting/App.config b/Software/Visual_Studio/Tango.UnitTesting/App.config
index 346a716a3..5c4ce34ef 100644
--- a/Software/Visual_Studio/Tango.UnitTesting/App.config
+++ b/Software/Visual_Studio/Tango.UnitTesting/App.config
@@ -5,18 +5,13 @@
<section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
</configSections>
<entityFramework>
- <defaultConnectionFactory type="System.Data.Entity.Infrastructure.SqlConnectionFactory, EntityFramework" />
<providers>
<provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" />
<provider invariantName="System.Data.SQLite.EF6" type="System.Data.SQLite.EF6.SQLiteProviderServices, System.Data.SQLite.EF6" />
+ <provider invariantName="System.Data.SQLite" type="System.Data.SQLite.EF6.SQLiteProviderServices, System.Data.SQLite.EF6" />
</providers>
</entityFramework>
- <system.data>
- <DbProviderFactories>
- <remove invariant="System.Data.SQLite.EF6" />
- <add name="SQLite Data Provider (Entity Framework 6)" invariant="System.Data.SQLite.EF6" description=".NET Framework Data Provider for SQLite (Entity Framework 6)" type="System.Data.SQLite.EF6.SQLiteProviderFactory, System.Data.SQLite.EF6" />
- <remove invariant="System.Data.SQLite" /><add name="SQLite Data Provider" invariant="System.Data.SQLite" description=".NET Framework Data Provider for SQLite" type="System.Data.SQLite.SQLiteFactory, System.Data.SQLite" /></DbProviderFactories>
- </system.data>
+
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
@@ -73,4 +68,11 @@
</dependentAssembly>
</assemblyBinding>
</runtime>
-</configuration> \ No newline at end of file
+<system.data>
+ <DbProviderFactories>
+ <remove invariant="System.Data.SQLite.EF6" />
+ <add name="SQLite Data Provider" invariant="System.Data.SQLite" description=".NET Framework Data Provider for SQLite" type="System.Data.SQLite.SQLiteFactory, System.Data.SQLite" />
+ <remove invariant="System.Data.SQLite.EF6" />
+ <add name="SQLite Data Provider (Entity Framework 6)" invariant="System.Data.SQLite.EF6" description=".NET Framework Data Provider for SQLite (Entity Framework 6)" type="System.Data.SQLite.EF6.SQLiteProviderFactory, System.Data.SQLite.EF6" />
+ </DbProviderFactories>
+ </system.data></configuration> \ No newline at end of file
diff --git a/Software/Visual_Studio/Tango.UnitTesting/DAL_TST.cs b/Software/Visual_Studio/Tango.UnitTesting/DAL_TST.cs
index df6028b2e..305849694 100644
--- a/Software/Visual_Studio/Tango.UnitTesting/DAL_TST.cs
+++ b/Software/Visual_Studio/Tango.UnitTesting/DAL_TST.cs
@@ -4,6 +4,7 @@ using Tango.DAL;
using System.Linq;
using Tango.Settings;
using Tango.Core;
+using Tango.BL;
namespace Tango.UnitTesting
{
@@ -16,7 +17,7 @@ namespace Tango.UnitTesting
{
String guid = Guid.NewGuid().ToString();
- using (var db = new DAL.Remote.DB.RemoteDB(SettingsManager.Default.GetOrCreate<CoreSettings>().SQLServerAddress, false))
+ using (var db = new DAL.Remote.DB.RemoteDB(SettingsManager.Default.GetOrCreate<CoreSettings>().DataBaseSource, false))
{
var action = new DAL.Remote.DB.ACTION_TYPES();
action.CODE = 1;
@@ -29,7 +30,7 @@ namespace Tango.UnitTesting
db.SaveChanges();
}
- using (var db = new DAL.Remote.DB.RemoteDB(SettingsManager.Default.GetOrCreate<CoreSettings>().SQLServerAddress, false))
+ using (var db = new DAL.Remote.DB.RemoteDB(SettingsManager.Default.GetOrCreate<CoreSettings>().DataBaseSource, false))
{
var action = db.ACTION_TYPES.Single(x => x.GUID == guid);
db.ACTION_TYPES.Remove(action);
@@ -62,5 +63,14 @@ namespace Tango.UnitTesting
db.SaveChanges();
}
}
+
+ [TestMethod]
+ public void Validate_SQLite_Connection_Using_Observables()
+ {
+ using (ObservablesContext db = ObservablesContext.CreateDefault(@"D:\Development\Tango\Software\DB\Tango.db"))
+ {
+ var actions = db.ActionTypes.ToList();
+ }
+ }
}
}
diff --git a/Software/Visual_Studio/Tango.UnitTesting/Synchronization_TST.cs b/Software/Visual_Studio/Tango.UnitTesting/Synchronization_TST.cs
index 5135c5954..cbef9f4bd 100644
--- a/Software/Visual_Studio/Tango.UnitTesting/Synchronization_TST.cs
+++ b/Software/Visual_Studio/Tango.UnitTesting/Synchronization_TST.cs
@@ -21,7 +21,7 @@ namespace Tango.UnitTesting
{
var console = Helper.InitializeLogging(true);
- using (var remoteDB = new remote.RemoteDB(SettingsManager.Default.GetOrCreate<CoreSettings>().SQLServerAddress, false))
+ using (var remoteDB = new remote.RemoteDB(SettingsManager.Default.GetOrCreate<CoreSettings>().DataBaseSource, false))
{
using (var localDB = new local.LocalDB(Helper.GetSQLiteFilePath()))
{
@@ -45,7 +45,7 @@ namespace Tango.UnitTesting
[TestMethod]
public void Generate_Demo_Remote_Machine()
{
- using (var remoteDB = new remote.RemoteDB(SettingsManager.Default.GetOrCreate<CoreSettings>().SQLServerAddress, false))
+ using (var remoteDB = new remote.RemoteDB(SettingsManager.Default.GetOrCreate<CoreSettings>().DataBaseSource, false))
{
var organization = new remote.ORGANIZATION()
{
diff --git a/Software/Visual_Studio/Tango.UnitTesting/Tango.UnitTesting.csproj b/Software/Visual_Studio/Tango.UnitTesting/Tango.UnitTesting.csproj
index 71a9413c2..b01b6374b 100644
--- a/Software/Visual_Studio/Tango.UnitTesting/Tango.UnitTesting.csproj
+++ b/Software/Visual_Studio/Tango.UnitTesting/Tango.UnitTesting.csproj
@@ -67,15 +67,16 @@
<Reference Include="System.ComponentModel.DataAnnotations" />
<Reference Include="System.Core" />
<Reference Include="System.Data.Entity.Design" />
- <Reference Include="System.Data.SQLite, Version=1.0.106.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139, processorArchitecture=MSIL">
- <HintPath>..\packages\System.Data.SQLite.Core.1.0.106.0\lib\net46\System.Data.SQLite.dll</HintPath>
+ <Reference Include="System.Data.SQLite, Version=1.0.108.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139, processorArchitecture=MSIL">
+ <HintPath>..\packages\System.Data.SQLite.Core.1.0.108.0\lib\net46\System.Data.SQLite.dll</HintPath>
+ <Private>True</Private>
</Reference>
- <Reference Include="System.Data.SQLite.EF6, Version=1.0.106.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139, processorArchitecture=MSIL">
- <HintPath>..\packages\System.Data.SQLite.EF6.1.0.106.0\lib\net46\System.Data.SQLite.EF6.dll</HintPath>
+ <Reference Include="System.Data.SQLite.EF6, Version=1.0.108.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139, processorArchitecture=MSIL">
+ <HintPath>..\packages\System.Data.SQLite.EF6.1.0.108.0\lib\net46\System.Data.SQLite.EF6.dll</HintPath>
<Private>True</Private>
</Reference>
- <Reference Include="System.Data.SQLite.Linq, Version=1.0.106.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139, processorArchitecture=MSIL">
- <HintPath>..\packages\System.Data.SQLite.Linq.1.0.106.0\lib\net46\System.Data.SQLite.Linq.dll</HintPath>
+ <Reference Include="System.Data.SQLite.Linq, Version=1.0.108.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139, processorArchitecture=MSIL">
+ <HintPath>..\packages\System.Data.SQLite.Linq.1.0.108.0\lib\net46\System.Data.SQLite.Linq.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="TestStack.White, Version=0.13.0.0, Culture=neutral, PublicKeyToken=2672efbf3e161801, processorArchitecture=MSIL">
@@ -209,8 +210,8 @@
</PropertyGroup>
<Error Condition="!Exists('..\packages\MSTest.TestAdapter.1.1.11\build\net45\MSTest.TestAdapter.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\MSTest.TestAdapter.1.1.11\build\net45\MSTest.TestAdapter.props'))" />
<Error Condition="!Exists('..\packages\MSTest.TestAdapter.1.1.11\build\net45\MSTest.TestAdapter.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\MSTest.TestAdapter.1.1.11\build\net45\MSTest.TestAdapter.targets'))" />
- <Error Condition="!Exists('..\packages\System.Data.SQLite.Core.1.0.106.0\build\net46\System.Data.SQLite.Core.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\System.Data.SQLite.Core.1.0.106.0\build\net46\System.Data.SQLite.Core.targets'))" />
+ <Error Condition="!Exists('..\packages\System.Data.SQLite.Core.1.0.108.0\build\net46\System.Data.SQLite.Core.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\System.Data.SQLite.Core.1.0.108.0\build\net46\System.Data.SQLite.Core.targets'))" />
</Target>
<Import Project="..\packages\MSTest.TestAdapter.1.1.11\build\net45\MSTest.TestAdapter.targets" Condition="Exists('..\packages\MSTest.TestAdapter.1.1.11\build\net45\MSTest.TestAdapter.targets')" />
- <Import Project="..\packages\System.Data.SQLite.Core.1.0.106.0\build\net46\System.Data.SQLite.Core.targets" Condition="Exists('..\packages\System.Data.SQLite.Core.1.0.106.0\build\net46\System.Data.SQLite.Core.targets')" />
+ <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')" />
</Project> \ 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 16e993ae8..326273243 100644
--- a/Software/Visual_Studio/Tango.UnitTesting/packages.config
+++ b/Software/Visual_Studio/Tango.UnitTesting/packages.config
@@ -6,9 +6,9 @@
<package id="MSTest.TestAdapter" version="1.1.11" targetFramework="net45" />
<package id="MSTest.TestFramework" version="1.1.11" targetFramework="net45" />
<package id="Newtonsoft.Json" version="8.0.3" targetFramework="net46" />
- <package id="System.Data.SQLite" version="1.0.106.0" targetFramework="net46" />
- <package id="System.Data.SQLite.Core" version="1.0.106.0" targetFramework="net46" />
- <package id="System.Data.SQLite.EF6" version="1.0.106.0" targetFramework="net46" />
- <package id="System.Data.SQLite.Linq" version="1.0.106.0" targetFramework="net46" />
+ <package id="System.Data.SQLite" version="1.0.108.0" targetFramework="net46" />
+ <package id="System.Data.SQLite.Core" version="1.0.108.0" targetFramework="net46" />
+ <package id="System.Data.SQLite.EF6" version="1.0.108.0" targetFramework="net46" />
+ <package id="System.Data.SQLite.Linq" version="1.0.108.0" targetFramework="net46" />
<package id="TestStack.White" version="0.13.3" targetFramework="net46" />
</packages> \ No newline at end of file