From 40afcf1c6591abacfa1466dd4d865296bf687aa4 Mon Sep 17 00:00:00 2001 From: Roy Ben-Shabat Date: Thu, 2 Aug 2018 19:42:50 +0300 Subject: Working on SQLExaminer lib --- .../Properties/AssemblyInfo.cs | 2 +- .../Properties/AssemblyInfo.cs | 2 +- .../Properties/AssemblyInfo.cs | 2 +- .../RealTimeGraphEx/Properties/AssemblyInfo.cs | 2 +- .../Tango.AutoComplete/Properties/AssemblyInfo.cs | 2 +- .../Tango.BL/Properties/AssemblyInfo.cs | 2 +- .../Properties/AssemblyInfo.cs | 2 +- .../Tango.ColorPicker/Properties/AssemblyInfo.cs | 2 +- .../Tango.Core/IO/TemporaryManager.cs | 11 +++ .../Tango.Core/Properties/AssemblyInfo.cs | 2 +- .../Tango.DAL.Local/Properties/AssemblyInfo.cs | 2 +- .../Tango.DAL.Remote/Properties/AssemblyInfo.cs | 2 +- .../Tango.DragAndDrop/Properties/AssemblyInfo.cs | 2 +- .../Tango.Editors/Properties/AssemblyInfo.cs | 2 +- .../Tango.Integration/Properties/AssemblyInfo.cs | 2 +- .../Tango.Logging/Properties/AssemblyInfo.cs | 2 +- .../Tango.PMR/Properties/AssemblyInfo.cs | 2 +- .../Tango.Protobuf/Properties/AssemblyInfo.cs | 2 +- .../ExaminerConfigurationBuilder.cs | 47 +++++++--- .../Tango.SQLExaminer/ExaminerConfigurationType.cs | 3 +- .../Tango.SQLExaminer/Tango.SQLExaminer.csproj | 9 +- .../Tango.Scripting/Properties/AssemblyInfo.cs | 2 +- .../Tango.Serialization/Properties/AssemblyInfo.cs | 2 +- .../Tango.Settings/Properties/AssemblyInfo.cs | 2 +- .../Tango.SharedUI/Properties/AssemblyInfo.cs | 2 +- .../Properties/AssemblyInfo.cs | 2 +- .../Tango.TFS/Properties/AssemblyInfo.cs | 2 +- .../Tango.Transport/Properties/AssemblyInfo.cs | 2 +- .../Tango.UnitTesting/Properties/AssemblyInfo.cs | 2 +- .../Tango.UnitTesting/SQLExaminer_TST.cs | 104 +++++++++++++++++++++ .../Tango.UnitTesting/Tango.UnitTesting.csproj | 7 +- .../Tango.Video/Properties/AssemblyInfo.cs | 2 +- .../Properties/AssemblyInfo.cs | 2 +- .../Tango.Protobuf.CLI/Properties/AssemblyInfo.cs | 2 +- 34 files changed, 195 insertions(+), 42 deletions(-) create mode 100644 Software/Visual_Studio/Tango.UnitTesting/SQLExaminer_TST.cs (limited to 'Software/Visual_Studio') diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Logging/Properties/AssemblyInfo.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Logging/Properties/AssemblyInfo.cs index 66e744ea5..7c1a4b38b 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Logging/Properties/AssemblyInfo.cs +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Logging/Properties/AssemblyInfo.cs @@ -5,7 +5,7 @@ using System.Runtime.InteropServices; using System.Windows; [assembly: AssemblyTitle("Tango - Machine Studio Logging Module")] -[assembly: AssemblyVersion("2.0.6.1407")] +[assembly: AssemblyVersion("2.0.11.1933")] [assembly: ComVisible(false)] diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Properties/AssemblyInfo.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Properties/AssemblyInfo.cs index a653afb0d..7ce7f6399 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Properties/AssemblyInfo.cs +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Properties/AssemblyInfo.cs @@ -5,7 +5,7 @@ using System.Runtime.InteropServices; using System.Windows; [assembly: AssemblyTitle("Tango - Machine Studio Common Components")] -[assembly: AssemblyVersion("2.0.14.1828")] +[assembly: AssemblyVersion("2.0.19.1933")] [assembly: ComVisible(false)] [assembly:ThemeInfo( diff --git a/Software/Visual_Studio/SideChains/ICSharpCode.AvalonEdit/Properties/AssemblyInfo.cs b/Software/Visual_Studio/SideChains/ICSharpCode.AvalonEdit/Properties/AssemblyInfo.cs index 9b7f2135e..034ebc234 100644 --- a/Software/Visual_Studio/SideChains/ICSharpCode.AvalonEdit/Properties/AssemblyInfo.cs +++ b/Software/Visual_Studio/SideChains/ICSharpCode.AvalonEdit/Properties/AssemblyInfo.cs @@ -20,7 +20,7 @@ using System.Windows.Markup; [assembly: AssemblyCompany("ic#code")] [assembly: AssemblyProduct("SharpDevelop")] [assembly: AssemblyCopyright("2000-2013 AlphaSierraPapa for the SharpDevelop Team")] -[assembly: AssemblyVersion("1.0.13.1355")] +[assembly: AssemblyVersion("1.0.18.1933")] [assembly: NeutralResourcesLanguage("en-US")] [assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2243:AttributeStringLiteralsShouldParseCorrectly", diff --git a/Software/Visual_Studio/SideChains/RealTimeGraphEx/Properties/AssemblyInfo.cs b/Software/Visual_Studio/SideChains/RealTimeGraphEx/Properties/AssemblyInfo.cs index 0441103ba..bf7fcf99f 100644 --- a/Software/Visual_Studio/SideChains/RealTimeGraphEx/Properties/AssemblyInfo.cs +++ b/Software/Visual_Studio/SideChains/RealTimeGraphEx/Properties/AssemblyInfo.cs @@ -51,5 +51,5 @@ using System.Windows; // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.9.1411")] +[assembly: AssemblyVersion("1.0.14.1933")] [assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/Software/Visual_Studio/SideChains/Tango.AutoComplete/Properties/AssemblyInfo.cs b/Software/Visual_Studio/SideChains/Tango.AutoComplete/Properties/AssemblyInfo.cs index 5df39cd7c..4efd7eb72 100644 --- a/Software/Visual_Studio/SideChains/Tango.AutoComplete/Properties/AssemblyInfo.cs +++ b/Software/Visual_Studio/SideChains/Tango.AutoComplete/Properties/AssemblyInfo.cs @@ -49,5 +49,5 @@ using System.Windows.Markup; // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.9.1411")] +[assembly: AssemblyVersion("1.0.14.1933")] [assembly: AssemblyFileVersion("1.0.0.8")] diff --git a/Software/Visual_Studio/Tango.BL/Properties/AssemblyInfo.cs b/Software/Visual_Studio/Tango.BL/Properties/AssemblyInfo.cs index 716856757..c8f631446 100644 --- a/Software/Visual_Studio/Tango.BL/Properties/AssemblyInfo.cs +++ b/Software/Visual_Studio/Tango.BL/Properties/AssemblyInfo.cs @@ -4,4 +4,4 @@ using System.Runtime.InteropServices; [assembly: AssemblyTitle("Tango - Business logic components")] [assembly: ComVisible(false)] -[assembly: AssemblyVersion("2.0.18.1657")] \ No newline at end of file +[assembly: AssemblyVersion("2.0.23.1933")] \ No newline at end of file diff --git a/Software/Visual_Studio/Tango.CodeGeneration/Properties/AssemblyInfo.cs b/Software/Visual_Studio/Tango.CodeGeneration/Properties/AssemblyInfo.cs index 9de0fff27..e414007e6 100644 --- a/Software/Visual_Studio/Tango.CodeGeneration/Properties/AssemblyInfo.cs +++ b/Software/Visual_Studio/Tango.CodeGeneration/Properties/AssemblyInfo.cs @@ -3,5 +3,5 @@ using System.Runtime.CompilerServices; using System.Runtime.InteropServices; [assembly: AssemblyTitle("Tango - Code Generation Components")] -[assembly: AssemblyVersion("2.0.6.1407")] +[assembly: AssemblyVersion("2.0.11.1933")] [assembly: ComVisible(false)] \ No newline at end of file diff --git a/Software/Visual_Studio/Tango.ColorPicker/Properties/AssemblyInfo.cs b/Software/Visual_Studio/Tango.ColorPicker/Properties/AssemblyInfo.cs index 7c6b3f741..65721e37d 100644 --- a/Software/Visual_Studio/Tango.ColorPicker/Properties/AssemblyInfo.cs +++ b/Software/Visual_Studio/Tango.ColorPicker/Properties/AssemblyInfo.cs @@ -5,7 +5,7 @@ using System.Runtime.InteropServices; using System.Windows; [assembly: AssemblyTitle("Tango - Color Picker Control")] -[assembly: AssemblyVersion("2.0.9.1411")] +[assembly: AssemblyVersion("2.0.14.1933")] [assembly: ComVisible(false)] diff --git a/Software/Visual_Studio/Tango.Core/IO/TemporaryManager.cs b/Software/Visual_Studio/Tango.Core/IO/TemporaryManager.cs index b2f06359c..3a02325e6 100644 --- a/Software/Visual_Studio/Tango.Core/IO/TemporaryManager.cs +++ b/Software/Visual_Studio/Tango.Core/IO/TemporaryManager.cs @@ -101,6 +101,17 @@ namespace Tango.Core.IO return folder; } + /// + /// Creates a new temporary folder and returns the folder item. + /// + /// + public virtual TemporaryFolder CreateFolder(String name) + { + TemporaryFolder folder = new TemporaryFolder(Path.Combine(RootPath, name)); + AddItem(folder); + return folder; + } + /// /// Creates a new temporary file and returns the file item. /// diff --git a/Software/Visual_Studio/Tango.Core/Properties/AssemblyInfo.cs b/Software/Visual_Studio/Tango.Core/Properties/AssemblyInfo.cs index 8d6a6bd59..9b419879d 100644 --- a/Software/Visual_Studio/Tango.Core/Properties/AssemblyInfo.cs +++ b/Software/Visual_Studio/Tango.Core/Properties/AssemblyInfo.cs @@ -3,5 +3,5 @@ using System.Runtime.CompilerServices; using System.Runtime.InteropServices; [assembly: AssemblyTitle("Tango - Core Components")] -[assembly: AssemblyVersion("2.0.18.1657")] +[assembly: AssemblyVersion("2.0.23.1933")] [assembly: ComVisible(false)] \ No newline at end of file diff --git a/Software/Visual_Studio/Tango.DAL.Local/Properties/AssemblyInfo.cs b/Software/Visual_Studio/Tango.DAL.Local/Properties/AssemblyInfo.cs index 473c9b0b8..38c0f9759 100644 --- a/Software/Visual_Studio/Tango.DAL.Local/Properties/AssemblyInfo.cs +++ b/Software/Visual_Studio/Tango.DAL.Local/Properties/AssemblyInfo.cs @@ -3,5 +3,5 @@ using System.Runtime.CompilerServices; using System.Runtime.InteropServices; [assembly: AssemblyTitle("Tango - Local Data Access Layer")] -[assembly: AssemblyVersion("2.0.6.1407")] +[assembly: AssemblyVersion("2.0.11.1933")] [assembly: ComVisible(false)] \ No newline at end of file diff --git a/Software/Visual_Studio/Tango.DAL.Remote/Properties/AssemblyInfo.cs b/Software/Visual_Studio/Tango.DAL.Remote/Properties/AssemblyInfo.cs index d8b6e7e23..6bbd0fef8 100644 --- a/Software/Visual_Studio/Tango.DAL.Remote/Properties/AssemblyInfo.cs +++ b/Software/Visual_Studio/Tango.DAL.Remote/Properties/AssemblyInfo.cs @@ -3,5 +3,5 @@ using System.Runtime.CompilerServices; using System.Runtime.InteropServices; [assembly: AssemblyTitle("Tango - Remote Data Access Layer")] -[assembly: AssemblyVersion("2.0.17.1657")] +[assembly: AssemblyVersion("2.0.22.1933")] [assembly: ComVisible(false)] \ No newline at end of file diff --git a/Software/Visual_Studio/Tango.DragAndDrop/Properties/AssemblyInfo.cs b/Software/Visual_Studio/Tango.DragAndDrop/Properties/AssemblyInfo.cs index e5744bf21..b64d314ba 100644 --- a/Software/Visual_Studio/Tango.DragAndDrop/Properties/AssemblyInfo.cs +++ b/Software/Visual_Studio/Tango.DragAndDrop/Properties/AssemblyInfo.cs @@ -3,5 +3,5 @@ using System.Runtime.CompilerServices; using System.Runtime.InteropServices; [assembly: AssemblyTitle("Tango - Drag & Drop Components")] -[assembly: AssemblyVersion("2.0.15.1657")] +[assembly: AssemblyVersion("2.0.20.1933")] [assembly: ComVisible(false)] \ No newline at end of file diff --git a/Software/Visual_Studio/Tango.Editors/Properties/AssemblyInfo.cs b/Software/Visual_Studio/Tango.Editors/Properties/AssemblyInfo.cs index 5f9c81aee..6b32146e9 100644 --- a/Software/Visual_Studio/Tango.Editors/Properties/AssemblyInfo.cs +++ b/Software/Visual_Studio/Tango.Editors/Properties/AssemblyInfo.cs @@ -5,7 +5,7 @@ using System.Runtime.InteropServices; using System.Windows; [assembly: AssemblyTitle("Tango - Visual Diagram Editing Components")] -[assembly: AssemblyVersion("2.0.9.1411")] +[assembly: AssemblyVersion("2.0.14.1933")] [assembly: ComVisible(false)] diff --git a/Software/Visual_Studio/Tango.Integration/Properties/AssemblyInfo.cs b/Software/Visual_Studio/Tango.Integration/Properties/AssemblyInfo.cs index bb7538b01..4ce708b53 100644 --- a/Software/Visual_Studio/Tango.Integration/Properties/AssemblyInfo.cs +++ b/Software/Visual_Studio/Tango.Integration/Properties/AssemblyInfo.cs @@ -3,5 +3,5 @@ using System.Runtime.CompilerServices; using System.Runtime.InteropServices; [assembly: AssemblyTitle("Tango - Logging Library")] -[assembly: AssemblyVersion("2.0.16.1657")] +[assembly: AssemblyVersion("2.0.21.1933")] [assembly: ComVisible(false)] \ No newline at end of file diff --git a/Software/Visual_Studio/Tango.Logging/Properties/AssemblyInfo.cs b/Software/Visual_Studio/Tango.Logging/Properties/AssemblyInfo.cs index 39713351d..0a578efca 100644 --- a/Software/Visual_Studio/Tango.Logging/Properties/AssemblyInfo.cs +++ b/Software/Visual_Studio/Tango.Logging/Properties/AssemblyInfo.cs @@ -3,5 +3,5 @@ using System.Runtime.CompilerServices; using System.Runtime.InteropServices; [assembly: AssemblyTitle("Tango - Logging Library")] -[assembly: AssemblyVersion("2.0.22.1657")] +[assembly: AssemblyVersion("2.0.27.1933")] [assembly: ComVisible(false)] \ No newline at end of file diff --git a/Software/Visual_Studio/Tango.PMR/Properties/AssemblyInfo.cs b/Software/Visual_Studio/Tango.PMR/Properties/AssemblyInfo.cs index eacf902c7..a58fdd179 100644 --- a/Software/Visual_Studio/Tango.PMR/Properties/AssemblyInfo.cs +++ b/Software/Visual_Studio/Tango.PMR/Properties/AssemblyInfo.cs @@ -3,5 +3,5 @@ using System.Runtime.CompilerServices; using System.Runtime.InteropServices; [assembly: AssemblyTitle("Tango - Protobuf Message Repository")] -[assembly: AssemblyVersion("2.0.21.1828")] +[assembly: AssemblyVersion("2.0.26.1933")] [assembly: ComVisible(false)] \ No newline at end of file diff --git a/Software/Visual_Studio/Tango.Protobuf/Properties/AssemblyInfo.cs b/Software/Visual_Studio/Tango.Protobuf/Properties/AssemblyInfo.cs index 71bfdefe2..07c88ce15 100644 --- a/Software/Visual_Studio/Tango.Protobuf/Properties/AssemblyInfo.cs +++ b/Software/Visual_Studio/Tango.Protobuf/Properties/AssemblyInfo.cs @@ -3,5 +3,5 @@ using System.Runtime.CompilerServices; using System.Runtime.InteropServices; [assembly: AssemblyTitle("Tango - Protobuf Components")] -[assembly: AssemblyVersion("2.0.18.1657")] +[assembly: AssemblyVersion("2.0.23.1933")] [assembly: ComVisible(false)] \ No newline at end of file diff --git a/Software/Visual_Studio/Tango.SQLExaminer/ExaminerConfigurationBuilder.cs b/Software/Visual_Studio/Tango.SQLExaminer/ExaminerConfigurationBuilder.cs index 76c28c302..e153c229b 100644 --- a/Software/Visual_Studio/Tango.SQLExaminer/ExaminerConfigurationBuilder.cs +++ b/Software/Visual_Studio/Tango.SQLExaminer/ExaminerConfigurationBuilder.cs @@ -32,36 +32,51 @@ namespace Tango.SQLExaminer _config.DataSources.Clear(); } - public ExaminerConfigurationBuilder SetSourceServer(String address, String userName, String password) + public ExaminerConfigurationBuilder SetSourceServer(String address, String databaseName, bool integratedSecurity = true, String userName = null, String password = null) { - _config.DataSources.Add(new DataSource() + var ds = new DataSource() { ID = 1, - DataBase = "Tango", + DataBase = databaseName, Server = address, UserName = userName, Password = password, - }); + }; + + if (integratedSecurity) + { + ds.IntegratedSecurity = "True"; + } + + _config.DataSources.Add(ds); return this; } - public ExaminerConfigurationBuilder SetTargetServer(String address) + public ExaminerConfigurationBuilder SetTargetServer(String address, String databaseName, bool integratedSecurity = true, String userName = null, String password = null) { - _config.DataSources.Add(new DataSource() + var ds = new DataSource() { ID = 2, - DataBase = "Tango", + DataBase = databaseName, Server = address, - IntegratedSecurity = "True", - }); + UserName = userName, + Password = password, + }; + + if (integratedSecurity) + { + ds.IntegratedSecurity = "True"; + } + + _config.DataSources.Add(ds); return this; } public ExaminerConfigurationBuilder SetBackupFile(String path) { - var backup_action = _config.Actions.SingleOrDefault(x => x.ReportType == "backup"); + var backup_action = _config.Actions.SingleOrDefault(x => x.Type == "backup"); if (backup_action != null) { backup_action.Path = path; @@ -72,7 +87,7 @@ namespace Tango.SQLExaminer public ExaminerConfigurationBuilder SetReportFile(String path) { - var Report_action = _config.Actions.SingleOrDefault(x => x.ReportType == "report"); + var Report_action = _config.Actions.SingleOrDefault(x => x.Type == "report"); if (Report_action != null) { Report_action.Path = path; @@ -81,6 +96,16 @@ namespace Tango.SQLExaminer return this; } + public ExaminerConfigurationBuilder SetMachineSerialNumber(String serialNumber) + { + foreach (var query in _config.Objects.ObjectList.Object.SelectMany(x => x.Queries)) + { + query.Text.InnerText = query.Text.InnerText.Replace("@", serialNumber); + } + + return this; + } + public ExaminerConfiguration Build() { return _config; diff --git a/Software/Visual_Studio/Tango.SQLExaminer/ExaminerConfigurationType.cs b/Software/Visual_Studio/Tango.SQLExaminer/ExaminerConfigurationType.cs index be88dcb1e..86fc70edd 100644 --- a/Software/Visual_Studio/Tango.SQLExaminer/ExaminerConfigurationType.cs +++ b/Software/Visual_Studio/Tango.SQLExaminer/ExaminerConfigurationType.cs @@ -9,6 +9,7 @@ namespace Tango.SQLExaminer public enum ExaminerConfigurationType { Schema, - OverrideData + OverrideData, + ProvisionMachine } } diff --git a/Software/Visual_Studio/Tango.SQLExaminer/Tango.SQLExaminer.csproj b/Software/Visual_Studio/Tango.SQLExaminer/Tango.SQLExaminer.csproj index 4858d8eaa..95c7db110 100644 --- a/Software/Visual_Studio/Tango.SQLExaminer/Tango.SQLExaminer.csproj +++ b/Software/Visual_Studio/Tango.SQLExaminer/Tango.SQLExaminer.csproj @@ -71,7 +71,9 @@ PreserveNewest - + + PreserveNewest + PreserveNewest @@ -122,4 +124,9 @@ + + + + + \ No newline at end of file diff --git a/Software/Visual_Studio/Tango.Scripting/Properties/AssemblyInfo.cs b/Software/Visual_Studio/Tango.Scripting/Properties/AssemblyInfo.cs index 1e07fdf79..38561eac1 100644 --- a/Software/Visual_Studio/Tango.Scripting/Properties/AssemblyInfo.cs +++ b/Software/Visual_Studio/Tango.Scripting/Properties/AssemblyInfo.cs @@ -3,5 +3,5 @@ using System.Runtime.CompilerServices; using System.Runtime.InteropServices; [assembly: AssemblyTitle("Tango - Roslyn Scripting Components")] -[assembly: AssemblyVersion("2.0.15.1657")] +[assembly: AssemblyVersion("2.0.20.1933")] [assembly: ComVisible(false)] \ No newline at end of file diff --git a/Software/Visual_Studio/Tango.Serialization/Properties/AssemblyInfo.cs b/Software/Visual_Studio/Tango.Serialization/Properties/AssemblyInfo.cs index ab2ca5698..395dcd0e0 100644 --- a/Software/Visual_Studio/Tango.Serialization/Properties/AssemblyInfo.cs +++ b/Software/Visual_Studio/Tango.Serialization/Properties/AssemblyInfo.cs @@ -3,5 +3,5 @@ using System.Runtime.CompilerServices; using System.Runtime.InteropServices; [assembly: AssemblyTitle("Tango - Serialization Components")] -[assembly: AssemblyVersion("2.0.17.1657")] +[assembly: AssemblyVersion("2.0.22.1933")] [assembly: ComVisible(false)] \ No newline at end of file diff --git a/Software/Visual_Studio/Tango.Settings/Properties/AssemblyInfo.cs b/Software/Visual_Studio/Tango.Settings/Properties/AssemblyInfo.cs index e943f4817..e0348e561 100644 --- a/Software/Visual_Studio/Tango.Settings/Properties/AssemblyInfo.cs +++ b/Software/Visual_Studio/Tango.Settings/Properties/AssemblyInfo.cs @@ -3,5 +3,5 @@ using System.Runtime.CompilerServices; using System.Runtime.InteropServices; [assembly: AssemblyTitle("Tango - Global Settings")] -[assembly: AssemblyVersion("2.0.17.1657")] +[assembly: AssemblyVersion("2.0.22.1933")] [assembly: ComVisible(false)] \ No newline at end of file diff --git a/Software/Visual_Studio/Tango.SharedUI/Properties/AssemblyInfo.cs b/Software/Visual_Studio/Tango.SharedUI/Properties/AssemblyInfo.cs index aed597a02..62e99366d 100644 --- a/Software/Visual_Studio/Tango.SharedUI/Properties/AssemblyInfo.cs +++ b/Software/Visual_Studio/Tango.SharedUI/Properties/AssemblyInfo.cs @@ -5,7 +5,7 @@ using System.Runtime.InteropServices; using System.Windows; [assembly: AssemblyTitle("Tango - Shared UI Components")] -[assembly: AssemblyVersion("2.0.15.1657")] +[assembly: AssemblyVersion("2.0.20.1933")] [assembly: ComVisible(false)] diff --git a/Software/Visual_Studio/Tango.Synchronization/Properties/AssemblyInfo.cs b/Software/Visual_Studio/Tango.Synchronization/Properties/AssemblyInfo.cs index ce4b90578..4b2843ba3 100644 --- a/Software/Visual_Studio/Tango.Synchronization/Properties/AssemblyInfo.cs +++ b/Software/Visual_Studio/Tango.Synchronization/Properties/AssemblyInfo.cs @@ -3,5 +3,5 @@ using System.Runtime.CompilerServices; using System.Runtime.InteropServices; [assembly: AssemblyTitle("Tango - DataBase Synchronization Components")] -[assembly: AssemblyVersion("2.0.6.1407")] +[assembly: AssemblyVersion("2.0.11.1933")] [assembly: ComVisible(false)] \ No newline at end of file diff --git a/Software/Visual_Studio/Tango.TFS/Properties/AssemblyInfo.cs b/Software/Visual_Studio/Tango.TFS/Properties/AssemblyInfo.cs index b7c7b6e7f..835352a03 100644 --- a/Software/Visual_Studio/Tango.TFS/Properties/AssemblyInfo.cs +++ b/Software/Visual_Studio/Tango.TFS/Properties/AssemblyInfo.cs @@ -3,5 +3,5 @@ using System.Runtime.CompilerServices; using System.Runtime.InteropServices; [assembly: AssemblyTitle("Tango - VSTS API Library")] -[assembly: AssemblyVersion("2.0.8.1657")] +[assembly: AssemblyVersion("2.0.13.1933")] [assembly: ComVisible(false)] \ No newline at end of file diff --git a/Software/Visual_Studio/Tango.Transport/Properties/AssemblyInfo.cs b/Software/Visual_Studio/Tango.Transport/Properties/AssemblyInfo.cs index f8e2335be..fad01fc39 100644 --- a/Software/Visual_Studio/Tango.Transport/Properties/AssemblyInfo.cs +++ b/Software/Visual_Studio/Tango.Transport/Properties/AssemblyInfo.cs @@ -3,5 +3,5 @@ using System.Runtime.CompilerServices; using System.Runtime.InteropServices; [assembly: AssemblyTitle("Tango - Transport Components")] -[assembly: AssemblyVersion("2.0.16.1657")] +[assembly: AssemblyVersion("2.0.21.1933")] [assembly: ComVisible(false)] \ No newline at end of file diff --git a/Software/Visual_Studio/Tango.UnitTesting/Properties/AssemblyInfo.cs b/Software/Visual_Studio/Tango.UnitTesting/Properties/AssemblyInfo.cs index 98b8a65d3..6cb3427ef 100644 --- a/Software/Visual_Studio/Tango.UnitTesting/Properties/AssemblyInfo.cs +++ b/Software/Visual_Studio/Tango.UnitTesting/Properties/AssemblyInfo.cs @@ -3,5 +3,5 @@ using System.Runtime.CompilerServices; using System.Runtime.InteropServices; [assembly: AssemblyTitle("Tango - Unit Testing")] -[assembly: AssemblyVersion("2.0.*")] +[assembly: AssemblyVersion("2.0.5.1933")] [assembly: ComVisible(false)] \ No newline at end of file diff --git a/Software/Visual_Studio/Tango.UnitTesting/SQLExaminer_TST.cs b/Software/Visual_Studio/Tango.UnitTesting/SQLExaminer_TST.cs new file mode 100644 index 000000000..3dd38c8e9 --- /dev/null +++ b/Software/Visual_Studio/Tango.UnitTesting/SQLExaminer_TST.cs @@ -0,0 +1,104 @@ +using Microsoft.VisualStudio.TestTools.UnitTesting; +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Tango.Core.IO; +using Tango.SQLExaminer; + +namespace Tango.UnitTesting +{ + [TestClass] + [TestCategory("SQL Examiner")] + public class SQLExaminer_TST + { + [TestMethod] + public void Generate_Schema_Synchronization_Script() + { + ExaminerConfigurationBuilder builder = new ExaminerConfigurationBuilder(ExaminerConfigurationType.Schema); + + var temp_folder = Helper.GetTempFolderPath(); + + builder. + SetSourceServer("localhost\\SQLEXPRESS", "Tango", false, "Synchronizer", "Aa123456"). + SetTargetServer("twine01\\SQLTWINE", "Tango"). + SetBackupFile(Path.Combine(temp_folder, "db.bak")). + SetReportFile(Path.Combine(temp_folder, "report.xml")); + + var config = builder.Build(); + + String config_path = Path.Combine(temp_folder, "schema.xml"); + + config.ToFile(config_path); + + Helper.ShowInExplorer(config_path); + } + + [TestMethod] + public void Generate_Provisioning_Synchronization_Script() + { + ExaminerConfigurationBuilder builder = new ExaminerConfigurationBuilder(ExaminerConfigurationType.ProvisionMachine); + + var temp_folder = Helper.GetTempFolderPath(); + + builder. + SetSourceServer("localhost\\SQLEXPRESS", "Tango", false, "Synchronizer", "Aa123456"). + SetTargetServer("twine01\\SQLTWINE", "Tango"). + SetReportFile(Path.Combine(temp_folder, "report.xml")). + SetMachineSerialNumber("1111"); + + var config = builder.Build(); + + String config_path = Path.Combine(temp_folder, "provision.xml"); + + config.ToFile(config_path); + + Helper.ShowInExplorer(config_path); + } + + [TestMethod] + public void Generate_Data_Overriding_Script() + { + ExaminerConfigurationBuilder builder = new ExaminerConfigurationBuilder(ExaminerConfigurationType.OverrideData); + + var temp_folder = Helper.GetTempFolderPath(); + + builder. + SetSourceServer("localhost\\SQLEXPRESS", "Tango", false, "Synchronizer", "Aa123456"). + SetTargetServer("twine01\\SQLTWINE", "Tango"). + SetReportFile(Path.Combine(temp_folder, "report.xml")); + + var config = builder.Build(); + + String config_path = Path.Combine(temp_folder, "data.xml"); + + config.ToFile(config_path); + + Helper.ShowInExplorer(config_path); + } + + [TestMethod] + public void Synchronize_Schema() + { + ExaminerConfigurationBuilder builder = new ExaminerConfigurationBuilder(ExaminerConfigurationType.Schema); + + var temp_folder = Helper.GetTempFolderPath(); + + builder. + SetSourceServer("localhost\\SQLEXPRESS", "Tango"). + SetTargetServer("localhost\\SQLEXPRESS", "Test"). + SetBackupFile(Path.Combine(temp_folder, "db.bak")). + SetReportFile(Path.Combine(temp_folder, "report.xml")); + + var config = builder.Build(); + + String config_path = Path.Combine(temp_folder, "schema.xml"); + + config.ToFile(config_path); + + Helper.ShowInExplorer(config_path); + } + } +} diff --git a/Software/Visual_Studio/Tango.UnitTesting/Tango.UnitTesting.csproj b/Software/Visual_Studio/Tango.UnitTesting/Tango.UnitTesting.csproj index 634b8a230..b5f1663b1 100644 --- a/Software/Visual_Studio/Tango.UnitTesting/Tango.UnitTesting.csproj +++ b/Software/Visual_Studio/Tango.UnitTesting/Tango.UnitTesting.csproj @@ -95,6 +95,7 @@ + @@ -165,6 +166,10 @@ {d8f1ad85-526a-4f50-b6dc-d437af63d8d8} Tango.Settings + + {e1e66ed9-597d-45fa-8048-de90a6930484} + Tango.SQLExaminer + {7ada4e86-cad7-4968-a210-3a8a9e5153ab} Tango.Synchronization @@ -196,7 +201,7 @@ - + \ No newline at end of file diff --git a/Software/Visual_Studio/Tango.Video/Properties/AssemblyInfo.cs b/Software/Visual_Studio/Tango.Video/Properties/AssemblyInfo.cs index e1751b70a..6f036d55f 100644 --- a/Software/Visual_Studio/Tango.Video/Properties/AssemblyInfo.cs +++ b/Software/Visual_Studio/Tango.Video/Properties/AssemblyInfo.cs @@ -3,5 +3,5 @@ using System.Runtime.CompilerServices; using System.Runtime.InteropServices; [assembly: AssemblyTitle("Tango - Video Components")] -[assembly: AssemblyVersion("2.0.9.1411")] +[assembly: AssemblyVersion("2.0.14.1933")] [assembly: ComVisible(false)] \ No newline at end of file diff --git a/Software/Visual_Studio/Utilities/Tango.DBObservablesGenerator.CLI/Properties/AssemblyInfo.cs b/Software/Visual_Studio/Utilities/Tango.DBObservablesGenerator.CLI/Properties/AssemblyInfo.cs index b4129f320..833d5930c 100644 --- a/Software/Visual_Studio/Utilities/Tango.DBObservablesGenerator.CLI/Properties/AssemblyInfo.cs +++ b/Software/Visual_Studio/Utilities/Tango.DBObservablesGenerator.CLI/Properties/AssemblyInfo.cs @@ -3,5 +3,5 @@ using System.Runtime.CompilerServices; using System.Runtime.InteropServices; [assembly: AssemblyTitle("Tango - DAL Observables Generator")] -[assembly: AssemblyVersion("2.0.*")] +[assembly: AssemblyVersion("2.0.5.1933")] [assembly: ComVisible(false)] \ No newline at end of file diff --git a/Software/Visual_Studio/Utilities/Tango.Protobuf.CLI/Properties/AssemblyInfo.cs b/Software/Visual_Studio/Utilities/Tango.Protobuf.CLI/Properties/AssemblyInfo.cs index 4cd5bafb7..18a7d4b6c 100644 --- a/Software/Visual_Studio/Utilities/Tango.Protobuf.CLI/Properties/AssemblyInfo.cs +++ b/Software/Visual_Studio/Utilities/Tango.Protobuf.CLI/Properties/AssemblyInfo.cs @@ -3,5 +3,5 @@ using System.Runtime.CompilerServices; using System.Runtime.InteropServices; [assembly: AssemblyTitle("Tango - Protobuf Compilation CLI")] -[assembly: AssemblyVersion("2.0.15.1355")] +[assembly: AssemblyVersion("2.0.20.1933")] [assembly: ComVisible(false)] \ No newline at end of file -- cgit v1.3.1