Can't run tests local

This commit is contained in:
2024-05-03 16:10:24 -07:00
parent 9d76773ae5
commit cfdf757a42
18 changed files with 654 additions and 159 deletions

View File

@ -0,0 +1,123 @@
#if v2_52_0
using Adaptation._Tests.Shared;
using Adaptation.Shared;
using Adaptation.Shared.Methods;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Reflection;
using System.Text.Json;
namespace Adaptation._Tests.Extract.Staging.v2_52_0;
[TestClass]
public class METCLIMATEC
{
#pragma warning disable CA2254
#pragma warning disable IDE0060
private static CreateSelfDescription.Staging.v2_52_0.METCLIMATEC _METCLIMATEC;
[ClassInitialize]
public static void ClassInitialize(TestContext testContext)
{
CreateSelfDescription.Staging.v2_52_0.METCLIMATEC.ClassInitialize(testContext);
_METCLIMATEC = CreateSelfDescription.Staging.v2_52_0.METCLIMATEC.EAFLoggingUnitTesting;
}
private static void NonThrowTryCatch()
{
try
{ throw new Exception(); }
catch (Exception) { }
}
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Staging__v2_52_0__METCLIMATEC__csv638465291633220311__Normal()
{
bool validatePDSF = false;
string check = "*.csv.trg";
_METCLIMATEC.Staging__v2_52_0__METCLIMATEC__csv();
MethodBase methodBase = new StackFrame().GetMethod();
// string check = "Dev *, A*, present-value, *D*-*-*-*.csv.trg";
Assert.IsFalse(string.IsNullOrEmpty(_METCLIMATEC.AdaptationTesting.TestContext.FullyQualifiedTestClassName));
string[] variables = _METCLIMATEC.AdaptationTesting.GetVariables(methodBase, check, validatePDSF);
IFileRead fileRead = _METCLIMATEC.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false);
Tuple<string, Test[], JsonElement[], List<FileInfo>> extractResult = fileRead.ReExtract();
Assert.IsFalse(string.IsNullOrEmpty(extractResult?.Item1));
Assert.IsNotNull(extractResult.Item3);
Assert.IsNotNull(extractResult.Item4);
NonThrowTryCatch();
}
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Staging__v2_52_0__METCLIMATEC__MoveMatchingFiles() => _METCLIMATEC.Staging__v2_52_0__METCLIMATEC__MoveMatchingFiles();
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Staging__v2_52_0__METCLIMATEC__MoveMatchingFiles637953064190000000__Normal()
{
string check = "*.pdsf";
bool validatePDSF = false;
MethodBase methodBase = new StackFrame().GetMethod();
_METCLIMATEC.Staging__v2_52_0__METCLIMATEC__MoveMatchingFiles();
Assert.IsFalse(string.IsNullOrEmpty(_METCLIMATEC.AdaptationTesting.TestContext.FullyQualifiedTestClassName));
string[] variables = _METCLIMATEC.AdaptationTesting.GetVariables(methodBase, check, validatePDSF);
IFileRead fileRead = _METCLIMATEC.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false);
Logistics logistics = new(fileRead);
_ = AdaptationTesting.ReExtractCompareUpdatePassDirectory(variables, fileRead, logistics, validatePDSF);
}
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Staging__v2_52_0__METCLIMATEC__IQSSi() => _METCLIMATEC.Staging__v2_52_0__METCLIMATEC__IQSSi();
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Staging__v2_52_0__METCLIMATEC__IQSSi638465291633220310__Normal()
{
string check = "*.pdsf";
_METCLIMATEC.Staging__v2_52_0__METCLIMATEC__IQSSi();
MethodBase methodBase = new StackFrame().GetMethod();
string[] variables = _METCLIMATEC.AdaptationTesting.GetVariables(methodBase, check, validatePDSF: false);
IFileRead fileRead = _METCLIMATEC.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false);
Logistics logistics = new(fileRead);
_ = AdaptationTesting.ReExtractCompareUpdatePassDirectory(variables, fileRead, logistics);
NonThrowTryCatch();
}
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Staging__v2_52_0__METCLIMATEC__Processed() => _METCLIMATEC.Staging__v2_52_0__METCLIMATEC__Processed();
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Staging__v2_52_0__METCLIMATEC__Archive() => _METCLIMATEC.Staging__v2_52_0__METCLIMATEC__Archive();
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Staging__v2_52_0__METCLIMATEC__Dummy() => _METCLIMATEC.Staging__v2_52_0__METCLIMATEC__Dummy();
}
#endif

