Files
met08ddupsp1tbi/Adaptation/_Tests/Extract/Production/v2.61.1/TBI01.cs
phares@iscn5cg20977xq 8ee374b2a8 Refactor ProcessDataStandardFormat and add unit tests for v2.61.1
- Updated GetPDSFText method to accept nullable logisticsText parameter.
- Removed unused TryGetPropertyIndex method from ProcessDataStandardFormat.
- Introduced new unit tests for CreateSelfDescription and Extract functionalities in version 2.61.1.
- Implemented logging and file handling in the test classes to ensure proper setup and teardown.
2025-12-02 08:32:55 -07:00

58 lines
1.7 KiB
C#

#if true
using Adaptation.Shared;
using Adaptation.Shared.Methods;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using System;
using System.Diagnostics;
using System.Reflection;
namespace Adaptation._Tests.Extract.Production.v2_61_1;
[TestClass]
public class TBI01
{
#pragma warning disable CA2254
#pragma warning disable IDE0060
private static CreateSelfDescription.Production.v2_61_1.TBI01 _TBI01;
[ClassInitialize]
public static void ClassInitialize(TestContext testContext)
{
CreateSelfDescription.Production.v2_61_1.TBI01.ClassInitialize(testContext);
_TBI01 = CreateSelfDescription.Production.v2_61_1.TBI01.EAFLoggingUnitTesting;
}
private static void NonThrowTryCatch()
{
try
{ throw new Exception(); }
catch (Exception) { }
}
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Production__v2_61_1__TBI01__txt() => _TBI01.Production__v2_61_1__TBI01__txt();
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Production__v2_61_1__TBI01__txt638997515742136250__Normal()
{
string check = "*.txt";
bool validatePDSF = false;
_TBI01.Production__v2_61_1__TBI01__txt();
MethodBase methodBase = new StackFrame().GetMethod();
string[] variables = _TBI01.AdaptationTesting.GetVariables(methodBase, check, validatePDSF);
IFileRead fileRead = _TBI01.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false);
Logistics logistics = new(fileRead);
_ = Shared.AdaptationTesting.ReExtractCompareUpdatePassDirectory(variables, fileRead, logistics, validatePDSF);
NonThrowTryCatch();
}
}
#endif