From cc0e0c996515468be03eeeba6ef968704270c8d2 Mon Sep 17 00:00:00 2001 From: Mike Phares Date: Mon, 29 Apr 2024 14:16:49 -0700 Subject: [PATCH] Tests passed --- Adaptation/.vscode/tasks.json | 2 +- Adaptation/DEP08SIHTRPLC.Tests.csproj | 3 + .../Staging/v2.43.0/DEP08SIHTRPLC.cs | 6 +- .../Staging/v2.52.0/DEP08SIHTRPLC.cs | 6 +- .../Staging/v2.56.0/DEP08SIHTRPLC.cs | 63 +++++++++++++++++++ .../Extract/Staging/v2.43.0/DEP08SIHTRPLC.cs | 6 +- .../Extract/Staging/v2.52.0/DEP08SIHTRPLC.cs | 6 +- .../Extract/Staging/v2.56.0/DEP08SIHTRPLC.cs | 29 +++++++++ Adaptation/_Tests/Static/DEP08SIHTRPLC.cs | 2 +- DEP08SIHTRPLC.csproj | 8 ++- 10 files changed, 120 insertions(+), 11 deletions(-) create mode 100644 Adaptation/_Tests/CreateSelfDescription/Staging/v2.56.0/DEP08SIHTRPLC.cs create mode 100644 Adaptation/_Tests/Extract/Staging/v2.56.0/DEP08SIHTRPLC.cs diff --git a/Adaptation/.vscode/tasks.json b/Adaptation/.vscode/tasks.json index 4e591cd..69ca100 100644 --- a/Adaptation/.vscode/tasks.json +++ b/Adaptation/.vscode/tasks.json @@ -46,7 +46,7 @@ "args": [ "/target:Build", "/restore:True", - "/p:RestoreSources=https://api.nuget.org/v3/index.json%3Bhttps://packagemanagement.eu.infineon.com:4430/api/v2/%3Bhttps://tfs.intra.infineon.com/tfs/ManufacturingIT/_packaging/eaf/nuget/v3/index.json%3Bhttps://localhost/v3/index.json", + "/p:RestoreSources=https://artifactory.intra.infineon.com/artifactory/api/nuget/ngt-fi-package-main-vir/%3Bhttps://packagemanagement.eu.infineon.com:4430/api/v2/%3Bhttps://tfs.intra.infineon.com/tfs/ManufacturingIT/_packaging/eaf/nuget/v3/index.json%3Bhttps://tfs.intra.infineon.com/tfs/FactoryIntegration/_packaging/EAF%40Local/nuget/v3/index.json%3Bhttps://api.nuget.org/v3/index.json", "/detailedsummary", "/consoleloggerparameters:PerformanceSummary;ErrorsOnly;", "/property:Configuration=Debug;TargetFrameworkVersion=v4.8", diff --git a/Adaptation/DEP08SIHTRPLC.Tests.csproj b/Adaptation/DEP08SIHTRPLC.Tests.csproj index 753f7de..9decac2 100644 --- a/Adaptation/DEP08SIHTRPLC.Tests.csproj +++ b/Adaptation/DEP08SIHTRPLC.Tests.csproj @@ -31,6 +31,9 @@ Linux + + + diff --git a/Adaptation/_Tests/CreateSelfDescription/Staging/v2.43.0/DEP08SIHTRPLC.cs b/Adaptation/_Tests/CreateSelfDescription/Staging/v2.43.0/DEP08SIHTRPLC.cs index 5589fb9..d2be69f 100644 --- a/Adaptation/_Tests/CreateSelfDescription/Staging/v2.43.0/DEP08SIHTRPLC.cs +++ b/Adaptation/_Tests/CreateSelfDescription/Staging/v2.43.0/DEP08SIHTRPLC.cs @@ -1,3 +1,4 @@ +#if v2_43_0 using Adaptation._Tests.Shared; using Microsoft.Extensions.Logging; using Microsoft.VisualStudio.TestTools.UnitTesting; @@ -45,7 +46,7 @@ public class DEP08SIHTRPLC : EAFLoggingUnitTesting EAFLoggingUnitTesting?.Dispose(); } -#if true +#if DEBUG [Ignore] #endif [TestMethod] @@ -58,4 +59,5 @@ public class DEP08SIHTRPLC : EAFLoggingUnitTesting EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit")); } -} \ No newline at end of file +} +#endif \ No newline at end of file diff --git a/Adaptation/_Tests/CreateSelfDescription/Staging/v2.52.0/DEP08SIHTRPLC.cs b/Adaptation/_Tests/CreateSelfDescription/Staging/v2.52.0/DEP08SIHTRPLC.cs index bb4112f..43c9872 100644 --- a/Adaptation/_Tests/CreateSelfDescription/Staging/v2.52.0/DEP08SIHTRPLC.cs +++ b/Adaptation/_Tests/CreateSelfDescription/Staging/v2.52.0/DEP08SIHTRPLC.cs @@ -1,3 +1,4 @@ +#if v2_52_0 using Adaptation._Tests.Shared; using Microsoft.Extensions.Logging; using Microsoft.VisualStudio.TestTools.UnitTesting; @@ -45,7 +46,7 @@ public class DEP08SIHTRPLC : EAFLoggingUnitTesting EAFLoggingUnitTesting?.Dispose(); } -#if true +#if DEBUG [Ignore] #endif [TestMethod] @@ -58,4 +59,5 @@ public class DEP08SIHTRPLC : EAFLoggingUnitTesting EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit")); } -} \ No newline at end of file +} +#endif \ No newline at end of file diff --git a/Adaptation/_Tests/CreateSelfDescription/Staging/v2.56.0/DEP08SIHTRPLC.cs b/Adaptation/_Tests/CreateSelfDescription/Staging/v2.56.0/DEP08SIHTRPLC.cs new file mode 100644 index 0000000..d885566 --- /dev/null +++ b/Adaptation/_Tests/CreateSelfDescription/Staging/v2.56.0/DEP08SIHTRPLC.cs @@ -0,0 +1,63 @@ +#if true +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_56_0; + +[TestClass] +public class DEP08SIHTRPLC : EAFLoggingUnitTesting +{ + +#pragma warning disable CA2254 +#pragma warning disable IDE0060 + + internal static string DummyRoot { get; private set; } + internal static DEP08SIHTRPLC EAFLoggingUnitTesting { get; private set; } + + public DEP08SIHTRPLC() : base(DummyRoot, testContext: null, declaringType: null, skipEquipmentDictionary: false) + { + if (EAFLoggingUnitTesting is null) + throw new Exception(); + } + + public DEP08SIHTRPLC(TestContext testContext) : base(DummyRoot, testContext, new StackFrame().GetMethod().DeclaringType, skipEquipmentDictionary: false) + { + } + + [ClassInitialize] + public static void ClassInitialize(TestContext testContext) + { + EAFLoggingUnitTesting ??= new DEP08SIHTRPLC(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_56_0__DEP08SIHTRPLC__ZipFilesByDate() + { + 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")); + } + +} +#endif diff --git a/Adaptation/_Tests/Extract/Staging/v2.43.0/DEP08SIHTRPLC.cs b/Adaptation/_Tests/Extract/Staging/v2.43.0/DEP08SIHTRPLC.cs index c454539..f092f4e 100644 --- a/Adaptation/_Tests/Extract/Staging/v2.43.0/DEP08SIHTRPLC.cs +++ b/Adaptation/_Tests/Extract/Staging/v2.43.0/DEP08SIHTRPLC.cs @@ -1,3 +1,4 @@ +#if v2_43_0 using Microsoft.VisualStudio.TestTools.UnitTesting; namespace Adaptation._Tests.Extract.Staging.v2_43_0; @@ -18,10 +19,11 @@ public class DEP08SIHTRPLC _DEP08SIHTRPLC = CreateSelfDescription.Staging.v2_43_0.DEP08SIHTRPLC.EAFLoggingUnitTesting; } -#if true +#if DEBUG [Ignore] #endif [TestMethod] public void Staging__v2_43_0__DEP08SIHTRPLC__ZipFilesByDate() => _DEP08SIHTRPLC.Staging__v2_43_0__DEP08SIHTRPLC__ZipFilesByDate(); -} \ No newline at end of file +} +#endif \ No newline at end of file diff --git a/Adaptation/_Tests/Extract/Staging/v2.52.0/DEP08SIHTRPLC.cs b/Adaptation/_Tests/Extract/Staging/v2.52.0/DEP08SIHTRPLC.cs index d5991fa..e37d236 100644 --- a/Adaptation/_Tests/Extract/Staging/v2.52.0/DEP08SIHTRPLC.cs +++ b/Adaptation/_Tests/Extract/Staging/v2.52.0/DEP08SIHTRPLC.cs @@ -1,3 +1,4 @@ +#if v2_52_0 using Microsoft.VisualStudio.TestTools.UnitTesting; namespace Adaptation._Tests.Extract.Staging.v2_52_0; @@ -18,10 +19,11 @@ public class DEP08SIHTRPLC _DEP08SIHTRPLC = CreateSelfDescription.Staging.v2_52_0.DEP08SIHTRPLC.EAFLoggingUnitTesting; } -#if true +#if DEBUG [Ignore] #endif [TestMethod] public void Staging__v2_52_0__DEP08SIHTRPLC__ZipFilesByDate() => _DEP08SIHTRPLC.Staging__v2_52_0__DEP08SIHTRPLC__ZipFilesByDate(); -} \ No newline at end of file +} +#endif \ No newline at end of file diff --git a/Adaptation/_Tests/Extract/Staging/v2.56.0/DEP08SIHTRPLC.cs b/Adaptation/_Tests/Extract/Staging/v2.56.0/DEP08SIHTRPLC.cs new file mode 100644 index 0000000..14dc64c --- /dev/null +++ b/Adaptation/_Tests/Extract/Staging/v2.56.0/DEP08SIHTRPLC.cs @@ -0,0 +1,29 @@ +#if true +using Microsoft.VisualStudio.TestTools.UnitTesting; + +namespace Adaptation._Tests.Extract.Staging.v2_56_0; + +[TestClass] +public class DEP08SIHTRPLC +{ + +#pragma warning disable CA2254 +#pragma warning disable IDE0060 + + private static CreateSelfDescription.Staging.v2_56_0.DEP08SIHTRPLC _DEP08SIHTRPLC; + + [ClassInitialize] + public static void ClassInitialize(TestContext testContext) + { + CreateSelfDescription.Staging.v2_56_0.DEP08SIHTRPLC.ClassInitialize(testContext); + _DEP08SIHTRPLC = CreateSelfDescription.Staging.v2_56_0.DEP08SIHTRPLC.EAFLoggingUnitTesting; + } + +#if DEBUG + [Ignore] +#endif + [TestMethod] + public void Staging__v2_56_0__DEP08SIHTRPLC__ZipFilesByDate() => _DEP08SIHTRPLC.Staging__v2_56_0__DEP08SIHTRPLC__ZipFilesByDate(); + +} +#endif diff --git a/Adaptation/_Tests/Static/DEP08SIHTRPLC.cs b/Adaptation/_Tests/Static/DEP08SIHTRPLC.cs index 58e9513..b19de64 100644 --- a/Adaptation/_Tests/Static/DEP08SIHTRPLC.cs +++ b/Adaptation/_Tests/Static/DEP08SIHTRPLC.cs @@ -64,7 +64,7 @@ public class DEP08SIHTRPLC : LoggingUnitTesting, IDisposable StringBuilder results = new(); (string cellInstanceName, string cellInstanceVersionName)[] collection = new (string, string)[] { - new("DEP08SIHTRPLC", "v2.52.0"), + new("DEP08SIHTRPLC", "v2.56.0"), }; string staging = "http://mestsa07ec.infineon.com:9003/CellInstanceServiceV2"; Shared.PasteSpecialXml.EAF.XML.API.CellInstance.CellInstanceVersion cellInstanceVersion; diff --git a/DEP08SIHTRPLC.csproj b/DEP08SIHTRPLC.csproj index cd2f8c4..d921f90 100644 --- a/DEP08SIHTRPLC.csproj +++ b/DEP08SIHTRPLC.csproj @@ -39,6 +39,12 @@ prompt 4 + + NETFRAMEWORK;NET20;NET35;NET40;NET45;NET451;NET452;NET46;NET461;NET462;NET47;NET471;NET472;NET48;$(DefineConstants) + + + + @@ -144,7 +150,7 @@ 4.7.0 - 2.52.0 + 2.56.0 1.6.1