_HyphenIsXToIQSSi

This commit is contained in:
Mike Phares 2022-02-18 10:35:10 -07:00
parent e3f578e977
commit d0939a2d60
4 changed files with 96 additions and 4 deletions

View File

@ -8,11 +8,36 @@
"Hmmssffff",
"ipdsf",
"ISMTP",
"Mddhhmmssfff",
"MEPI",
"messa",
"pdmodel",
"PDSF",
"pdsfc",
"STDD",
"THFTIRQS",
"THFTIRSTRATUS",
"TRDS"
]
"TRDS",
"Villach"
],
"workbench.colorCustomizations": {
"activityBar.activeBackground": "#ddbc95",
"activityBar.activeBorder": "#2e9164",
"activityBar.background": "#ddbc95",
"activityBar.foreground": "#15202b",
"activityBar.inactiveForeground": "#15202b99",
"activityBarBadge.background": "#2e9164",
"activityBarBadge.foreground": "#e7e7e7",
"sash.hoverBorder": "#ddbc95",
"statusBar.background": "#d0a46f",
"statusBar.foreground": "#15202b",
"statusBarItem.hoverBackground": "#c38c49",
"statusBarItem.remoteBackground": "#d0a46f",
"statusBarItem.remoteForeground": "#15202b",
"titleBar.activeBackground": "#d0a46f",
"titleBar.activeForeground": "#15202b",
"titleBar.inactiveBackground": "#d0a46f99",
"titleBar.inactiveForeground": "#15202b99"
},
"peacock.color": "#d0a46f"
}

View File

