From 6511527e4b576d29fc97aa80479b61d7d1abc079 Mon Sep 17 00:00:00 2001 From: Roy Ben-Shabat Date: Tue, 7 Aug 2018 19:26:57 +0300 Subject: Working on PPC Machine Setup ! --- .../Tango.UnitTesting/SQLExaminer_TST.cs | 39 ++++++++++++++++++++++ 1 file changed, 39 insertions(+) (limited to 'Software/Visual_Studio/Tango.UnitTesting') diff --git a/Software/Visual_Studio/Tango.UnitTesting/SQLExaminer_TST.cs b/Software/Visual_Studio/Tango.UnitTesting/SQLExaminer_TST.cs index 32aaa4485..980dd7a27 100644 --- a/Software/Visual_Studio/Tango.UnitTesting/SQLExaminer_TST.cs +++ b/Software/Visual_Studio/Tango.UnitTesting/SQLExaminer_TST.cs @@ -328,6 +328,45 @@ namespace Tango.UnitTesting } //Now change configuration in source and push to machine + using (var context = ObservablesContext.CreateDefault("localhost\\SQLEXPRESS", source_db)) + { + var machine = context.Machines.SingleOrDefault(x => x.SerialNumber == machine_serial_number); + machine.Configuration.Name = "Test Name " + new Random().Next(0, 1000); + context.SaveChanges(); + } + + //Update the machine from source + builder = new ExaminerConfigurationBuilder(ExaminerConfigurationType.UpdateMachine); + + builder. + SetSourceServer("localhost\\SQLEXPRESS", source_db). + SetTargetServer("localhost\\SQLEXPRESS", target_db). + SetMachineSerialNumber(machine_serial_number). + Synchronize(). + SetReportFile(report_file); + + result = new ExaminerProcess(builder.Build(), ExaminerProcessType.Data).Execute().Result; + + //Synchronization was successful + Assert.AreEqual(result.ExitCode, ExaminerProcessExitCode.Success); + + data_report = ExaminerDataReport.FromFile(report_file); + + //Should have differences + Assert.IsTrue(data_report.HasDifferences); + + + //Check no difference after update + builder.NoSynchronize(); + result = new ExaminerProcess(builder.Build(), ExaminerProcessType.Data).Execute().Result; + + //Synchronization was successful + Assert.AreEqual(result.ExitCode, ExaminerProcessExitCode.Success); + + data_report = ExaminerDataReport.FromFile(report_file); + + //Should have no differences! + Assert.IsFalse(data_report.HasDifferences); } } } -- cgit v1.3.1