aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/Tango.UnitTesting/TCC/TCC_TST.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Software/Visual_Studio/Tango.UnitTesting/TCC/TCC_TST.cs')
-rw-r--r--Software/Visual_Studio/Tango.UnitTesting/TCC/TCC_TST.cs19
1 files changed, 19 insertions, 0 deletions
diff --git a/Software/Visual_Studio/Tango.UnitTesting/TCC/TCC_TST.cs b/Software/Visual_Studio/Tango.UnitTesting/TCC/TCC_TST.cs
index ae5c66f6e..59237b4a0 100644
--- a/Software/Visual_Studio/Tango.UnitTesting/TCC/TCC_TST.cs
+++ b/Software/Visual_Studio/Tango.UnitTesting/TCC/TCC_TST.cs
@@ -10,10 +10,12 @@ using System.Linq;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading.Tasks;
+using Tango.Core;
using Tango.Core.IO;
using Tango.CSV;
using Tango.PMR.TCC;
using Tango.TCC.BL;
+using Tango.TCC.BL.Entities;
namespace Tango.UnitTesting.TCC
{
@@ -82,6 +84,23 @@ namespace Tango.UnitTesting.TCC
}
}
+ [TestMethod]
+ public void Test_Database()
+ {
+ using (TCCContext db = new TCCContext(new DataSource()
+ {
+ Address = "localhost\\SQLEXPRESS",
+ Catalog = "TCC",
+ IntegratedSecurity = true,
+ Type = DataSourceType.SQLServer,
+ }))
+ {
+ var device = db.Devices.FirstOrDefault();
+ Assert.IsNotNull(device);
+ db.SaveChanges();
+ }
+ }
+
private byte[] GetBitmapData(byte[] bitmap)
{
using (MemoryStream ms = new MemoryStream(bitmap))