View File

@ -1,3 +1,4 @@
#if v2_52_0
using Adaptation._Tests.Shared;
using Adaptation.Shared;
using Adaptation.Shared.Methods;
@ -38,7 +39,7 @@ public class TRENDLOG
[Ignore]
#endif
[TestMethod]
public void Staging__v2_52_0__TRENDLOG__ConvertExcelToJson() => _TRENDLOG.Staging__v2_52_0__TRENDLOG__csv();
public void Staging__v2_56_0__TRENDLOG__csv() => _TRENDLOG.Staging__v2_52_0__TRENDLOG__csv();
#if DEBUG
[Ignore]
@ -145,4 +146,5 @@ public class TRENDLOG
[TestMethod]
public void Staging__v2_52_0__TRENDLOG__Dummy() => _TRENDLOG.Staging__v2_52_0__TRENDLOG__Dummy();
}
}
#endif

View File

@ -0,0 +1,102 @@
#if true
using Adaptation._Tests.Shared;
using Adaptation.Shared;
using Adaptation.Shared.Methods;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Reflection;
using System.Text.Json;
namespace Adaptation._Tests.Extract.Staging.v2_56_0;
[TestClass]
public class METCLIMATEC
{
#pragma warning disable CA2254
#pragma warning disable IDE0060
private static CreateSelfDescription.Staging.v2_56_0.METCLIMATEC _METCLIMATEC;
[ClassInitialize]
public static void ClassInitialize(TestContext testContext)
{
CreateSelfDescription.Staging.v2_56_0.METCLIMATEC.ClassInitialize(testContext);
_METCLIMATEC = CreateSelfDescription.Staging.v2_56_0.METCLIMATEC.EAFLoggingUnitTesting;
}
private static void NonThrowTryCatch()
{
try
{ throw new Exception(); }
catch (Exception) { }
}
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Staging__v2_56_0__METCLIMATEC__MoveMatchingFiles() => _METCLIMATEC.Staging__v2_56_0__METCLIMATEC__MoveMatchingFiles();
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Staging__v2_56_0__METCLIMATEC__MoveMatchingFiles637953064190000000__Normal()
{
string check = "*.pdsf";
bool validatePDSF = false;
MethodBase methodBase = new StackFrame().GetMethod();
_METCLIMATEC.Staging__v2_56_0__METCLIMATEC__MoveMatchingFiles();
Assert.IsFalse(string.IsNullOrEmpty(_METCLIMATEC.AdaptationTesting.TestContext.FullyQualifiedTestClassName));
string[] variables = _METCLIMATEC.AdaptationTesting.GetVariables(methodBase, check, validatePDSF);
IFileRead fileRead = _METCLIMATEC.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false);
Logistics logistics = new(fileRead);
_ = AdaptationTesting.ReExtractCompareUpdatePassDirectory(variables, fileRead, logistics, validatePDSF);
}
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Staging__v2_56_0__METCLIMATEC__IQSSi() => _METCLIMATEC.Staging__v2_56_0__METCLIMATEC__IQSSi();
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Staging__v2_56_0__METCLIMATEC__IQSSi638465291633220310__Normal()
{
string check = "*.pdsf";
_METCLIMATEC.Staging__v2_56_0__METCLIMATEC__IQSSi();
MethodBase methodBase = new StackFrame().GetMethod();
string[] variables = _METCLIMATEC.AdaptationTesting.GetVariables(methodBase, check, validatePDSF: false);
IFileRead fileRead = _METCLIMATEC.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false);
Logistics logistics = new(fileRead);
_ = AdaptationTesting.ReExtractCompareUpdatePassDirectory(variables, fileRead, logistics);
NonThrowTryCatch();
}
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Staging__v2_56_0__METCLIMATEC__Processed() => _METCLIMATEC.Staging__v2_56_0__METCLIMATEC__Processed();
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Staging__v2_56_0__METCLIMATEC__Archive() => _METCLIMATEC.Staging__v2_56_0__METCLIMATEC__Archive();
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Staging__v2_56_0__METCLIMATEC__Dummy() => _METCLIMATEC.Staging__v2_56_0__METCLIMATEC__Dummy();
}
#endif

