From 65d93ded96bd2e15f7ebe297a670aa16645a8c3d Mon Sep 17 00:00:00 2001 From: Mike Phares Date: Mon, 13 Feb 2023 07:10:19 -0700 Subject: [PATCH] Change int dotnet test --- .../Staging/v2.36.1/CDE2.cs | 2 +- .../Staging/v2.36.1/CDE3-EQPT.cs | 2 +- .../Staging/v2.36.1/CDE3.cs | 2 +- .../Staging/v2.36.1/CDE5.cs | 2 +- .../Staging/v2.36.1/MET08RESIMAPCDE.cs | 2 +- .../Staging/v2.39.0/CDE2.cs | 2 +- .../Staging/v2.39.0/CDE3-EQPT.cs | 2 +- .../Staging/v2.39.0/CDE3.cs | 2 +- .../Staging/v2.39.0/CDE5.cs | 2 +- .../Staging/v2.39.0/MET08RESIMAPCDE.cs | 2 +- .../Staging/v2.43.2/CDE2.cs | 2 +- .../Staging/v2.43.2/CDE3-EQPT.cs | 2 +- .../Staging/v2.43.2/CDE3.cs | 2 +- .../Staging/v2.43.2/CDE5.cs | 2 +- .../Staging/v2.43.2/MET08RESIMAPCDE.cs | 2 +- .../Staging/v2.43.3/CDE5-EQPT.cs | 2 +- .../Staging/v2.43.3/CDE5.cs | 2 +- .../Staging/v2.43.4/CDE2.cs | 2 +- .../Staging/v2.43.4/CDE5.cs | 2 +- .../Staging/v2.43.4/MET08RESIMAPCDE.cs | 2 +- .../Staging/v2.47.0/CDE2.cs | 2 +- .../Staging/v2.47.0/CDE5.cs | 2 +- .../Staging/v2.47.1/MET08RESIMAPCDE.cs | 2 +- .../Staging/v2.47.2/CDE6-EQPT.cs | 2 +- .../Staging/v2.47.2/CDE6.cs | 2 +- .../_Tests/Shared/LoggingUnitTesting.cs | 2 +- Adaptation/_Tests/Shared/UnitTesting.cs | 51 ++++++++++--------- Adaptation/_Tests/Static/MET08RESIMAPCDE.cs | 2 +- Adaptation/_Tests/Static/RsM.cs | 2 +- Adaptation/_Tests/Static/txt.cs | 2 +- 30 files changed, 56 insertions(+), 53 deletions(-) diff --git a/Adaptation/_Tests/CreateSelfDescription/Staging/v2.36.1/CDE2.cs b/Adaptation/_Tests/CreateSelfDescription/Staging/v2.36.1/CDE2.cs index 41ab38e..22894d3 100644 --- a/Adaptation/_Tests/CreateSelfDescription/Staging/v2.36.1/CDE2.cs +++ b/Adaptation/_Tests/CreateSelfDescription/Staging/v2.36.1/CDE2.cs @@ -42,7 +42,7 @@ public class CDE2 : EAFLoggingUnitTesting [ClassCleanup()] public static void ClassCleanup() { - EAFLoggingUnitTesting.Logger?.LogInformation("Cleanup"); + EAFLoggingUnitTesting?.Logger?.LogInformation("Cleanup"); EAFLoggingUnitTesting?.Dispose(); } diff --git a/Adaptation/_Tests/CreateSelfDescription/Staging/v2.36.1/CDE3-EQPT.cs b/Adaptation/_Tests/CreateSelfDescription/Staging/v2.36.1/CDE3-EQPT.cs index 62d5171..9df5b33 100644 --- a/Adaptation/_Tests/CreateSelfDescription/Staging/v2.36.1/CDE3-EQPT.cs +++ b/Adaptation/_Tests/CreateSelfDescription/Staging/v2.36.1/CDE3-EQPT.cs @@ -43,7 +43,7 @@ public class CDE3_EQPT : EAFLoggingUnitTesting [ClassCleanup()] public static void ClassCleanup() { - EAFLoggingUnitTesting.Logger?.LogInformation("Cleanup"); + EAFLoggingUnitTesting?.Logger?.LogInformation("Cleanup"); EAFLoggingUnitTesting?.Dispose(); } diff --git a/Adaptation/_Tests/CreateSelfDescription/Staging/v2.36.1/CDE3.cs b/Adaptation/_Tests/CreateSelfDescription/Staging/v2.36.1/CDE3.cs index 3002142..9da1bf5 100644 --- a/Adaptation/_Tests/CreateSelfDescription/Staging/v2.36.1/CDE3.cs +++ b/Adaptation/_Tests/CreateSelfDescription/Staging/v2.36.1/CDE3.cs @@ -43,7 +43,7 @@ public class CDE3 : EAFLoggingUnitTesting [ClassCleanup()] public static void ClassCleanup() { - EAFLoggingUnitTesting.Logger?.LogInformation("Cleanup"); + EAFLoggingUnitTesting?.Logger?.LogInformation("Cleanup"); EAFLoggingUnitTesting?.Dispose(); } diff --git a/Adaptation/_Tests/CreateSelfDescription/Staging/v2.36.1/CDE5.cs b/Adaptation/_Tests/CreateSelfDescription/Staging/v2.36.1/CDE5.cs index 6bb1fb6..12a54ce 100644 --- a/Adaptation/_Tests/CreateSelfDescription/Staging/v2.36.1/CDE5.cs +++ b/Adaptation/_Tests/CreateSelfDescription/Staging/v2.36.1/CDE5.cs @@ -42,7 +42,7 @@ public class CDE5 : EAFLoggingUnitTesting [ClassCleanup()] public static void ClassCleanup() { - EAFLoggingUnitTesting.Logger?.LogInformation("Cleanup"); + EAFLoggingUnitTesting?.Logger?.LogInformation("Cleanup"); EAFLoggingUnitTesting?.Dispose(); } diff --git a/Adaptation/_Tests/CreateSelfDescription/Staging/v2.36.1/MET08RESIMAPCDE.cs b/Adaptation/_Tests/CreateSelfDescription/Staging/v2.36.1/MET08RESIMAPCDE.cs index 9f79bc4..31137d7 100644 --- a/Adaptation/_Tests/CreateSelfDescription/Staging/v2.36.1/MET08RESIMAPCDE.cs +++ b/Adaptation/_Tests/CreateSelfDescription/Staging/v2.36.1/MET08RESIMAPCDE.cs @@ -43,7 +43,7 @@ public class MET08RESIMAPCDE : EAFLoggingUnitTesting [ClassCleanup()] public static void ClassCleanup() { - EAFLoggingUnitTesting.Logger?.LogInformation("Cleanup"); + EAFLoggingUnitTesting?.Logger?.LogInformation("Cleanup"); EAFLoggingUnitTesting?.Dispose(); } diff --git a/Adaptation/_Tests/CreateSelfDescription/Staging/v2.39.0/CDE2.cs b/Adaptation/_Tests/CreateSelfDescription/Staging/v2.39.0/CDE2.cs index b94ca4a..a9b4018 100644 --- a/Adaptation/_Tests/CreateSelfDescription/Staging/v2.39.0/CDE2.cs +++ b/Adaptation/_Tests/CreateSelfDescription/Staging/v2.39.0/CDE2.cs @@ -42,7 +42,7 @@ public class CDE2 : EAFLoggingUnitTesting [ClassCleanup()] public static void ClassCleanup() { - EAFLoggingUnitTesting.Logger?.LogInformation("Cleanup"); + EAFLoggingUnitTesting?.Logger?.LogInformation("Cleanup"); EAFLoggingUnitTesting?.Dispose(); } diff --git a/Adaptation/_Tests/CreateSelfDescription/Staging/v2.39.0/CDE3-EQPT.cs b/Adaptation/_Tests/CreateSelfDescription/Staging/v2.39.0/CDE3-EQPT.cs index e95b539..93ab0d1 100644 --- a/Adaptation/_Tests/CreateSelfDescription/Staging/v2.39.0/CDE3-EQPT.cs +++ b/Adaptation/_Tests/CreateSelfDescription/Staging/v2.39.0/CDE3-EQPT.cs @@ -43,7 +43,7 @@ public class CDE3_EQPT : EAFLoggingUnitTesting [ClassCleanup()] public static void ClassCleanup() { - EAFLoggingUnitTesting.Logger?.LogInformation("Cleanup"); + EAFLoggingUnitTesting?.Logger?.LogInformation("Cleanup"); EAFLoggingUnitTesting?.Dispose(); } diff --git a/Adaptation/_Tests/CreateSelfDescription/Staging/v2.39.0/CDE3.cs b/Adaptation/_Tests/CreateSelfDescription/Staging/v2.39.0/CDE3.cs index 1a01f0a..59af67a 100644 --- a/Adaptation/_Tests/CreateSelfDescription/Staging/v2.39.0/CDE3.cs +++ b/Adaptation/_Tests/CreateSelfDescription/Staging/v2.39.0/CDE3.cs @@ -43,7 +43,7 @@ public class CDE3 : EAFLoggingUnitTesting [ClassCleanup()] public static void ClassCleanup() { - EAFLoggingUnitTesting.Logger?.LogInformation("Cleanup"); + EAFLoggingUnitTesting?.Logger?.LogInformation("Cleanup"); EAFLoggingUnitTesting?.Dispose(); } diff --git a/Adaptation/_Tests/CreateSelfDescription/Staging/v2.39.0/CDE5.cs b/Adaptation/_Tests/CreateSelfDescription/Staging/v2.39.0/CDE5.cs index d01b183..cd023ad 100644 --- a/Adaptation/_Tests/CreateSelfDescription/Staging/v2.39.0/CDE5.cs +++ b/Adaptation/_Tests/CreateSelfDescription/Staging/v2.39.0/CDE5.cs @@ -42,7 +42,7 @@ public class CDE5 : EAFLoggingUnitTesting [ClassCleanup()] public static void ClassCleanup() { - EAFLoggingUnitTesting.Logger?.LogInformation("Cleanup"); + EAFLoggingUnitTesting?.Logger?.LogInformation("Cleanup"); EAFLoggingUnitTesting?.Dispose(); } diff --git a/Adaptation/_Tests/CreateSelfDescription/Staging/v2.39.0/MET08RESIMAPCDE.cs b/Adaptation/_Tests/CreateSelfDescription/Staging/v2.39.0/MET08RESIMAPCDE.cs index 8702c7c..e80b4c4 100644 --- a/Adaptation/_Tests/CreateSelfDescription/Staging/v2.39.0/MET08RESIMAPCDE.cs +++ b/Adaptation/_Tests/CreateSelfDescription/Staging/v2.39.0/MET08RESIMAPCDE.cs @@ -43,7 +43,7 @@ public class MET08RESIMAPCDE : EAFLoggingUnitTesting [ClassCleanup()] public static void ClassCleanup() { - EAFLoggingUnitTesting.Logger?.LogInformation("Cleanup"); + EAFLoggingUnitTesting?.Logger?.LogInformation("Cleanup"); EAFLoggingUnitTesting?.Dispose(); } diff --git a/Adaptation/_Tests/CreateSelfDescription/Staging/v2.43.2/CDE2.cs b/Adaptation/_Tests/CreateSelfDescription/Staging/v2.43.2/CDE2.cs index ce18633..9054da8 100644 --- a/Adaptation/_Tests/CreateSelfDescription/Staging/v2.43.2/CDE2.cs +++ b/Adaptation/_Tests/CreateSelfDescription/Staging/v2.43.2/CDE2.cs @@ -42,7 +42,7 @@ public class CDE2 : EAFLoggingUnitTesting [ClassCleanup()] public static void ClassCleanup() { - EAFLoggingUnitTesting.Logger?.LogInformation("Cleanup"); + EAFLoggingUnitTesting?.Logger?.LogInformation("Cleanup"); EAFLoggingUnitTesting?.Dispose(); } diff --git a/Adaptation/_Tests/CreateSelfDescription/Staging/v2.43.2/CDE3-EQPT.cs b/Adaptation/_Tests/CreateSelfDescription/Staging/v2.43.2/CDE3-EQPT.cs index 1ec0695..6a10138 100644 --- a/Adaptation/_Tests/CreateSelfDescription/Staging/v2.43.2/CDE3-EQPT.cs +++ b/Adaptation/_Tests/CreateSelfDescription/Staging/v2.43.2/CDE3-EQPT.cs @@ -43,7 +43,7 @@ public class CDE3_EQPT : EAFLoggingUnitTesting [ClassCleanup()] public static void ClassCleanup() { - EAFLoggingUnitTesting.Logger?.LogInformation("Cleanup"); + EAFLoggingUnitTesting?.Logger?.LogInformation("Cleanup"); EAFLoggingUnitTesting?.Dispose(); } diff --git a/Adaptation/_Tests/CreateSelfDescription/Staging/v2.43.2/CDE3.cs b/Adaptation/_Tests/CreateSelfDescription/Staging/v2.43.2/CDE3.cs index 1ed888e..e65ff91 100644 --- a/Adaptation/_Tests/CreateSelfDescription/Staging/v2.43.2/CDE3.cs +++ b/Adaptation/_Tests/CreateSelfDescription/Staging/v2.43.2/CDE3.cs @@ -43,7 +43,7 @@ public class CDE3 : EAFLoggingUnitTesting [ClassCleanup()] public static void ClassCleanup() { - EAFLoggingUnitTesting.Logger?.LogInformation("Cleanup"); + EAFLoggingUnitTesting?.Logger?.LogInformation("Cleanup"); EAFLoggingUnitTesting?.Dispose(); } diff --git a/Adaptation/_Tests/CreateSelfDescription/Staging/v2.43.2/CDE5.cs b/Adaptation/_Tests/CreateSelfDescription/Staging/v2.43.2/CDE5.cs index 443c894..b97aa4d 100644 --- a/Adaptation/_Tests/CreateSelfDescription/Staging/v2.43.2/CDE5.cs +++ b/Adaptation/_Tests/CreateSelfDescription/Staging/v2.43.2/CDE5.cs @@ -42,7 +42,7 @@ public class CDE5 : EAFLoggingUnitTesting [ClassCleanup()] public static void ClassCleanup() { - EAFLoggingUnitTesting.Logger?.LogInformation("Cleanup"); + EAFLoggingUnitTesting?.Logger?.LogInformation("Cleanup"); EAFLoggingUnitTesting?.Dispose(); } diff --git a/Adaptation/_Tests/CreateSelfDescription/Staging/v2.43.2/MET08RESIMAPCDE.cs b/Adaptation/_Tests/CreateSelfDescription/Staging/v2.43.2/MET08RESIMAPCDE.cs index 41a75b4..52c915a 100644 --- a/Adaptation/_Tests/CreateSelfDescription/Staging/v2.43.2/MET08RESIMAPCDE.cs +++ b/Adaptation/_Tests/CreateSelfDescription/Staging/v2.43.2/MET08RESIMAPCDE.cs @@ -43,7 +43,7 @@ public class MET08RESIMAPCDE : EAFLoggingUnitTesting [ClassCleanup()] public static void ClassCleanup() { - EAFLoggingUnitTesting.Logger?.LogInformation("Cleanup"); + EAFLoggingUnitTesting?.Logger?.LogInformation("Cleanup"); EAFLoggingUnitTesting?.Dispose(); } diff --git a/Adaptation/_Tests/CreateSelfDescription/Staging/v2.43.3/CDE5-EQPT.cs b/Adaptation/_Tests/CreateSelfDescription/Staging/v2.43.3/CDE5-EQPT.cs index a8bdd09..b16dd44 100644 --- a/Adaptation/_Tests/CreateSelfDescription/Staging/v2.43.3/CDE5-EQPT.cs +++ b/Adaptation/_Tests/CreateSelfDescription/Staging/v2.43.3/CDE5-EQPT.cs @@ -43,7 +43,7 @@ public class CDE5_EQPT : EAFLoggingUnitTesting [ClassCleanup()] public static void ClassCleanup() { - EAFLoggingUnitTesting.Logger?.LogInformation("Cleanup"); + EAFLoggingUnitTesting?.Logger?.LogInformation("Cleanup"); EAFLoggingUnitTesting?.Dispose(); } diff --git a/Adaptation/_Tests/CreateSelfDescription/Staging/v2.43.3/CDE5.cs b/Adaptation/_Tests/CreateSelfDescription/Staging/v2.43.3/CDE5.cs index e0a723e..d2696ff 100644 --- a/Adaptation/_Tests/CreateSelfDescription/Staging/v2.43.3/CDE5.cs +++ b/Adaptation/_Tests/CreateSelfDescription/Staging/v2.43.3/CDE5.cs @@ -43,7 +43,7 @@ public class CDE5 : EAFLoggingUnitTesting [ClassCleanup()] public static void ClassCleanup() { - EAFLoggingUnitTesting.Logger?.LogInformation("Cleanup"); + EAFLoggingUnitTesting?.Logger?.LogInformation("Cleanup"); EAFLoggingUnitTesting?.Dispose(); } diff --git a/Adaptation/_Tests/CreateSelfDescription/Staging/v2.43.4/CDE2.cs b/Adaptation/_Tests/CreateSelfDescription/Staging/v2.43.4/CDE2.cs index 29d95a1..fd5ed81 100644 --- a/Adaptation/_Tests/CreateSelfDescription/Staging/v2.43.4/CDE2.cs +++ b/Adaptation/_Tests/CreateSelfDescription/Staging/v2.43.4/CDE2.cs @@ -43,7 +43,7 @@ public class CDE2 : EAFLoggingUnitTesting [ClassCleanup()] public static void ClassCleanup() { - EAFLoggingUnitTesting.Logger?.LogInformation("Cleanup"); + EAFLoggingUnitTesting?.Logger?.LogInformation("Cleanup"); EAFLoggingUnitTesting?.Dispose(); } diff --git a/Adaptation/_Tests/CreateSelfDescription/Staging/v2.43.4/CDE5.cs b/Adaptation/_Tests/CreateSelfDescription/Staging/v2.43.4/CDE5.cs index 4d8586a..a1b3f73 100644 --- a/Adaptation/_Tests/CreateSelfDescription/Staging/v2.43.4/CDE5.cs +++ b/Adaptation/_Tests/CreateSelfDescription/Staging/v2.43.4/CDE5.cs @@ -43,7 +43,7 @@ public class CDE5 : EAFLoggingUnitTesting [ClassCleanup()] public static void ClassCleanup() { - EAFLoggingUnitTesting.Logger?.LogInformation("Cleanup"); + EAFLoggingUnitTesting?.Logger?.LogInformation("Cleanup"); EAFLoggingUnitTesting?.Dispose(); } diff --git a/Adaptation/_Tests/CreateSelfDescription/Staging/v2.43.4/MET08RESIMAPCDE.cs b/Adaptation/_Tests/CreateSelfDescription/Staging/v2.43.4/MET08RESIMAPCDE.cs index 1736c00..16acffa 100644 --- a/Adaptation/_Tests/CreateSelfDescription/Staging/v2.43.4/MET08RESIMAPCDE.cs +++ b/Adaptation/_Tests/CreateSelfDescription/Staging/v2.43.4/MET08RESIMAPCDE.cs @@ -43,7 +43,7 @@ public class MET08RESIMAPCDE : EAFLoggingUnitTesting [ClassCleanup()] public static void ClassCleanup() { - EAFLoggingUnitTesting.Logger?.LogInformation("Cleanup"); + EAFLoggingUnitTesting?.Logger?.LogInformation("Cleanup"); EAFLoggingUnitTesting?.Dispose(); } diff --git a/Adaptation/_Tests/CreateSelfDescription/Staging/v2.47.0/CDE2.cs b/Adaptation/_Tests/CreateSelfDescription/Staging/v2.47.0/CDE2.cs index d06e2da..1c2e81c 100644 --- a/Adaptation/_Tests/CreateSelfDescription/Staging/v2.47.0/CDE2.cs +++ b/Adaptation/_Tests/CreateSelfDescription/Staging/v2.47.0/CDE2.cs @@ -43,7 +43,7 @@ public class CDE2 : EAFLoggingUnitTesting [ClassCleanup()] public static void ClassCleanup() { - EAFLoggingUnitTesting.Logger?.LogInformation("Cleanup"); + EAFLoggingUnitTesting?.Logger?.LogInformation("Cleanup"); EAFLoggingUnitTesting?.Dispose(); } diff --git a/Adaptation/_Tests/CreateSelfDescription/Staging/v2.47.0/CDE5.cs b/Adaptation/_Tests/CreateSelfDescription/Staging/v2.47.0/CDE5.cs index ea16b04..b03486c 100644 --- a/Adaptation/_Tests/CreateSelfDescription/Staging/v2.47.0/CDE5.cs +++ b/Adaptation/_Tests/CreateSelfDescription/Staging/v2.47.0/CDE5.cs @@ -43,7 +43,7 @@ public class CDE5 : EAFLoggingUnitTesting [ClassCleanup()] public static void ClassCleanup() { - EAFLoggingUnitTesting.Logger?.LogInformation("Cleanup"); + EAFLoggingUnitTesting?.Logger?.LogInformation("Cleanup"); EAFLoggingUnitTesting?.Dispose(); } diff --git a/Adaptation/_Tests/CreateSelfDescription/Staging/v2.47.1/MET08RESIMAPCDE.cs b/Adaptation/_Tests/CreateSelfDescription/Staging/v2.47.1/MET08RESIMAPCDE.cs index 7a1d5ac..ddfb903 100644 --- a/Adaptation/_Tests/CreateSelfDescription/Staging/v2.47.1/MET08RESIMAPCDE.cs +++ b/Adaptation/_Tests/CreateSelfDescription/Staging/v2.47.1/MET08RESIMAPCDE.cs @@ -43,7 +43,7 @@ public class MET08RESIMAPCDE : EAFLoggingUnitTesting [ClassCleanup()] public static void ClassCleanup() { - EAFLoggingUnitTesting.Logger?.LogInformation("Cleanup"); + EAFLoggingUnitTesting?.Logger?.LogInformation("Cleanup"); EAFLoggingUnitTesting?.Dispose(); } diff --git a/Adaptation/_Tests/CreateSelfDescription/Staging/v2.47.2/CDE6-EQPT.cs b/Adaptation/_Tests/CreateSelfDescription/Staging/v2.47.2/CDE6-EQPT.cs index 3d3a725..5aa908b 100644 --- a/Adaptation/_Tests/CreateSelfDescription/Staging/v2.47.2/CDE6-EQPT.cs +++ b/Adaptation/_Tests/CreateSelfDescription/Staging/v2.47.2/CDE6-EQPT.cs @@ -43,7 +43,7 @@ public class CDE6_EQPT : EAFLoggingUnitTesting [ClassCleanup()] public static void ClassCleanup() { - EAFLoggingUnitTesting.Logger?.LogInformation("Cleanup"); + EAFLoggingUnitTesting?.Logger?.LogInformation("Cleanup"); EAFLoggingUnitTesting?.Dispose(); } diff --git a/Adaptation/_Tests/CreateSelfDescription/Staging/v2.47.2/CDE6.cs b/Adaptation/_Tests/CreateSelfDescription/Staging/v2.47.2/CDE6.cs index 0d4d4dd..d4ef8d8 100644 --- a/Adaptation/_Tests/CreateSelfDescription/Staging/v2.47.2/CDE6.cs +++ b/Adaptation/_Tests/CreateSelfDescription/Staging/v2.47.2/CDE6.cs @@ -43,7 +43,7 @@ public class CDE6 : EAFLoggingUnitTesting [ClassCleanup()] public static void ClassCleanup() { - EAFLoggingUnitTesting.Logger?.LogInformation("Cleanup"); + EAFLoggingUnitTesting?.Logger?.LogInformation("Cleanup"); EAFLoggingUnitTesting?.Dispose(); } diff --git a/Adaptation/_Tests/Shared/LoggingUnitTesting.cs b/Adaptation/_Tests/Shared/LoggingUnitTesting.cs index f5c6a40..9628850 100644 --- a/Adaptation/_Tests/Shared/LoggingUnitTesting.cs +++ b/Adaptation/_Tests/Shared/LoggingUnitTesting.cs @@ -26,7 +26,7 @@ public class LoggingUnitTesting : UnitTesting, IDisposable base(testContext, declaringType) { _LoggerFactory = new LoggerFactory(); - if (testContext is null || declaringType is null) + if (testContext is null || declaringType is null || _IsEnvironment is null) { _ConfigurationRoot = null; _DefaultLogLevel = null; diff --git a/Adaptation/_Tests/Shared/UnitTesting.cs b/Adaptation/_Tests/Shared/UnitTesting.cs index 38cf36f..1833834 100644 --- a/Adaptation/_Tests/Shared/UnitTesting.cs +++ b/Adaptation/_Tests/Shared/UnitTesting.cs @@ -29,40 +29,45 @@ public class UnitTesting { string waitFor = "\"WaitFor\":"; string projectDirectory = GetProjectDirectory(testContext); - _TestContextPropertiesAsJson = JsonSerializer.Serialize(testContext.Properties, new JsonSerializerOptions { WriteIndented = true }); - _HasWaitForProperty = _TestContextPropertiesAsJson.Contains(waitFor); - string vsCodeDirectory = Path.Combine(projectDirectory, ".vscode"); - if (!Directory.Exists(vsCodeDirectory)) - _ = Directory.CreateDirectory(vsCodeDirectory); - string launchText = GetLaunchText(); - File.WriteAllText(Path.Combine(vsCodeDirectory, "launch.json"), launchText); - if (_HasWaitForProperty) + if (string.IsNullOrEmpty(projectDirectory)) + _IsEnvironment = null; + else { - for (int i = 0; i < int.MaxValue; i++) + _TestContextPropertiesAsJson = JsonSerializer.Serialize(testContext.Properties, new JsonSerializerOptions { WriteIndented = true }); + _HasWaitForProperty = _TestContextPropertiesAsJson.Contains(waitFor); + string vsCodeDirectory = Path.Combine(projectDirectory, ".vscode"); + if (!Directory.Exists(vsCodeDirectory)) + _ = Directory.CreateDirectory(vsCodeDirectory); + string launchText = GetLaunchText(); + File.WriteAllText(Path.Combine(vsCodeDirectory, "launch.json"), launchText); + if (_HasWaitForProperty) { - if (!_TestContextPropertiesAsJson.Contains($"{waitFor} \"Debugger.IsAttached\"") || Debugger.IsAttached) - break; - Thread.Sleep(500); + for (int i = 0; i < int.MaxValue; i++) + { + if (!_TestContextPropertiesAsJson.Contains($"{waitFor} \"Debugger.IsAttached\"") || Debugger.IsAttached) + break; + Thread.Sleep(500); + } } - } - MethodBase methodBase = declaringType.GetMethod(testContext.TestName); - if (methodBase is not null) - { - TestCategoryAttribute testCategoryAttribute = methodBase.GetCustomAttribute(); - if (testCategoryAttribute is not null) + MethodBase methodBase = declaringType.GetMethod(testContext.TestName); + if (methodBase is not null) { - foreach (string testCategory in testCategoryAttribute.TestCategories) - _IsEnvironment = new IsEnvironment(testCategory); + TestCategoryAttribute testCategoryAttribute = methodBase.GetCustomAttribute(); + if (testCategoryAttribute is not null) + { + foreach (string testCategory in testCategoryAttribute.TestCategories) + _IsEnvironment = new IsEnvironment(testCategory); + } } + _IsEnvironment ??= new IsEnvironment(processesCount: null, nullASPNetCoreEnvironmentIsDevelopment: Debugger.IsAttached, nullASPNetCoreEnvironmentIsProduction: !Debugger.IsAttached); } - _IsEnvironment ??= new IsEnvironment(processesCount: null, nullASPNetCoreEnvironmentIsDevelopment: Debugger.IsAttached, nullASPNetCoreEnvironmentIsProduction: !Debugger.IsAttached); } } internal static string GetProjectDirectory(TestContext testContext) { string result; - string[] checkFiles = null; + string[] checkFiles; result = Path.GetDirectoryName(testContext.DeploymentDirectory); for (int i = 0; i < int.MaxValue; i++) { @@ -73,8 +78,6 @@ public class UnitTesting break; result = Path.GetDirectoryName(result); } - if (string.IsNullOrEmpty(result) || checkFiles is null || !checkFiles.Any()) - throw new Exception(result); return result; } diff --git a/Adaptation/_Tests/Static/MET08RESIMAPCDE.cs b/Adaptation/_Tests/Static/MET08RESIMAPCDE.cs index 31b1f3c..147a769 100644 --- a/Adaptation/_Tests/Static/MET08RESIMAPCDE.cs +++ b/Adaptation/_Tests/Static/MET08RESIMAPCDE.cs @@ -34,7 +34,7 @@ public class MET08RESIMAPCDE : LoggingUnitTesting, IDisposable [ClassCleanup()] public static void ClassCleanup() { - LoggingUnitTesting.Logger?.LogInformation("Cleanup"); + LoggingUnitTesting?.Logger?.LogInformation("Cleanup"); LoggingUnitTesting?.Dispose(); } diff --git a/Adaptation/_Tests/Static/RsM.cs b/Adaptation/_Tests/Static/RsM.cs index bf1f2fd..aa4254f 100644 --- a/Adaptation/_Tests/Static/RsM.cs +++ b/Adaptation/_Tests/Static/RsM.cs @@ -34,7 +34,7 @@ public class RsM : LoggingUnitTesting, IDisposable [ClassCleanup()] public static void ClassCleanup() { - LoggingUnitTesting.Logger?.LogInformation("Cleanup"); + LoggingUnitTesting?.Logger?.LogInformation("Cleanup"); LoggingUnitTesting?.Dispose(); } diff --git a/Adaptation/_Tests/Static/txt.cs b/Adaptation/_Tests/Static/txt.cs index 5ece9e1..f626c2d 100644 --- a/Adaptation/_Tests/Static/txt.cs +++ b/Adaptation/_Tests/Static/txt.cs @@ -34,7 +34,7 @@ public class TXT : LoggingUnitTesting, IDisposable [ClassCleanup()] public static void ClassCleanup() { - LoggingUnitTesting.Logger?.LogInformation("Cleanup"); + LoggingUnitTesting?.Logger?.LogInformation("Cleanup"); LoggingUnitTesting?.Dispose(); }