@ -203,7 +203,9 @@ public class FileRead : Shared.FileRead, IFileRead
catch (Exception) { }
}
string[] segments = Path.GetFileNameWithoutExtension(reportFullPath).Split('_');
if (_Hyphens != _HyphenIsXToOpenInsight)
if (_Hyphens == _HyphenIsXToIQSSi)
duplicateDirectory = string.Concat(_FileConnectorConfiguration.TargetFileLocation, @"\All");
else if (_Hyphens != _HyphenIsXToOpenInsight)
duplicateDirectory = string.Concat(_FileConnectorConfiguration.TargetFileLocation, @"\", segments[0]);
else
duplicateDirectory = string.Concat(Path.GetDirectoryName(Path.GetDirectoryName(_FileConnectorConfiguration.TargetFileLocation)), @"\Data");
@ -211,7 +213,7 @@ public class FileRead : Shared.FileRead, IFileRead
duplicateDirectory = string.Concat(duplicateDirectory, @"-", segments[2]);
if (!Directory.Exists(duplicateDirectory))
_ = Directory.CreateDirectory(duplicateDirectory);
if ((isDummyRun || isNotUsedInsightMetrologyViewerAttachments || _FileConnectorConfiguration.FileScanningIntervalInSeconds > 0))
if (isDummyRun || isNotUsedInsightMetrologyViewerAttachments || _FileConnectorConfiguration.FileScanningIntervalInSeconds > 0)
{
if (!Directory.Exists(duplicateDirectory))
_ = Directory.CreateDirectory(duplicateDirectory);

View File

@ -29,6 +29,37 @@ public class BIORAD5
[TestMethod]
public void Staging__v2_39_0__BIORAD5__txt() => _BIORAD5.Staging__v2_39_0__BIORAD5__txt();
[TestMethod]
public void Staging__v2_39_0__BIORAD5__txt637805172599370243__Why()
{
DateTime dateTime;
string check = "*DataBioRad.txt";
_BIORAD5.Staging__v2_39_0__BIORAD5__txt();
MethodBase methodBase = new StackFrame().GetMethod();
string[] variables = _BIORAD5.AdaptationTesting.GetVariables(methodBase, check);
Tuple<string, string[], string[]> pdsf = Helpers.Metrology.GetLogisticsColumnsAndBody(variables[2], variables[4]);
IFileRead fileRead = _BIORAD5.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.IsTrue(extractResult.Item3.Length > 0, "extractResult Array Length check!");
Assert.IsNotNull(extractResult.Item4);
Logistics logistics = new(fileRead);
dateTime = Adaptation.FileHandlers.Stratus.ProcessData.GetDateTime(logistics, string.Empty);
Assert.IsTrue(dateTime == logistics.DateTimeFromSequence);
dateTime = Adaptation.FileHandlers.Stratus.ProcessData.GetDateTime(logistics, "11/24/21 08:39");
Assert.IsTrue(dateTime == logistics.DateTimeFromSequence);
Tuple<string, string[], string[]> pdsfNew = Helpers.Metrology.GetLogisticsColumnsAndBody(fileRead, logistics, extractResult, pdsf);
Helpers.Metrology.CompareSave(variables[5], pdsf, pdsfNew);
Assert.IsTrue(pdsf.Item1 == pdsfNew.Item1, "Item1 check!");
string[] json = Helpers.Metrology.GetItem2(pdsf, pdsfNew);
Helpers.Metrology.CompareSaveJSON(variables[5], json);
Assert.IsTrue(json[0] == json[1], "Item2 check!");
string[] join = Helpers.Metrology.GetItem3(pdsf, pdsfNew);
Helpers.Metrology.CompareSaveTSV(variables[5], join);
Assert.IsTrue(join[0] == join[1], "Item3 (Join) check!");
Helpers.Metrology.UpdatePassDirectory(variables[2]);
}
[TestMethod]
public void Staging__v2_39_0__BIORAD5__Stratus() => _BIORAD5.Staging__v2_39_0__BIORAD5__Stratus();
@ -63,6 +94,37 @@ public class BIORAD5
Helpers.Metrology.UpdatePassDirectory(variables[2]);
}
[TestMethod]
public void Staging__v2_39_0__BIORAD5__Stratus637805172599370243__Why()
{
DateTime dateTime;
string check = "CassetteDataBioRad_*.txt";
_BIORAD5.Staging__v2_39_0__BIORAD5__Stratus();
MethodBase methodBase = new StackFrame().GetMethod();
string[] variables = _BIORAD5.AdaptationTesting.GetVariables(methodBase, check);
Tuple<string, string[], string[]> pdsf = Helpers.Metrology.GetLogisticsColumnsAndBody(variables[2], variables[4]);
IFileRead fileRead = _BIORAD5.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.IsTrue(extractResult.Item3.Length > 0, "extractResult Array Length check!");
Assert.IsNotNull(extractResult.Item4);
Logistics logistics = new(fileRead);
dateTime = Adaptation.FileHandlers.Stratus.ProcessData.GetDateTime(logistics, string.Empty);
Assert.IsTrue(dateTime == logistics.DateTimeFromSequence);
dateTime = Adaptation.FileHandlers.Stratus.ProcessData.GetDateTime(logistics, "11/24/21 08:39");
Assert.IsTrue(dateTime == logistics.DateTimeFromSequence);
Tuple<string, string[], string[]> pdsfNew = Helpers.Metrology.GetLogisticsColumnsAndBody(fileRead, logistics, extractResult, pdsf);
Helpers.Metrology.CompareSave(variables[5], pdsf, pdsfNew);
Assert.IsTrue(pdsf.Item1 == pdsfNew.Item1, "Item1 check!");
string[] json = Helpers.Metrology.GetItem2(pdsf, pdsfNew);
Helpers.Metrology.CompareSaveJSON(variables[5], json);
Assert.IsTrue(json[0] == json[1], "Item2 check!");
string[] join = Helpers.Metrology.GetItem3(pdsf, pdsfNew);
Helpers.Metrology.CompareSaveTSV(variables[5], join);
Assert.IsTrue(join[0] == join[1], "Item3 (Join) check!");
Helpers.Metrology.UpdatePassDirectory(variables[2]);
}
[TestMethod]
public void Staging__v2_39_0__BIORAD5__QS408M() => _BIORAD5.Staging__v2_39_0__BIORAD5__QS408M();

View File

@ -13,6 +13,9 @@
"AY-CreateSelfDescription.Staging.v2_39_0-BIORAD5": "dotnet test --runtime win-x64 --no-build --filter \"FullyQualifiedName~_Tests.CreateSelfDescription.Staging.v2_39_0 & ClassName~BIORAD5\" --% -- TestRunParameters.Parameter(name=\\\"Debug\\\", value=\\\"Debugger.IsAttached\\\")",
"AZ-CreateSelfDescription.Staging.v2_39_0": "dotnet test --runtime win-x64 --no-build --filter \"FullyQualifiedName~_Tests.CreateSelfDescription.Staging.v2_39_0\" --% -- TestRunParameters.Parameter(name=\\\"Debug\\\", value=\\\"Debugger.IsAttached\\\")",
"BA-Extract.Staging.v2_39_0-BIORAD5-Staging__v2_39_0__BIORAD5__RsM643047560320000000__Normal": "dotnet test --runtime win-x64 --no-build --filter \"FullyQualifiedName~_Tests.Extract.Staging.v2_39_0 & ClassName~BIORAD5 & Staging__v2_39_0__BIORAD5__RsM643047560320000000__Normal\" --% -- TestRunParameters.Parameter(name=\\\"Debug\\\", value=\\\"Debugger.IsAttached\\\")",
"BB-Extract.Staging.v2_39_0-MET08THFTIRSTRATUS-Staging__v2_39_0__MET08THFTIRSTRATUS__MET08THFTIRSTRATUS___637745411457972777__First": "dotnet test --runtime win-x64 --no-build --filter \"FullyQualifiedName~_Tests.Extract.Staging.v2_39_0 & ClassName~MET08THFTIRSTRATUS & Staging__v2_39_0__MET08THFTIRSTRATUS__MET08THFTIRSTRATUS___637745411457972777__First\" --% -- TestRunParameters.Parameter(name=\\\"Debug\\\", value=\\\"Debugger.IsAttached\\\")",
"BC-Extract.Staging.v2_39_0-BIORAD5-Staging__v2_39_0__BIORAD5__txt637805172599370243__Why": "dotnet test --runtime win-x64 --no-build --filter \"FullyQualifiedName~_Tests.Extract.Staging.v2_39_0 & ClassName~BIORAD5 & Staging__v2_39_0__BIORAD5__txt637805172599370243__Why\" --% -- TestRunParameters.Parameter(name=\\\"Debug\\\", value=\\\"Debugger.IsAttached\\\")",
"BD-Extract.Staging.v2_39_0-BIORAD5-Staging__v2_39_0__BIORAD5__Stratus637805172599370243__Why": "dotnet test --runtime win-x64 --no-build --filter \"FullyQualifiedName~_Tests.Extract.Staging.v2_39_0 & ClassName~BIORAD5 & Staging__v2_39_0__BIORAD5__Stratus637805172599370243__Why\" --% -- TestRunParameters.Parameter(name=\\\"Debug\\\", value=\\\"Debugger.IsAttached\\\")",
"BT-Extract.Staging.v2_39_0-MET08THFTIRSTRATUS": "dotnet test --runtime win-x64 --no-build --filter \"FullyQualifiedName~_Tests.Extract.Staging.v2_39_0 & ClassName~MET08THFTIRSTRATUS\" --% -- TestRunParameters.Parameter(name=\\\"Debug\\\", value=\\\"Debugger.IsAttached\\\")",
"BV-Extract.Staging.v2_39_0-BIORAD4_EQPT": "dotnet test --runtime win-x64 --no-build --filter \"FullyQualifiedName~_Tests.Extract.Staging.v2_39_0 & ClassName~BIORAD4_EQPT\" --% -- TestRunParameters.Parameter(name=\\\"Debug\\\", value=\\\"Debugger.IsAttached\\\")",
"BW-Extract.Staging.v2_39_0-BIORAD4": "dotnet test --runtime win-x64 --no-build --filter \"FullyQualifiedName~_Tests.Extract.Staging.v2_39_0 & ClassName~BIORAD4\" --% -- TestRunParameters.Parameter(name=\\\"Debug\\\", value=\\\"Debugger.IsAttached\\\")",