From faa4bd4d8683e3bfc57c6dac6bc2828a36a15916 Mon Sep 17 00:00:00 2001 From: Mike Phares Date: Wed, 31 May 2023 10:14:16 -0700 Subject: [PATCH] v2.49.2 36 Tests Passed nuget server name Added Last and Log10 to json Simplified by adding loop variables Simplified by only drawling using FillEllipse Added GetImageBytes back to prove-in ChartJs --- Adaptation/FileHandlers/json/Log10.cs | 29 +++ Adaptation/FileHandlers/json/ProcessData.cs | 6 +- Adaptation/FileHandlers/json/ProfileHeader.cs | 11 +- Adaptation/FileHandlers/json/ProfilePoint.cs | 30 ++- Adaptation/MET08RESISRP2100-Development.yml | 2 +- .../Staging/v2.49.0/MET08RESISRP2100.cs | 20 -- .../Staging/v2.49.0/SRP-EQPT.cs | 2 - .../Staging/v2.49.0/SRP.cs | 2 - .../Staging/v2.49.2/MET08RESISRP2100.cs | 180 ++++++++++++++++++ .../Staging/v2.49.2/SRP-EQPT.cs | 63 ++++++ .../Staging/v2.49.2/SRP.cs | 63 ++++++ .../Staging/v2.49.0/MET08RESISRP2100.cs | 28 --- .../Extract/Staging/v2.49.0/SRP-EQPT.cs | 4 - .../_Tests/Extract/Staging/v2.49.0/SRP.cs | 4 - .../Staging/v2.49.2/MET08RESISRP2100.cs | 157 +++++++++++++++ .../Extract/Staging/v2.49.2/SRP-EQPT.cs | 56 ++++++ .../_Tests/Extract/Staging/v2.49.2/SRP.cs | 56 ++++++ Adaptation/_Tests/Static/MET08RESISRP2100.cs | 2 +- Adaptation/_Tests/Static/json.cs | 2 +- MET08RESISRP2100.csproj | 3 +- Properties/AssemblyInfo.cs | 4 +- 21 files changed, 646 insertions(+), 78 deletions(-) create mode 100644 Adaptation/FileHandlers/json/Log10.cs create mode 100644 Adaptation/_Tests/CreateSelfDescription/Staging/v2.49.2/MET08RESISRP2100.cs create mode 100644 Adaptation/_Tests/CreateSelfDescription/Staging/v2.49.2/SRP-EQPT.cs create mode 100644 Adaptation/_Tests/CreateSelfDescription/Staging/v2.49.2/SRP.cs create mode 100644 Adaptation/_Tests/Extract/Staging/v2.49.2/MET08RESISRP2100.cs create mode 100644 Adaptation/_Tests/Extract/Staging/v2.49.2/SRP-EQPT.cs create mode 100644 Adaptation/_Tests/Extract/Staging/v2.49.2/SRP.cs diff --git a/Adaptation/FileHandlers/json/Log10.cs b/Adaptation/FileHandlers/json/Log10.cs new file mode 100644 index 0000000..61e539b --- /dev/null +++ b/Adaptation/FileHandlers/json/Log10.cs @@ -0,0 +1,29 @@ +using System; + +namespace Adaptation.FileHandlers.json; + +public class Log10 +{ + +#nullable enable + + public double Depth { get; } + public double ResistanceRaw { get; } + public double? ResistanceEdited { get; } + public double? Resistivity { get; } + public double? Concentration { get; } + + public Log10(double depth, + double raw, + double? edited, + double? resistivity, + double? cd) + { + Depth = Math.Log10(depth); + ResistanceRaw = Math.Log10(raw); + ResistanceEdited = edited is null ? null : Math.Log10(edited.Value); + Resistivity = resistivity is null ? null : Math.Log10(resistivity.Value); + Concentration = cd is null ? null : Math.Log10(cd.Value); + } + +} \ No newline at end of file diff --git a/Adaptation/FileHandlers/json/ProcessData.cs b/Adaptation/FileHandlers/json/ProcessData.cs index 11fd9e8..295f67b 100644 --- a/Adaptation/FileHandlers/json/ProcessData.cs +++ b/Adaptation/FileHandlers/json/ProcessData.cs @@ -275,10 +275,10 @@ public partial class ProcessData : IProcessData UniqueId = string.Concat(uniqueId, "_Point-", profilePoint.Number), Number = profilePoint.Number.ToString(), Depth = profilePoint.Depth.ToString(), - Raw = profilePoint.Raw.ToString(), - Edited = string.Concat(profilePoint.Edited), + Raw = profilePoint.ResistanceRaw.ToString(), + Edited = string.Concat(profilePoint.ResistanceEdited), Resistivity = string.Concat(profilePoint.Resistivity), - CD = string.Concat(profilePoint.CD), + CD = string.Concat(profilePoint.Concentration), }; details.Add(detail); } diff --git a/Adaptation/FileHandlers/json/ProfileHeader.cs b/Adaptation/FileHandlers/json/ProfileHeader.cs index 9b11f8a..7b45f83 100644 --- a/Adaptation/FileHandlers/json/ProfileHeader.cs +++ b/Adaptation/FileHandlers/json/ProfileHeader.cs @@ -5,6 +5,8 @@ namespace Adaptation.FileHandlers.json; public class ProfileHeader { +#nullable enable + public int NumberOfProfiles { get; } public List Profiles { get; } public List ProfilePoints { get; } @@ -14,6 +16,8 @@ public class ProfileHeader Profile profile; ProfilePoint profilePoint; List profiles = new(); + csv.ProfilePoint csvProfilePoint; + ProfilePoint? lastProfilePoint = null; List profilePoints = new(); NumberOfProfiles = int.Parse(profileHeader.NumberOfProfiles); Profiles = profiles; @@ -31,8 +35,9 @@ public class ProfileHeader ); profiles.Add(profile); } - foreach (csv.ProfilePoint csvProfilePoint in profileHeader.ProfilePoints) + for (int i = 0; i < profileHeader.ProfilePoints.Count; i++) { + csvProfilePoint = profileHeader.ProfilePoints[i]; profilePoint = new ( number: int.Parse(csvProfilePoint.Number), @@ -40,9 +45,11 @@ public class ProfileHeader raw: double.Parse(csvProfilePoint.Raw), edited: double.Parse(csvProfilePoint.Edited), resistivity: double.Parse(csvProfilePoint.Resistivity), - cd: double.Parse(csvProfilePoint.CD) + cd: double.Parse(csvProfilePoint.CD), + lastProfilePoint: lastProfilePoint ); profilePoints.Add(profilePoint); + lastProfilePoint = profilePoint; } } diff --git a/Adaptation/FileHandlers/json/ProfilePoint.cs b/Adaptation/FileHandlers/json/ProfilePoint.cs index 4d17c65..ca8aeb1 100644 --- a/Adaptation/FileHandlers/json/ProfilePoint.cs +++ b/Adaptation/FileHandlers/json/ProfilePoint.cs @@ -3,26 +3,42 @@ namespace Adaptation.FileHandlers.json; public class ProfilePoint { +#nullable enable + public int Number { get; } public double Depth { get; } - public double Raw { get; } - public double? Edited { get; } + public double ResistanceRaw { get; } + public double? ResistanceEdited { get; } public double? Resistivity { get; } - public double? CD { get; } + public double? Concentration { get; } + public double? DeltaPercent { get; } + public ProfilePoint? LastProfilePoint { get; } + public Log10? Log10 { get; } public ProfilePoint(int number, double depth, double raw, double? edited, double? resistivity, - double? cd) + double? cd, + ProfilePoint? lastProfilePoint) { Number = number; Depth = depth; - Raw = raw; - Edited = edited; + ResistanceRaw = raw; + ResistanceEdited = edited; Resistivity = resistivity; - CD = cd; + Concentration = cd; + DeltaPercent = lastProfilePoint is null ? null : (lastProfilePoint.ResistanceRaw - raw) / raw; + LastProfilePoint = lastProfilePoint; + Log10 = new + ( + depth: depth, + raw: raw, + edited: edited, + resistivity: resistivity, + cd: cd + ); } } \ No newline at end of file diff --git a/Adaptation/MET08RESISRP2100-Development.yml b/Adaptation/MET08RESISRP2100-Development.yml index 304a356..4dd02b6 100644 --- a/Adaptation/MET08RESISRP2100-Development.yml +++ b/Adaptation/MET08RESISRP2100-Development.yml @@ -26,7 +26,7 @@ steps: displayName: Configuration - script: | - set nugetSource=https://messa017.infineon.com/v3/index.json + set nugetSource=https://eaf-dev-reporting.mes.infineon.com/v3/index.json echo %nugetSource% echo ##vso[task.setvariable variable=NugetSource;]%nugetSource% echo $(NugetSource) diff --git a/Adaptation/_Tests/CreateSelfDescription/Staging/v2.49.0/MET08RESISRP2100.cs b/Adaptation/_Tests/CreateSelfDescription/Staging/v2.49.0/MET08RESISRP2100.cs index 68d7531..98701e7 100644 --- a/Adaptation/_Tests/CreateSelfDescription/Staging/v2.49.0/MET08RESISRP2100.cs +++ b/Adaptation/_Tests/CreateSelfDescription/Staging/v2.49.0/MET08RESISRP2100.cs @@ -47,9 +47,7 @@ public class MET08RESISRP2100 : EAFLoggingUnitTesting EAFLoggingUnitTesting?.Dispose(); } -#if DEBUG [Ignore] -#endif [TestMethod] public void Staging__v2_49_0__MET08RESISRP2100__MoveMatchingFiles() { @@ -60,9 +58,7 @@ public class MET08RESISRP2100 : EAFLoggingUnitTesting EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit")); } -#if DEBUG [Ignore] -#endif [TestMethod] public void Staging__v2_49_0__MET08RESISRP2100__OpenInsightMetrologyViewer() { @@ -73,9 +69,7 @@ public class MET08RESISRP2100 : EAFLoggingUnitTesting EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit")); } -#if DEBUG [Ignore] -#endif [TestMethod] public void Staging__v2_49_0__MET08RESISRP2100__IQSSi() { @@ -86,9 +80,7 @@ public class MET08RESISRP2100 : EAFLoggingUnitTesting EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit")); } -#if DEBUG [Ignore] -#endif [TestMethod] public void Staging__v2_49_0__MET08RESISRP2100__OpenInsight() { @@ -99,9 +91,7 @@ public class MET08RESISRP2100 : EAFLoggingUnitTesting EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit")); } -#if DEBUG [Ignore] -#endif [TestMethod] public void Staging__v2_49_0__MET08RESISRP2100__OpenInsightMetrologyViewerAttachments() { @@ -112,9 +102,7 @@ public class MET08RESISRP2100 : EAFLoggingUnitTesting EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit")); } -#if DEBUG [Ignore] -#endif [TestMethod] public void Staging__v2_49_0__MET08RESISRP2100__APC() { @@ -125,9 +113,7 @@ public class MET08RESISRP2100 : EAFLoggingUnitTesting EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit")); } -#if DEBUG [Ignore] -#endif [TestMethod] public void Staging__v2_49_0__MET08RESISRP2100__SPaCe() { @@ -138,9 +124,7 @@ public class MET08RESISRP2100 : EAFLoggingUnitTesting EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit")); } -#if DEBUG [Ignore] -#endif [TestMethod] public void Staging__v2_49_0__MET08RESISRP2100__Processed() { @@ -151,9 +135,7 @@ public class MET08RESISRP2100 : EAFLoggingUnitTesting EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit")); } -#if DEBUG [Ignore] -#endif [TestMethod] public void Staging__v2_49_0__MET08RESISRP2100__Archive() { @@ -164,9 +146,7 @@ public class MET08RESISRP2100 : EAFLoggingUnitTesting EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit")); } -#if DEBUG [Ignore] -#endif [TestMethod] public void Staging__v2_49_0__MET08RESISRP2100__Dummy() { diff --git a/Adaptation/_Tests/CreateSelfDescription/Staging/v2.49.0/SRP-EQPT.cs b/Adaptation/_Tests/CreateSelfDescription/Staging/v2.49.0/SRP-EQPT.cs index 43a5381..c891dca 100644 --- a/Adaptation/_Tests/CreateSelfDescription/Staging/v2.49.0/SRP-EQPT.cs +++ b/Adaptation/_Tests/CreateSelfDescription/Staging/v2.49.0/SRP-EQPT.cs @@ -47,9 +47,7 @@ public class SRP_EQPT : EAFLoggingUnitTesting EAFLoggingUnitTesting?.Dispose(); } -#if DEBUG [Ignore] -#endif [TestMethod] public void Staging__v2_49_0__SRP_EQPT__csv() { diff --git a/Adaptation/_Tests/CreateSelfDescription/Staging/v2.49.0/SRP.cs b/Adaptation/_Tests/CreateSelfDescription/Staging/v2.49.0/SRP.cs index b1a3480..c58de7d 100644 --- a/Adaptation/_Tests/CreateSelfDescription/Staging/v2.49.0/SRP.cs +++ b/Adaptation/_Tests/CreateSelfDescription/Staging/v2.49.0/SRP.cs @@ -47,9 +47,7 @@ public class SRP : EAFLoggingUnitTesting EAFLoggingUnitTesting?.Dispose(); } -#if DEBUG [Ignore] -#endif [TestMethod] public void Staging__v2_49_0__SRP__json() { diff --git a/Adaptation/_Tests/CreateSelfDescription/Staging/v2.49.2/MET08RESISRP2100.cs b/Adaptation/_Tests/CreateSelfDescription/Staging/v2.49.2/MET08RESISRP2100.cs new file mode 100644 index 0000000..56c540e --- /dev/null +++ b/Adaptation/_Tests/CreateSelfDescription/Staging/v2.49.2/MET08RESISRP2100.cs @@ -0,0 +1,180 @@ +using Adaptation._Tests.Shared; +using Microsoft.Extensions.Logging; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using System; +using System.Diagnostics; +using System.IO; +using System.Reflection; + +namespace Adaptation._Tests.CreateSelfDescription.Staging.v2_49_2; + +[TestClass] +public class MET08RESISRP2100 : EAFLoggingUnitTesting +{ + +#pragma warning disable CA2254 +#pragma warning disable IDE0060 + + internal static string DummyRoot { get; private set; } + internal static MET08RESISRP2100 EAFLoggingUnitTesting { get; private set; } + + static MET08RESISRP2100() => DummyRoot = @"\\messv02ecc1.ec.local\EC_Characterization_Si\Dummy"; + + public MET08RESISRP2100() : base(DummyRoot, testContext: null, declaringType: null, skipEquipmentDictionary: false) + { + if (EAFLoggingUnitTesting is null) + throw new Exception(); + } + + public MET08RESISRP2100(TestContext testContext) : base(DummyRoot, testContext, new StackFrame().GetMethod().DeclaringType, skipEquipmentDictionary: false) + { + } + + [ClassInitialize] + public static void ClassInitialize(TestContext testContext) + { + EAFLoggingUnitTesting ??= new MET08RESISRP2100(testContext); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(testContext.TestName, " - ClassInitialize")); + string[] fileNameAndText = EAFLoggingUnitTesting.AdaptationTesting.GetCSharpText(testContext.TestName); + File.WriteAllText(fileNameAndText[0], fileNameAndText[1]); + File.WriteAllText(fileNameAndText[2], fileNameAndText[3]); + } + + [ClassCleanup()] + public static void ClassCleanup() + { + EAFLoggingUnitTesting?.Logger?.LogInformation("Cleanup"); + EAFLoggingUnitTesting?.Dispose(); + } + +#if DEBUG + [Ignore] +#endif + [TestMethod] + public void Staging__v2_49_2__MET08RESISRP2100__MoveMatchingFiles() + { + string check = "*.pdsf"; + MethodBase methodBase = new StackFrame().GetMethod(); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration")); + _ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit")); + } + +#if DEBUG + [Ignore] +#endif + [TestMethod] + public void Staging__v2_49_2__MET08RESISRP2100__OpenInsightMetrologyViewer() + { + string check = "*.pdsf"; + MethodBase methodBase = new StackFrame().GetMethod(); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration")); + _ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit")); + } + +#if DEBUG + [Ignore] +#endif + [TestMethod] + public void Staging__v2_49_2__MET08RESISRP2100__IQSSi() + { + string check = "*.pdsf"; + MethodBase methodBase = new StackFrame().GetMethod(); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration")); + _ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit")); + } + +#if DEBUG + [Ignore] +#endif + [TestMethod] + public void Staging__v2_49_2__MET08RESISRP2100__OpenInsight() + { + string check = "*.pdsf"; + MethodBase methodBase = new StackFrame().GetMethod(); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration")); + _ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit")); + } + +#if DEBUG + [Ignore] +#endif + [TestMethod] + public void Staging__v2_49_2__MET08RESISRP2100__OpenInsightMetrologyViewerAttachments() + { + string check = "*.pdsf"; + MethodBase methodBase = new StackFrame().GetMethod(); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration")); + _ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit")); + } + +#if DEBUG + [Ignore] +#endif + [TestMethod] + public void Staging__v2_49_2__MET08RESISRP2100__APC() + { + string check = "*.pdsf"; + MethodBase methodBase = new StackFrame().GetMethod(); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration")); + _ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit")); + } + +#if DEBUG + [Ignore] +#endif + [TestMethod] + public void Staging__v2_49_2__MET08RESISRP2100__SPaCe() + { + string check = "*.pdsf"; + MethodBase methodBase = new StackFrame().GetMethod(); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration")); + _ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit")); + } + +#if DEBUG + [Ignore] +#endif + [TestMethod] + public void Staging__v2_49_2__MET08RESISRP2100__Processed() + { + string check = "*.pdsf"; + MethodBase methodBase = new StackFrame().GetMethod(); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration")); + _ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit")); + } + +#if DEBUG + [Ignore] +#endif + [TestMethod] + public void Staging__v2_49_2__MET08RESISRP2100__Archive() + { + string check = "*.pdsf"; + MethodBase methodBase = new StackFrame().GetMethod(); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration")); + _ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit")); + } + +#if DEBUG + [Ignore] +#endif + [TestMethod] + public void Staging__v2_49_2__MET08RESISRP2100__Dummy() + { + string check = "638191594841489860.zip"; + MethodBase methodBase = new StackFrame().GetMethod(); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration")); + _ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit")); + } + +} \ No newline at end of file diff --git a/Adaptation/_Tests/CreateSelfDescription/Staging/v2.49.2/SRP-EQPT.cs b/Adaptation/_Tests/CreateSelfDescription/Staging/v2.49.2/SRP-EQPT.cs new file mode 100644 index 0000000..7219c7d --- /dev/null +++ b/Adaptation/_Tests/CreateSelfDescription/Staging/v2.49.2/SRP-EQPT.cs @@ -0,0 +1,63 @@ +using Adaptation._Tests.Shared; +using Microsoft.Extensions.Logging; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using System; +using System.Diagnostics; +using System.IO; +using System.Reflection; + +namespace Adaptation._Tests.CreateSelfDescription.Staging.v2_49_2; + +[TestClass] +public class SRP_EQPT : EAFLoggingUnitTesting +{ + +#pragma warning disable CA2254 +#pragma warning disable IDE0060 + + internal static string DummyRoot { get; private set; } + internal static SRP_EQPT EAFLoggingUnitTesting { get; private set; } + + static SRP_EQPT() => DummyRoot = @"\\messv02ecc1.ec.local\EC_Characterization_Si\Dummy"; + + public SRP_EQPT() : base(DummyRoot, testContext: null, declaringType: null, skipEquipmentDictionary: false) + { + if (EAFLoggingUnitTesting is null) + throw new Exception(); + } + + public SRP_EQPT(TestContext testContext) : base(DummyRoot, testContext, new StackFrame().GetMethod().DeclaringType, skipEquipmentDictionary: false) + { + } + + [ClassInitialize] + public static void ClassInitialize(TestContext testContext) + { + EAFLoggingUnitTesting ??= new SRP_EQPT(testContext); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(testContext.TestName, " - ClassInitialize")); + string[] fileNameAndText = EAFLoggingUnitTesting.AdaptationTesting.GetCSharpText(testContext.TestName); + File.WriteAllText(fileNameAndText[0], fileNameAndText[1]); + File.WriteAllText(fileNameAndText[2], fileNameAndText[3]); + } + + [ClassCleanup()] + public static void ClassCleanup() + { + EAFLoggingUnitTesting?.Logger?.LogInformation("Cleanup"); + EAFLoggingUnitTesting?.Dispose(); + } + +#if DEBUG + [Ignore] +#endif + [TestMethod] + public void Staging__v2_49_2__SRP_EQPT__csv() + { + string check = "*.csv"; + MethodBase methodBase = new StackFrame().GetMethod(); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration")); + _ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit")); + } + +} \ No newline at end of file diff --git a/Adaptation/_Tests/CreateSelfDescription/Staging/v2.49.2/SRP.cs b/Adaptation/_Tests/CreateSelfDescription/Staging/v2.49.2/SRP.cs new file mode 100644 index 0000000..20f804a --- /dev/null +++ b/Adaptation/_Tests/CreateSelfDescription/Staging/v2.49.2/SRP.cs @@ -0,0 +1,63 @@ +using Adaptation._Tests.Shared; +using Microsoft.Extensions.Logging; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using System; +using System.Diagnostics; +using System.IO; +using System.Reflection; + +namespace Adaptation._Tests.CreateSelfDescription.Staging.v2_49_2; + +[TestClass] +public class SRP : EAFLoggingUnitTesting +{ + +#pragma warning disable CA2254 +#pragma warning disable IDE0060 + + internal static string DummyRoot { get; private set; } + internal static SRP EAFLoggingUnitTesting { get; private set; } + + static SRP() => DummyRoot = @"\\messv02ecc1.ec.local\EC_Characterization_Si\Dummy"; + + public SRP() : base(DummyRoot, testContext: null, declaringType: null, skipEquipmentDictionary: false) + { + if (EAFLoggingUnitTesting is null) + throw new Exception(); + } + + public SRP(TestContext testContext) : base(DummyRoot, testContext, new StackFrame().GetMethod().DeclaringType, skipEquipmentDictionary: false) + { + } + + [ClassInitialize] + public static void ClassInitialize(TestContext testContext) + { + EAFLoggingUnitTesting ??= new SRP(testContext); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(testContext.TestName, " - ClassInitialize")); + string[] fileNameAndText = EAFLoggingUnitTesting.AdaptationTesting.GetCSharpText(testContext.TestName); + File.WriteAllText(fileNameAndText[0], fileNameAndText[1]); + File.WriteAllText(fileNameAndText[2], fileNameAndText[3]); + } + + [ClassCleanup()] + public static void ClassCleanup() + { + EAFLoggingUnitTesting?.Logger?.LogInformation("Cleanup"); + EAFLoggingUnitTesting?.Dispose(); + } + +#if DEBUG + [Ignore] +#endif + [TestMethod] + public void Staging__v2_49_2__SRP__json() + { + string check = "*.json"; + MethodBase methodBase = new StackFrame().GetMethod(); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration")); + _ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit")); + } + +} \ No newline at end of file diff --git a/Adaptation/_Tests/Extract/Staging/v2.49.0/MET08RESISRP2100.cs b/Adaptation/_Tests/Extract/Staging/v2.49.0/MET08RESISRP2100.cs index b1a58c3..fa94156 100644 --- a/Adaptation/_Tests/Extract/Staging/v2.49.0/MET08RESISRP2100.cs +++ b/Adaptation/_Tests/Extract/Staging/v2.49.0/MET08RESISRP2100.cs @@ -30,21 +30,15 @@ public class MET08RESISRP2100 catch (Exception) { } } -#if DEBUG [Ignore] -#endif [TestMethod] public void Staging__v2_49_0__MET08RESISRP2100__MoveMatchingFiles() => _MET08RESISRP2100.Staging__v2_49_0__MET08RESISRP2100__MoveMatchingFiles(); -#if DEBUG [Ignore] -#endif [TestMethod] public void Staging__v2_49_0__MET08RESISRP2100__OpenInsightMetrologyViewer() => _MET08RESISRP2100.Staging__v2_49_0__MET08RESISRP2100__OpenInsightMetrologyViewer(); -#if DEBUG [Ignore] -#endif [TestMethod] public void Staging__v2_49_0__MET08RESISRP2100__OpenInsightMetrologyViewer638191594841489860__First() { @@ -58,15 +52,11 @@ public class MET08RESISRP2100 NonThrowTryCatch(); } -#if DEBUG [Ignore] -#endif [TestMethod] public void Staging__v2_49_0__MET08RESISRP2100__IQSSi() => _MET08RESISRP2100.Staging__v2_49_0__MET08RESISRP2100__IQSSi(); -#if DEBUG [Ignore] -#endif [TestMethod] public void Staging__v2_49_0__MET08RESISRP2100__IQSSi638191594841489860__First() { @@ -80,15 +70,11 @@ public class MET08RESISRP2100 NonThrowTryCatch(); } -#if DEBUG [Ignore] -#endif [TestMethod] public void Staging__v2_49_0__MET08RESISRP2100__OpenInsight() => _MET08RESISRP2100.Staging__v2_49_0__MET08RESISRP2100__OpenInsight(); -#if DEBUG [Ignore] -#endif [TestMethod] public void Staging__v2_49_0__MET08RESISRP2100__OpenInsight638191594841489860__First() { @@ -102,15 +88,11 @@ public class MET08RESISRP2100 NonThrowTryCatch(); } -#if DEBUG [Ignore] -#endif [TestMethod] public void Staging__v2_49_0__MET08RESISRP2100__OpenInsightMetrologyViewerAttachments() => _MET08RESISRP2100.Staging__v2_49_0__MET08RESISRP2100__OpenInsightMetrologyViewerAttachments(); -#if DEBUG [Ignore] -#endif [TestMethod] public void Staging__v2_49_0__MET08RESISRP2100__OpenInsightMetrologyViewerAttachments638191594841489860__First() { @@ -124,33 +106,23 @@ public class MET08RESISRP2100 NonThrowTryCatch(); } -#if DEBUG [Ignore] -#endif [TestMethod] public void Staging__v2_49_0__MET08RESISRP2100__APC() => _MET08RESISRP2100.Staging__v2_49_0__MET08RESISRP2100__APC(); -#if DEBUG [Ignore] -#endif [TestMethod] public void Staging__v2_49_0__MET08RESISRP2100__SPaCe() => _MET08RESISRP2100.Staging__v2_49_0__MET08RESISRP2100__SPaCe(); -#if DEBUG [Ignore] -#endif [TestMethod] public void Staging__v2_49_0__MET08RESISRP2100__Processed() => _MET08RESISRP2100.Staging__v2_49_0__MET08RESISRP2100__Processed(); -#if DEBUG [Ignore] -#endif [TestMethod] public void Staging__v2_49_0__MET08RESISRP2100__Archive() => _MET08RESISRP2100.Staging__v2_49_0__MET08RESISRP2100__Archive(); -#if DEBUG [Ignore] -#endif [TestMethod] public void Staging__v2_49_0__MET08RESISRP2100__Dummy() => _MET08RESISRP2100.Staging__v2_49_0__MET08RESISRP2100__Dummy(); diff --git a/Adaptation/_Tests/Extract/Staging/v2.49.0/SRP-EQPT.cs b/Adaptation/_Tests/Extract/Staging/v2.49.0/SRP-EQPT.cs index 21fdb4d..ade5722 100644 --- a/Adaptation/_Tests/Extract/Staging/v2.49.0/SRP-EQPT.cs +++ b/Adaptation/_Tests/Extract/Staging/v2.49.0/SRP-EQPT.cs @@ -30,15 +30,11 @@ public class SRP_EQPT catch (Exception) { } } -#if DEBUG [Ignore] -#endif [TestMethod] public void Staging__v2_49_0__SRP_EQPT__csv() => _SRP_EQPT.Staging__v2_49_0__SRP_EQPT__csv(); -#if DEBUG [Ignore] -#endif [TestMethod] public void Staging__v2_49_0__SRP_EQPT__csv638185594063339969__First() { diff --git a/Adaptation/_Tests/Extract/Staging/v2.49.0/SRP.cs b/Adaptation/_Tests/Extract/Staging/v2.49.0/SRP.cs index ee0358f..b813eb8 100644 --- a/Adaptation/_Tests/Extract/Staging/v2.49.0/SRP.cs +++ b/Adaptation/_Tests/Extract/Staging/v2.49.0/SRP.cs @@ -30,15 +30,11 @@ public class SRP catch (Exception) { } } -#if DEBUG [Ignore] -#endif [TestMethod] public void Staging__v2_49_0__SRP__json() => _SRP.Staging__v2_49_0__SRP__json(); -#if DEBUG [Ignore] -#endif [TestMethod] public void Staging__v2_49_0__SRP__json638185594063339969__First() { diff --git a/Adaptation/_Tests/Extract/Staging/v2.49.2/MET08RESISRP2100.cs b/Adaptation/_Tests/Extract/Staging/v2.49.2/MET08RESISRP2100.cs new file mode 100644 index 0000000..be8189b --- /dev/null +++ b/Adaptation/_Tests/Extract/Staging/v2.49.2/MET08RESISRP2100.cs @@ -0,0 +1,157 @@ +using Adaptation.Shared; +using Adaptation.Shared.Methods; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using System; +using System.Diagnostics; +using System.Reflection; + +namespace Adaptation._Tests.Extract.Staging.v2_49_2; + +[TestClass] +public class MET08RESISRP2100 +{ + +#pragma warning disable CA2254 +#pragma warning disable IDE0060 + + private static CreateSelfDescription.Staging.v2_49_2.MET08RESISRP2100 _MET08RESISRP2100; + + [ClassInitialize] + public static void ClassInitialize(TestContext testContext) + { + CreateSelfDescription.Staging.v2_49_2.MET08RESISRP2100.ClassInitialize(testContext); + _MET08RESISRP2100 = CreateSelfDescription.Staging.v2_49_2.MET08RESISRP2100.EAFLoggingUnitTesting; + } + + private static void NonThrowTryCatch() + { + try + { throw new Exception(); } + catch (Exception) { } + } + +#if DEBUG + [Ignore] +#endif + [TestMethod] + public void Staging__v2_49_2__MET08RESISRP2100__MoveMatchingFiles() => _MET08RESISRP2100.Staging__v2_49_2__MET08RESISRP2100__MoveMatchingFiles(); + +#if DEBUG + [Ignore] +#endif + [TestMethod] + public void Staging__v2_49_2__MET08RESISRP2100__OpenInsightMetrologyViewer() => _MET08RESISRP2100.Staging__v2_49_2__MET08RESISRP2100__OpenInsightMetrologyViewer(); + +#if DEBUG + [Ignore] +#endif + [TestMethod] + public void Staging__v2_49_2__MET08RESISRP2100__OpenInsightMetrologyViewer638191594841489860__First() + { + string check = "*.pdsf"; + MethodBase methodBase = new StackFrame().GetMethod(); + _MET08RESISRP2100.Staging__v2_49_2__MET08RESISRP2100__OpenInsightMetrologyViewer(); + string[] variables = _MET08RESISRP2100.AdaptationTesting.GetVariables(methodBase, check, validatePDSF: false); + IFileRead fileRead = _MET08RESISRP2100.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false); + Logistics logistics = new(fileRead); + _ = Shared.AdaptationTesting.ReExtractCompareUpdatePassDirectory(variables, fileRead, logistics); + NonThrowTryCatch(); + } + +#if DEBUG + [Ignore] +#endif + [TestMethod] + public void Staging__v2_49_2__MET08RESISRP2100__IQSSi() => _MET08RESISRP2100.Staging__v2_49_2__MET08RESISRP2100__IQSSi(); + +#if DEBUG + [Ignore] +#endif + [TestMethod] + public void Staging__v2_49_2__MET08RESISRP2100__IQSSi638191594841489860__First() + { + string check = "*.pdsf"; + MethodBase methodBase = new StackFrame().GetMethod(); + _MET08RESISRP2100.Staging__v2_49_2__MET08RESISRP2100__IQSSi(); + string[] variables = _MET08RESISRP2100.AdaptationTesting.GetVariables(methodBase, check, validatePDSF: false); + IFileRead fileRead = _MET08RESISRP2100.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false); + Logistics logistics = new(fileRead); + _ = Shared.AdaptationTesting.ReExtractCompareUpdatePassDirectory(variables, fileRead, logistics); + NonThrowTryCatch(); + } + +#if DEBUG + [Ignore] +#endif + [TestMethod] + public void Staging__v2_49_2__MET08RESISRP2100__OpenInsight() => _MET08RESISRP2100.Staging__v2_49_2__MET08RESISRP2100__OpenInsight(); + +#if DEBUG + [Ignore] +#endif + [TestMethod] + public void Staging__v2_49_2__MET08RESISRP2100__OpenInsight638191594841489860__First() + { + string check = "*.pdsf"; + MethodBase methodBase = new StackFrame().GetMethod(); + _MET08RESISRP2100.Staging__v2_49_2__MET08RESISRP2100__OpenInsight(); + string[] variables = _MET08RESISRP2100.AdaptationTesting.GetVariables(methodBase, check, validatePDSF: false); + IFileRead fileRead = _MET08RESISRP2100.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false); + Logistics logistics = new(fileRead); + _ = Shared.AdaptationTesting.ReExtractCompareUpdatePassDirectory(variables, fileRead, logistics); + NonThrowTryCatch(); + } + +#if DEBUG + [Ignore] +#endif + [TestMethod] + public void Staging__v2_49_2__MET08RESISRP2100__OpenInsightMetrologyViewerAttachments() => _MET08RESISRP2100.Staging__v2_49_2__MET08RESISRP2100__OpenInsightMetrologyViewerAttachments(); + +#if DEBUG + [Ignore] +#endif + [TestMethod] + public void Staging__v2_49_2__MET08RESISRP2100__OpenInsightMetrologyViewerAttachments638191594841489860__First() + { + string check = "*.pdsf"; + MethodBase methodBase = new StackFrame().GetMethod(); + _MET08RESISRP2100.Staging__v2_49_2__MET08RESISRP2100__OpenInsightMetrologyViewerAttachments(); + string[] variables = _MET08RESISRP2100.AdaptationTesting.GetVariables(methodBase, check, validatePDSF: false); + IFileRead fileRead = _MET08RESISRP2100.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false); + Logistics logistics = new(fileRead); + _ = Shared.AdaptationTesting.ReExtractCompareUpdatePassDirectory(variables, fileRead, logistics); + NonThrowTryCatch(); + } + +#if DEBUG + [Ignore] +#endif + [TestMethod] + public void Staging__v2_49_2__MET08RESISRP2100__APC() => _MET08RESISRP2100.Staging__v2_49_2__MET08RESISRP2100__APC(); + +#if DEBUG + [Ignore] +#endif + [TestMethod] + public void Staging__v2_49_2__MET08RESISRP2100__SPaCe() => _MET08RESISRP2100.Staging__v2_49_2__MET08RESISRP2100__SPaCe(); + +#if DEBUG + [Ignore] +#endif + [TestMethod] + public void Staging__v2_49_2__MET08RESISRP2100__Processed() => _MET08RESISRP2100.Staging__v2_49_2__MET08RESISRP2100__Processed(); + +#if DEBUG + [Ignore] +#endif + [TestMethod] + public void Staging__v2_49_2__MET08RESISRP2100__Archive() => _MET08RESISRP2100.Staging__v2_49_2__MET08RESISRP2100__Archive(); + +#if DEBUG + [Ignore] +#endif + [TestMethod] + public void Staging__v2_49_2__MET08RESISRP2100__Dummy() => _MET08RESISRP2100.Staging__v2_49_2__MET08RESISRP2100__Dummy(); + +} \ No newline at end of file diff --git a/Adaptation/_Tests/Extract/Staging/v2.49.2/SRP-EQPT.cs b/Adaptation/_Tests/Extract/Staging/v2.49.2/SRP-EQPT.cs new file mode 100644 index 0000000..7009aed --- /dev/null +++ b/Adaptation/_Tests/Extract/Staging/v2.49.2/SRP-EQPT.cs @@ -0,0 +1,56 @@ +using Adaptation.Shared; +using Adaptation.Shared.Methods; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using System; +using System.Diagnostics; +using System.Reflection; + +namespace Adaptation._Tests.Extract.Staging.v2_49_2; + +[TestClass] +public class SRP_EQPT +{ + +#pragma warning disable CA2254 +#pragma warning disable IDE0060 + + private static CreateSelfDescription.Staging.v2_49_2.SRP_EQPT _SRP_EQPT; + + [ClassInitialize] + public static void ClassInitialize(TestContext testContext) + { + CreateSelfDescription.Staging.v2_49_2.SRP_EQPT.ClassInitialize(testContext); + _SRP_EQPT = CreateSelfDescription.Staging.v2_49_2.SRP_EQPT.EAFLoggingUnitTesting; + } + + private static void NonThrowTryCatch() + { + try + { throw new Exception(); } + catch (Exception) { } + } + +#if DEBUG + [Ignore] +#endif + [TestMethod] + public void Staging__v2_49_2__SRP_EQPT__csv() => _SRP_EQPT.Staging__v2_49_2__SRP_EQPT__csv(); + +#if DEBUG + [Ignore] +#endif + [TestMethod] + public void Staging__v2_49_2__SRP_EQPT__csv638185594063339969__First() + { + string check = "*.csv"; + bool validatePDSF = false; + _SRP_EQPT.Staging__v2_49_2__SRP_EQPT__csv(); + MethodBase methodBase = new StackFrame().GetMethod(); + string[] variables = _SRP_EQPT.AdaptationTesting.GetVariables(methodBase, check, validatePDSF); + IFileRead fileRead = _SRP_EQPT.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false); + Logistics logistics = new(fileRead); + _ = Shared.AdaptationTesting.ReExtractCompareUpdatePassDirectory(variables, fileRead, logistics, validatePDSF); + NonThrowTryCatch(); + } + +} \ No newline at end of file diff --git a/Adaptation/_Tests/Extract/Staging/v2.49.2/SRP.cs b/Adaptation/_Tests/Extract/Staging/v2.49.2/SRP.cs new file mode 100644 index 0000000..05b4b89 --- /dev/null +++ b/Adaptation/_Tests/Extract/Staging/v2.49.2/SRP.cs @@ -0,0 +1,56 @@ +using Adaptation.Shared; +using Adaptation.Shared.Methods; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using System; +using System.Diagnostics; +using System.Reflection; + +namespace Adaptation._Tests.Extract.Staging.v2_49_2; + +[TestClass] +public class SRP +{ + +#pragma warning disable CA2254 +#pragma warning disable IDE0060 + + private static CreateSelfDescription.Staging.v2_49_2.SRP _SRP; + + [ClassInitialize] + public static void ClassInitialize(TestContext testContext) + { + CreateSelfDescription.Staging.v2_49_2.SRP.ClassInitialize(testContext); + _SRP = CreateSelfDescription.Staging.v2_49_2.SRP.EAFLoggingUnitTesting; + } + + private static void NonThrowTryCatch() + { + try + { throw new Exception(); } + catch (Exception) { } + } + +#if DEBUG + [Ignore] +#endif + [TestMethod] + public void Staging__v2_49_2__SRP__json() => _SRP.Staging__v2_49_2__SRP__json(); + +#if DEBUG + [Ignore] +#endif + [TestMethod] + public void Staging__v2_49_2__SRP__json638185594063339969__First() + { + string check = "*.json"; + bool validatePDSF = false; + _SRP.Staging__v2_49_2__SRP__json(); + MethodBase methodBase = new StackFrame().GetMethod(); + string[] variables = _SRP.AdaptationTesting.GetVariables(methodBase, check, validatePDSF); + IFileRead fileRead = _SRP.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false); + Logistics logistics = new(fileRead); + _ = Shared.AdaptationTesting.ReExtractCompareUpdatePassDirectory(variables, fileRead, logistics, validatePDSF); + NonThrowTryCatch(); + } + +} \ No newline at end of file diff --git a/Adaptation/_Tests/Static/MET08RESISRP2100.cs b/Adaptation/_Tests/Static/MET08RESISRP2100.cs index 86f0091..932c636 100644 --- a/Adaptation/_Tests/Static/MET08RESISRP2100.cs +++ b/Adaptation/_Tests/Static/MET08RESISRP2100.cs @@ -64,7 +64,7 @@ public class MET08RESISRP2100 : LoggingUnitTesting, IDisposable StringBuilder results = new(); (string cellInstanceName, string cellInstanceVersionName)[] collection = new (string, string)[] { - new("MET08RESISRP2100", "v2.49.0"), + new("MET08RESISRP2100", "v2.49.2"), }; string staging = "http://mestsa07ec.ec.local:9003/CellInstanceServiceV2"; Shared.PasteSpecialXml.EAF.XML.API.CellInstance.CellInstanceVersion cellInstanceVersion; diff --git a/Adaptation/_Tests/Static/json.cs b/Adaptation/_Tests/Static/json.cs index cd72991..6590317 100644 --- a/Adaptation/_Tests/Static/json.cs +++ b/Adaptation/_Tests/Static/json.cs @@ -205,7 +205,7 @@ public class JSON : LoggingUnitTesting, IDisposable StringBuilder results = new(); (string cellInstanceName, string cellInstanceVersionName)[] collection = new (string, string)[] { - new("SRP", "v2.49.0"), + new("SRP", "v2.49.2"), }; string staging = "http://mestsa07ec.ec.local:9003/CellInstanceServiceV2"; Shared.PasteSpecialXml.EAF.XML.API.CellInstance.CellInstanceVersion cellInstanceVersion; diff --git a/MET08RESISRP2100.csproj b/MET08RESISRP2100.csproj index 1e28844..972cb0e 100644 --- a/MET08RESISRP2100.csproj +++ b/MET08RESISRP2100.csproj @@ -133,6 +133,7 @@ + @@ -197,7 +198,7 @@ - 2.49.0 + 2.49.2 6.0.3 diff --git a/Properties/AssemblyInfo.cs b/Properties/AssemblyInfo.cs index b889c5b..0aa1d07 100644 --- a/Properties/AssemblyInfo.cs +++ b/Properties/AssemblyInfo.cs @@ -32,5 +32,5 @@ using System.Runtime.InteropServices; // 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("2.49.0.0")] -[assembly: AssemblyFileVersion("2.49.0.0")] +[assembly: AssemblyVersion("2.49.2.0")] +[assembly: AssemblyFileVersion("2.49.2.0")]