diff options
| author | Roy Ben-Shabat <Roy@Twine-s.com> | 2018-08-07 19:26:57 +0300 |
|---|---|---|
| committer | Roy Ben-Shabat <Roy@Twine-s.com> | 2018-08-07 19:26:57 +0300 |
| commit | 6511527e4b576d29fc97aa80479b61d7d1abc079 (patch) | |
| tree | 9734dc9bc5b6c347c7fc651702419afa37d0d3d9 /Software/Visual_Studio/Tango.UnitTesting | |
| parent | 3bcad30c7eacb41c134631f79bb50957751f11c7 (diff) | |
| download | Tango-6511527e4b576d29fc97aa80479b61d7d1abc079.tar.gz Tango-6511527e4b576d29fc97aa80479b61d7d1abc079.zip | |
Working on PPC Machine Setup !
Diffstat (limited to 'Software/Visual_Studio/Tango.UnitTesting')
| -rw-r--r-- | Software/Visual_Studio/Tango.UnitTesting/SQLExaminer_TST.cs | 39 |
1 files changed, 39 insertions, 0 deletions
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); } } } |