View File

@ -0,0 +1,87 @@
#if true
using Adaptation._Tests.Shared;
using Adaptation.Shared;
using Adaptation.Shared.Methods;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Reflection;
using System.Text.Json;
namespace Adaptation._Tests.Extract.Staging.v2_56_0;
[TestClass]
public class TRENDLOG
{
#pragma warning disable CA2254
#pragma warning disable IDE0060
private static CreateSelfDescription.Staging.v2_56_0.TRENDLOG _TRENDLOG;
[ClassInitialize]
public static void ClassInitialize(TestContext testContext)
{
CreateSelfDescription.Staging.v2_56_0.TRENDLOG.ClassInitialize(testContext);
_TRENDLOG = CreateSelfDescription.Staging.v2_56_0.TRENDLOG.EAFLoggingUnitTesting;
}
private static void NonThrowTryCatch()
{
try
{ throw new Exception(); }
catch (Exception) { }
}
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Staging__v2_56_0__TRENDLOG__csv() => _TRENDLOG.Staging__v2_56_0__TRENDLOG__csv();
#if (!DEBUG)
[Ignore]
#endif
[TestMethod]
public void Staging__v2_56_0__TRENDLOG__csv638465291633220310__Normal()
{
bool validatePDSF = false;
string check = "*.csv.trg";
_TRENDLOG.Staging__v2_56_0__TRENDLOG__csv();
MethodBase methodBase = new StackFrame().GetMethod();
// string check = "Dev *, A*, present-value, *D*-*-*-*.csv.trg";
Assert.IsFalse(string.IsNullOrEmpty(_TRENDLOG.AdaptationTesting.TestContext.FullyQualifiedTestClassName));
string[] variables = _TRENDLOG.AdaptationTesting.GetVariables(methodBase, check, validatePDSF);
IFileRead fileRead = _TRENDLOG.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false);
Tuple<string, Test[], JsonElement[], List<FileInfo>> extractResult = fileRead.ReExtract();
Assert.IsFalse(string.IsNullOrEmpty(extractResult?.Item1));
Assert.IsNotNull(extractResult.Item3);
Assert.IsNotNull(extractResult.Item4);
NonThrowTryCatch();
}
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Staging__v2_56_0__TRENDLOG__csv638465291633220311__Normal()
{
bool validatePDSF = false;
string check = "*.csv.trg";
_TRENDLOG.Staging__v2_56_0__TRENDLOG__csv();
MethodBase methodBase = new StackFrame().GetMethod();
// string check = "Dev *, A*, present-value, *D*-*-*-*.csv.trg";
Assert.IsFalse(string.IsNullOrEmpty(_TRENDLOG.AdaptationTesting.TestContext.FullyQualifiedTestClassName));
string[] variables = _TRENDLOG.AdaptationTesting.GetVariables(methodBase, check, validatePDSF);
IFileRead fileRead = _TRENDLOG.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false);
Tuple<string, Test[], JsonElement[], List<FileInfo>> extractResult = fileRead.ReExtract();
Assert.IsFalse(string.IsNullOrEmpty(extractResult?.Item1));
Assert.IsNotNull(extractResult.Item3);
Assert.IsNotNull(extractResult.Item4);
NonThrowTryCatch();
}
}
#endif