From 1d7368c44e13e5056f8a7351b4e497fdf658e0bf Mon Sep 17 00:00:00 2001 From: Mike Phares Date: Mon, 8 Aug 2022 16:05:28 -0700 Subject: [PATCH] MET08RESIMAPCDE - v2.43.4 - MethodBaseName --- .gitignore | 2 + Adaptation/.vscode/format-report.json | 183 ++++++++- Adaptation/.vscode/launch.json | 2 +- .../CellInstanceConnectionName.cs | 2 +- .../FileHandlers/OpenInsight/FileRead.cs | 4 +- .../OpenInsightMetrologyViewer/FileRead.cs | 4 +- .../OpenInsightMetrologyViewer/WSRequest.cs | 20 +- .../FileRead.cs | 4 +- Adaptation/FileHandlers/Processed/FileRead.cs | 4 +- Adaptation/FileHandlers/RsM/Description.cs | 2 +- Adaptation/FileHandlers/RsM/Descriptor.cs | 23 ++ Adaptation/FileHandlers/RsM/FileRead.cs | 10 +- Adaptation/FileHandlers/RsM/ProcessData.cs | 109 ++++-- .../FileHandlers/{pcl => txt}/Description.cs | 4 +- Adaptation/FileHandlers/txt/Descriptor.cs | 25 ++ .../FileHandlers/{pcl => txt}/Detail.cs | 2 +- .../FileHandlers/{pcl => txt}/FileRead.cs | 12 +- .../FileHandlers/{pcl => txt}/ProcessData.cs | 211 +++++++---- Adaptation/Shared/FileRead.cs | 1 + Adaptation/Shared/Properties/IFileRead.cs | 1 + .../Staging/v2.36.1/CDE2.cs | 10 +- .../Staging/v2.36.1/CDE3-EQPT.cs | 10 +- .../Staging/v2.36.1/CDE3.cs | 10 +- .../Staging/v2.36.1/CDE5.cs | 10 +- .../Staging/v2.36.1/MET08RESIMAPCDE.cs | 34 +- .../Staging/v2.39.0/CDE2.cs | 10 +- .../Staging/v2.39.0/CDE3-EQPT.cs | 10 +- .../Staging/v2.39.0/CDE3.cs | 10 +- .../Staging/v2.39.0/CDE5.cs | 10 +- .../Staging/v2.39.0/MET08RESIMAPCDE.cs | 34 +- .../Staging/v2.43.2/CDE2.cs | 10 +- .../Staging/v2.43.2/CDE3-EQPT.cs | 10 +- .../Staging/v2.43.2/CDE3.cs | 10 +- .../Staging/v2.43.2/CDE5.cs | 10 +- .../Staging/v2.43.2/MET08RESIMAPCDE.cs | 37 +- .../Staging/v2.43.3/CDE5-EQPT.cs | 10 +- .../Staging/v2.43.3/CDE5.cs | 10 +- .../Staging/v2.43.4/CDE2.cs | 66 ++++ .../Staging/v2.43.4/CDE5.cs | 66 ++++ .../Staging/v2.43.4/MET08RESIMAPCDE.cs | 183 +++++++++ .../_Tests/Extract/Staging/v2.36.1/CDE2.cs | 0 .../Extract/Staging/v2.36.1/CDE3-EQPT.cs | 3 + .../_Tests/Extract/Staging/v2.36.1/CDE3.cs | 6 + .../_Tests/Extract/Staging/v2.36.1/CDE5.cs | 0 .../Staging/v2.36.1/MET08RESIMAPCDE.cs | 30 ++ .../_Tests/Extract/Staging/v2.39.0/CDE2.cs | 0 .../Extract/Staging/v2.39.0/CDE3-EQPT.cs | 3 + .../_Tests/Extract/Staging/v2.39.0/CDE3.cs | 6 + .../_Tests/Extract/Staging/v2.39.0/CDE5.cs | 0 .../Staging/v2.39.0/MET08RESIMAPCDE.cs | 30 ++ .../_Tests/Extract/Staging/v2.43.2/CDE2.cs | 0 .../Extract/Staging/v2.43.2/CDE3-EQPT.cs | 3 + .../_Tests/Extract/Staging/v2.43.2/CDE3.cs | 6 + .../_Tests/Extract/Staging/v2.43.2/CDE5.cs | 0 .../Staging/v2.43.2/MET08RESIMAPCDE.cs | 30 ++ .../Extract/Staging/v2.43.3/CDE5-EQPT.cs | 9 +- .../_Tests/Extract/Staging/v2.43.3/CDE5.cs | 6 + .../_Tests/Extract/Staging/v2.43.4/CDE2.cs | 51 +++ .../_Tests/Extract/Staging/v2.43.4/CDE5.cs | 51 +++ .../Staging/v2.43.4/MET08RESIMAPCDE.cs | 106 ++++++ Adaptation/_Tests/Shared/AdaptationTesting.cs | 350 +++++++++--------- .../_Tests/Shared/EAFLoggingUnitTesting.cs | 4 +- Adaptation/_Tests/Shared/MethodBaseName.cs | 45 +++ Adaptation/_Tests/Shared/UnitTesting.cs | 19 +- Adaptation/_Tests/Static/RsM.cs | 66 ++++ Adaptation/_Tests/Static/txt.cs | 66 ++++ Adaptation/package.json | 30 +- MET08RESIMAPCDE.csproj | 10 +- Properties/AssemblyInfo.cs | 4 +- 69 files changed, 1763 insertions(+), 356 deletions(-) create mode 100644 Adaptation/FileHandlers/RsM/Descriptor.cs rename Adaptation/FileHandlers/{pcl => txt}/Description.cs (99%) create mode 100644 Adaptation/FileHandlers/txt/Descriptor.cs rename Adaptation/FileHandlers/{pcl => txt}/Detail.cs (90%) rename Adaptation/FileHandlers/{pcl => txt}/FileRead.cs (90%) rename Adaptation/FileHandlers/{pcl => txt}/ProcessData.cs (78%) create mode 100644 Adaptation/_Tests/CreateSelfDescription/Staging/v2.43.4/CDE2.cs create mode 100644 Adaptation/_Tests/CreateSelfDescription/Staging/v2.43.4/CDE5.cs create mode 100644 Adaptation/_Tests/CreateSelfDescription/Staging/v2.43.4/MET08RESIMAPCDE.cs delete mode 100644 Adaptation/_Tests/Extract/Staging/v2.36.1/CDE2.cs delete mode 100644 Adaptation/_Tests/Extract/Staging/v2.36.1/CDE5.cs delete mode 100644 Adaptation/_Tests/Extract/Staging/v2.39.0/CDE2.cs delete mode 100644 Adaptation/_Tests/Extract/Staging/v2.39.0/CDE5.cs delete mode 100644 Adaptation/_Tests/Extract/Staging/v2.43.2/CDE2.cs delete mode 100644 Adaptation/_Tests/Extract/Staging/v2.43.2/CDE5.cs create mode 100644 Adaptation/_Tests/Extract/Staging/v2.43.4/CDE2.cs create mode 100644 Adaptation/_Tests/Extract/Staging/v2.43.4/CDE5.cs create mode 100644 Adaptation/_Tests/Extract/Staging/v2.43.4/MET08RESIMAPCDE.cs create mode 100644 Adaptation/_Tests/Shared/MethodBaseName.cs create mode 100644 Adaptation/_Tests/Static/RsM.cs create mode 100644 Adaptation/_Tests/Static/txt.cs diff --git a/.gitignore b/.gitignore index 6ba6148..eab1f67 100644 --- a/.gitignore +++ b/.gitignore @@ -336,3 +336,5 @@ ASALocalRun/ !.vscode/tasks.json !.vscode/launch.json !.vscode/extensions.json + +*.lnk diff --git a/Adaptation/.vscode/format-report.json b/Adaptation/.vscode/format-report.json index 0637a08..b52cd1d 100644 --- a/Adaptation/.vscode/format-report.json +++ b/Adaptation/.vscode/format-report.json @@ -1 +1,182 @@ -[] \ No newline at end of file +[ + { + "DocumentId": { + "ProjectId": { + "Id": "d8671d76-c7d6-43f9-b1df-26c88f02f625" + }, + "Id": "60949adb-0f09-465d-94a4-88b5934cca95" + }, + "FileName": "MET08RESIMAPCDE.cs", + "FilePath": "T:\\MET08RESIMAPCDE\\06_SourceCode\\MET08RESIMAPCDE\\Adaptation\\_Tests\\CreateSelfDescription\\Staging\\v2.43.4\\MET08RESIMAPCDE.cs", + "FileChanges": [ + { + "LineNumber": 102, + "CharNumber": 13, + "DiagnosticId": "IDE0002", + "FormatDescription": "warning IDE0002: Name can be simplified." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "d8671d76-c7d6-43f9-b1df-26c88f02f625" + }, + "Id": "60949adb-0f09-465d-94a4-88b5934cca95" + }, + "FileName": "MET08RESIMAPCDE.cs", + "FilePath": "T:\\MET08RESIMAPCDE\\06_SourceCode\\MET08RESIMAPCDE\\Adaptation\\_Tests\\CreateSelfDescription\\Staging\\v2.43.4\\MET08RESIMAPCDE.cs", + "FileChanges": [ + { + "LineNumber": 115, + "CharNumber": 13, + "DiagnosticId": "IDE0002", + "FormatDescription": "warning IDE0002: Name can be simplified." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "d8671d76-c7d6-43f9-b1df-26c88f02f625" + }, + "Id": "60949adb-0f09-465d-94a4-88b5934cca95" + }, + "FileName": "MET08RESIMAPCDE.cs", + "FilePath": "T:\\MET08RESIMAPCDE\\06_SourceCode\\MET08RESIMAPCDE\\Adaptation\\_Tests\\CreateSelfDescription\\Staging\\v2.43.4\\MET08RESIMAPCDE.cs", + "FileChanges": [ + { + "LineNumber": 141, + "CharNumber": 13, + "DiagnosticId": "IDE0002", + "FormatDescription": "warning IDE0002: Name can be simplified." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "d8671d76-c7d6-43f9-b1df-26c88f02f625" + }, + "Id": "60949adb-0f09-465d-94a4-88b5934cca95" + }, + "FileName": "MET08RESIMAPCDE.cs", + "FilePath": "T:\\MET08RESIMAPCDE\\06_SourceCode\\MET08RESIMAPCDE\\Adaptation\\_Tests\\CreateSelfDescription\\Staging\\v2.43.4\\MET08RESIMAPCDE.cs", + "FileChanges": [ + { + "LineNumber": 128, + "CharNumber": 13, + "DiagnosticId": "IDE0002", + "FormatDescription": "warning IDE0002: Name can be simplified." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "d8671d76-c7d6-43f9-b1df-26c88f02f625" + }, + "Id": "60949adb-0f09-465d-94a4-88b5934cca95" + }, + "FileName": "MET08RESIMAPCDE.cs", + "FilePath": "T:\\MET08RESIMAPCDE\\06_SourceCode\\MET08RESIMAPCDE\\Adaptation\\_Tests\\CreateSelfDescription\\Staging\\v2.43.4\\MET08RESIMAPCDE.cs", + "FileChanges": [ + { + "LineNumber": 167, + "CharNumber": 13, + "DiagnosticId": "IDE0002", + "FormatDescription": "warning IDE0002: Name can be simplified." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "d8671d76-c7d6-43f9-b1df-26c88f02f625" + }, + "Id": "60949adb-0f09-465d-94a4-88b5934cca95" + }, + "FileName": "MET08RESIMAPCDE.cs", + "FilePath": "T:\\MET08RESIMAPCDE\\06_SourceCode\\MET08RESIMAPCDE\\Adaptation\\_Tests\\CreateSelfDescription\\Staging\\v2.43.4\\MET08RESIMAPCDE.cs", + "FileChanges": [ + { + "LineNumber": 180, + "CharNumber": 13, + "DiagnosticId": "IDE0002", + "FormatDescription": "warning IDE0002: Name can be simplified." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "d8671d76-c7d6-43f9-b1df-26c88f02f625" + }, + "Id": "60949adb-0f09-465d-94a4-88b5934cca95" + }, + "FileName": "MET08RESIMAPCDE.cs", + "FilePath": "T:\\MET08RESIMAPCDE\\06_SourceCode\\MET08RESIMAPCDE\\Adaptation\\_Tests\\CreateSelfDescription\\Staging\\v2.43.4\\MET08RESIMAPCDE.cs", + "FileChanges": [ + { + "LineNumber": 63, + "CharNumber": 13, + "DiagnosticId": "IDE0002", + "FormatDescription": "warning IDE0002: Name can be simplified." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "d8671d76-c7d6-43f9-b1df-26c88f02f625" + }, + "Id": "60949adb-0f09-465d-94a4-88b5934cca95" + }, + "FileName": "MET08RESIMAPCDE.cs", + "FilePath": "T:\\MET08RESIMAPCDE\\06_SourceCode\\MET08RESIMAPCDE\\Adaptation\\_Tests\\CreateSelfDescription\\Staging\\v2.43.4\\MET08RESIMAPCDE.cs", + "FileChanges": [ + { + "LineNumber": 76, + "CharNumber": 13, + "DiagnosticId": "IDE0002", + "FormatDescription": "warning IDE0002: Name can be simplified." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "d8671d76-c7d6-43f9-b1df-26c88f02f625" + }, + "Id": "60949adb-0f09-465d-94a4-88b5934cca95" + }, + "FileName": "MET08RESIMAPCDE.cs", + "FilePath": "T:\\MET08RESIMAPCDE\\06_SourceCode\\MET08RESIMAPCDE\\Adaptation\\_Tests\\CreateSelfDescription\\Staging\\v2.43.4\\MET08RESIMAPCDE.cs", + "FileChanges": [ + { + "LineNumber": 89, + "CharNumber": 13, + "DiagnosticId": "IDE0002", + "FormatDescription": "warning IDE0002: Name can be simplified." + } + ] + }, + { + "DocumentId": { + "ProjectId": { + "Id": "d8671d76-c7d6-43f9-b1df-26c88f02f625" + }, + "Id": "60949adb-0f09-465d-94a4-88b5934cca95" + }, + "FileName": "MET08RESIMAPCDE.cs", + "FilePath": "T:\\MET08RESIMAPCDE\\06_SourceCode\\MET08RESIMAPCDE\\Adaptation\\_Tests\\CreateSelfDescription\\Staging\\v2.43.4\\MET08RESIMAPCDE.cs", + "FileChanges": [ + { + "LineNumber": 154, + "CharNumber": 13, + "DiagnosticId": "IDE0002", + "FormatDescription": "warning IDE0002: Name can be simplified." + } + ] + } +] \ No newline at end of file diff --git a/Adaptation/.vscode/launch.json b/Adaptation/.vscode/launch.json index 0d05475..8251937 100644 --- a/Adaptation/.vscode/launch.json +++ b/Adaptation/.vscode/launch.json @@ -4,7 +4,7 @@ "name": ".NET Core Attach", "type": "coreclr", "request": "attach", - "processId": 21428 + "processId": 15176 } ] } diff --git a/Adaptation/FileHandlers/CellInstanceConnectionName.cs b/Adaptation/FileHandlers/CellInstanceConnectionName.cs index 1e86fac..3156b1f 100644 --- a/Adaptation/FileHandlers/CellInstanceConnectionName.cs +++ b/Adaptation/FileHandlers/CellInstanceConnectionName.cs @@ -22,7 +22,7 @@ public class CellInstanceConnectionName nameof(OpenInsight) => new OpenInsight.FileRead(smtp, fileParameter, cellInstanceName, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted), nameof(OpenInsightMetrologyViewer) => new OpenInsightMetrologyViewer.FileRead(smtp, fileParameter, cellInstanceName, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted), nameof(OpenInsightMetrologyViewerAttachments) => new OpenInsightMetrologyViewerAttachments.FileRead(smtp, fileParameter, cellInstanceName, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted), - nameof(pcl) => new pcl.FileRead(smtp, fileParameter, cellInstanceName, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted), + nameof(txt) => new txt.FileRead(smtp, fileParameter, cellInstanceName, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted), nameof(Processed) => new Processed.FileRead(smtp, fileParameter, cellInstanceName, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted), nameof(RsM) => new RsM.FileRead(smtp, fileParameter, cellInstanceName, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted), nameof(SPaCe) => new SPaCe.FileRead(smtp, fileParameter, cellInstanceName, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted), diff --git a/Adaptation/FileHandlers/OpenInsight/FileRead.cs b/Adaptation/FileHandlers/OpenInsight/FileRead.cs index f8adac1..accc5f7 100644 --- a/Adaptation/FileHandlers/OpenInsight/FileRead.cs +++ b/Adaptation/FileHandlers/OpenInsight/FileRead.cs @@ -103,7 +103,7 @@ public class FileRead : Shared.FileRead, IFileRead return results; } - private static void SaveOpenInsightFile(string reportFullPath, DateTime dateTime, List descriptions, Test[] tests) + private static void SaveOpenInsightFile(string reportFullPath, DateTime dateTime, List descriptions, Test[] tests) { if (reportFullPath is null) { } @@ -122,7 +122,7 @@ public class FileRead : Shared.FileRead, IFileRead _Logistics = new Logistics(reportFullPath, pdsf.Item1); SetFileParameterLotIDToLogisticsMID(); JsonElement[] jsonElements = ProcessDataStandardFormat.GetArray(pdsf); - List descriptions = pcl.ProcessData.GetDescriptions(jsonElements); + List descriptions = txt.ProcessData.GetDescriptions(jsonElements); Test[] tests = (from l in descriptions select (Test)l.Test).ToArray(); if (_IsEAFHosted && _FileConnectorConfiguration.FileScanningIntervalInSeconds > 0) SaveOpenInsightFile(reportFullPath, dateTime, descriptions, tests); diff --git a/Adaptation/FileHandlers/OpenInsightMetrologyViewer/FileRead.cs b/Adaptation/FileHandlers/OpenInsightMetrologyViewer/FileRead.cs index c7212a3..cf55419 100644 --- a/Adaptation/FileHandlers/OpenInsightMetrologyViewer/FileRead.cs +++ b/Adaptation/FileHandlers/OpenInsightMetrologyViewer/FileRead.cs @@ -107,7 +107,7 @@ public class FileRead : Shared.FileRead, IFileRead return results; } - private void SendData(DateTime dateTime, List descriptions) + private void SendData(DateTime dateTime, List descriptions) { if (dateTime == DateTime.MinValue) { } @@ -131,7 +131,7 @@ public class FileRead : Shared.FileRead, IFileRead _Logistics = new Logistics(reportFullPath, pdsf.Item1); SetFileParameterLotIDToLogisticsMID(); JsonElement[] jsonElements = ProcessDataStandardFormat.GetArray(pdsf); - List descriptions = pcl.ProcessData.GetDescriptions(jsonElements); + List descriptions = txt.ProcessData.GetDescriptions(jsonElements); Test[] tests = (from l in descriptions select (Test)l.Test).ToArray(); if (_IsEAFHosted && _FileConnectorConfiguration.FileScanningIntervalInSeconds > 0) SendData(dateTime, descriptions); diff --git a/Adaptation/FileHandlers/OpenInsightMetrologyViewer/WSRequest.cs b/Adaptation/FileHandlers/OpenInsightMetrologyViewer/WSRequest.cs index 3195a3f..f947318 100644 --- a/Adaptation/FileHandlers/OpenInsightMetrologyViewer/WSRequest.cs +++ b/Adaptation/FileHandlers/OpenInsightMetrologyViewer/WSRequest.cs @@ -42,18 +42,18 @@ public class WSRequest public string Temp { get; set; } public string UniqueId { get; set; } public string Zone { get; set; } - public List Details { get; protected set; } + public List Details { get; protected set; } [Obsolete("For json")] public WSRequest() { } - internal WSRequest(IFileRead fileRead, Logistics logistics, List descriptions) + internal WSRequest(IFileRead fileRead, Logistics logistics, List descriptions) { Id = "-1"; if (fileRead is null) { } CellName = logistics.MesEntity; - Details = new List(); - if (descriptions[0] is not pcl.Description x) + Details = new List(); + if (descriptions[0] is not txt.Description x) throw new Exception(); //Header { @@ -81,10 +81,10 @@ public class WSRequest UniqueId = x.UniqueId; Zone = x.Zone; } - pcl.Detail detail; - foreach (pcl.Description description in descriptions) + txt.Detail detail; + foreach (txt.Description description in descriptions) { - detail = new pcl.Detail + detail = new txt.Detail { HeaderUniqueId = description.HeaderUniqueId, Merit = description.Merit, @@ -104,7 +104,7 @@ public class WSRequest FilePath = onlyWSRequest; } - internal static void PostOpenInsightMetrologyViewerAttachments(IFileRead fileRead, Logistics logistics, string openInsightMetrologyViewerAPI, DateTime dateTime, string json, List descriptions, string matchDirectory) + internal static void PostOpenInsightMetrologyViewerAttachments(IFileRead fileRead, Logistics logistics, string openInsightMetrologyViewerAPI, DateTime dateTime, string json, List descriptions, string matchDirectory) { if (dateTime == DateTime.MinValue) { } @@ -117,8 +117,8 @@ public class WSRequest } WS.Results metrologyWSRequest = JsonSerializer.Deserialize(json); long wsResultsHeaderID = metrologyWSRequest.HeaderID; - string[] pclFiles = Directory.GetFiles(matchDirectory, "*.pcl", SearchOption.TopDirectoryOnly); - if (pclFiles.Length != 1) + string[] txtFiles = Directory.GetFiles(matchDirectory, "*.txt", SearchOption.TopDirectoryOnly); + if (txtFiles.Length != 1) throw new Exception($"Invalid source file count for <{wsResultsHeaderID}>!{Environment.NewLine}{json}"); List pdfFiles = new(); pdfFiles.AddRange(Directory.GetFiles(matchDirectory, "*.pdf_old", SearchOption.TopDirectoryOnly)); diff --git a/Adaptation/FileHandlers/OpenInsightMetrologyViewerAttachments/FileRead.cs b/Adaptation/FileHandlers/OpenInsightMetrologyViewerAttachments/FileRead.cs index 9f5965e..c960edb 100644 --- a/Adaptation/FileHandlers/OpenInsightMetrologyViewerAttachments/FileRead.cs +++ b/Adaptation/FileHandlers/OpenInsightMetrologyViewerAttachments/FileRead.cs @@ -108,7 +108,7 @@ public class FileRead : Shared.FileRead, IFileRead return results; } - private void PostOpenInsightMetrologyViewerAttachments(string reportFullPath, DateTime dateTime, List descriptions) + private void PostOpenInsightMetrologyViewerAttachments(string reportFullPath, DateTime dateTime, List descriptions) { if (string.IsNullOrEmpty(reportFullPath)) { } @@ -139,7 +139,7 @@ public class FileRead : Shared.FileRead, IFileRead _Logistics = new Logistics(reportFullPath, pdsf.Item1); SetFileParameterLotIDToLogisticsMID(); JsonElement[] jsonElements = ProcessDataStandardFormat.GetArray(pdsf); - List descriptions = pcl.ProcessData.GetDescriptions(jsonElements); + List descriptions = txt.ProcessData.GetDescriptions(jsonElements); Test[] tests = (from l in descriptions select (Test)l.Test).ToArray(); if (_IsEAFHosted && _FileConnectorConfiguration.FileScanningIntervalInSeconds > 0) PostOpenInsightMetrologyViewerAttachments(reportFullPath, dateTime, descriptions); diff --git a/Adaptation/FileHandlers/Processed/FileRead.cs b/Adaptation/FileHandlers/Processed/FileRead.cs index ff94090..b009e8c 100644 --- a/Adaptation/FileHandlers/Processed/FileRead.cs +++ b/Adaptation/FileHandlers/Processed/FileRead.cs @@ -108,7 +108,7 @@ public class FileRead : Shared.FileRead, IFileRead return results; } - private void DirectoryMove(string reportFullPath, DateTime dateTime, List descriptions) + private void DirectoryMove(string reportFullPath, DateTime dateTime, List descriptions) { if (dateTime == DateTime.MinValue) { } @@ -143,7 +143,7 @@ public class FileRead : Shared.FileRead, IFileRead _Logistics = new Logistics(reportFullPath, pdsf.Item1); SetFileParameterLotIDToLogisticsMID(); JsonElement[] jsonElements = ProcessDataStandardFormat.GetArray(pdsf); - List descriptions = pcl.ProcessData.GetDescriptions(jsonElements); + List descriptions = txt.ProcessData.GetDescriptions(jsonElements); Test[] tests = (from l in descriptions select (Test)l.Test).ToArray(); results = new Tuple>(pdsf.Item1, tests, jsonElements, new List()); if (_IsEAFHosted && _FileConnectorConfiguration.FileScanningIntervalInSeconds > 0) diff --git a/Adaptation/FileHandlers/RsM/Description.cs b/Adaptation/FileHandlers/RsM/Description.cs index 22621d9..45ecd3a 100644 --- a/Adaptation/FileHandlers/RsM/Description.cs +++ b/Adaptation/FileHandlers/RsM/Description.cs @@ -209,7 +209,7 @@ public class Description : IDescription, Shared.Properties.IDescription MID = logistics.MID, // Date = processData.Date, - Employee = processData.Engineer, + Employee = processData.Employee, Lot = processData.Lot, PSN = processData.PSN, Reactor = processData.Reactor, diff --git a/Adaptation/FileHandlers/RsM/Descriptor.cs b/Adaptation/FileHandlers/RsM/Descriptor.cs new file mode 100644 index 0000000..e8dd71b --- /dev/null +++ b/Adaptation/FileHandlers/RsM/Descriptor.cs @@ -0,0 +1,23 @@ +namespace Adaptation.FileHandlers.RsM; + +public class Descriptor +{ + + public string Layer { get; private set; } + public string PSN { get; private set; } + public string RDS { get; private set; } + public string Reactor { get; private set; } + public string Run { get; private set; } + public string Zone { get; private set; } + + public Descriptor(string layer, string psn, string rds, string reactor, string run, string zone) + { + Layer = layer; + PSN = psn; + RDS = rds; + Reactor = reactor; + Run = run; + Zone = zone; + } + +} \ No newline at end of file diff --git a/Adaptation/FileHandlers/RsM/FileRead.cs b/Adaptation/FileHandlers/RsM/FileRead.cs index 3c6c58b..f28ddf7 100644 --- a/Adaptation/FileHandlers/RsM/FileRead.cs +++ b/Adaptation/FileHandlers/RsM/FileRead.cs @@ -105,8 +105,14 @@ public class FileRead : Shared.FileRead, IFileRead IProcessData iProcessData = new ProcessData(this, _Logistics, results.Item4); if (iProcessData is not ProcessData processData) throw new Exception(string.Concat("A) No Data - ", dateTime.Ticks)); - string mid = string.Concat(processData.Reactor, "-", processData.RDS, "-", processData.PSN); - mid = Regex.Replace(mid, @"[\\,\/,\:,\*,\?,\"",\<,\>,\|]", "_").Split('\r')[0].Split('\n')[0]; + string mid; + if (!string.IsNullOrEmpty(processData.Employee) && string.IsNullOrEmpty(processData.Reactor) && string.IsNullOrEmpty(processData.RDS) && string.IsNullOrEmpty(processData.PSN)) + mid = processData.Employee; + else + { + mid = string.Concat(processData.Reactor, "-", processData.RDS, "-", processData.PSN); + mid = Regex.Replace(mid, @"[\\,\/,\:,\*,\?,\"",\<,\>,\|]", "_").Split('\r')[0].Split('\n')[0]; + } SetFileParameterLotID(mid); _Logistics.Update(mid, processData.Reactor); string logBody = processData.LogBody; diff --git a/Adaptation/FileHandlers/RsM/ProcessData.cs b/Adaptation/FileHandlers/RsM/ProcessData.cs index 2d8436c..8cfdc58 100644 --- a/Adaptation/FileHandlers/RsM/ProcessData.cs +++ b/Adaptation/FileHandlers/RsM/ProcessData.cs @@ -28,12 +28,12 @@ public class ProcessData : IProcessData public string Date { get; set; } public DateTime DateTime { get; set; } public string Employee { get; set; } - public string EquipId { get; set; } public string Engineer { get; set; } + public string EquipId { get; set; } public string FileName { get; set; } public string Layer { get; set; } - public string Lot { get; set; } public string LogBody { get; set; } + public string Lot { get; set; } public string PSN { get; set; } public string Project { get; set; } public string RDS { get; set; } @@ -86,37 +86,86 @@ public class ProcessData : IProcessData return results; } - private void SetTitleData(string[] segments) + public static Descriptor GetDescriptor(string text) { - if (segments.Length > 0) + Descriptor result; + string psn; + string rds; + string run; + string zone; + string layer; + string title; + string reactor; + string[] segments; + const string defaultPSN = "0000"; + const string defaultRDS = "000000"; + const string defaultReactor = "00"; + if (text.Length is 2 or 3) + { + run = text; + psn = defaultPSN; + rds = defaultRDS; + zone = string.Empty; + layer = string.Empty; + reactor = defaultReactor; + } + else { // Remove illegal characters \/:*?"<>| found in the title. - string title = Regex.Replace(segments[0], @"[\\,\/,\:,\*,\?,\"",\<,\>,\|]", "_").Split('\r')[0].Split('\n')[0]; + title = Regex.Replace(text, @"[\\,\/,\:,\*,\?,\"",\<,\>,\|]", "_").Split('\r')[0].Split('\n')[0]; if (title.StartsWith("1T") || title.StartsWith("1t")) title = title.Substring(2); - Title = title; - Run = title; - string[] parsedBatch = title.Split('-'); - if (parsedBatch.Length == 1) - RDS = title; + run = title; + segments = title.Split('-'); + if (segments.Length == 0) + reactor = defaultReactor; + else + reactor = segments[0]; + if (segments.Length <= 1) + rds = defaultRDS; + else + rds = segments[1]; + if (reactor.Length > 3) + { + rds = reactor; + reactor = defaultReactor; + } + if (segments.Length <= 2) + psn = defaultPSN; + else + psn = segments[2]; + if (segments.Length < 3) + layer = string.Empty; else { - if (parsedBatch.Length > 0) - Reactor = parsedBatch[0]; - if (parsedBatch.Length > 1) - RDS = parsedBatch[1]; - if (parsedBatch.Length > 2) - { - string[] parsedPSN = parsedBatch[2].Split('.'); - if (parsedPSN.Length > 0) - PSN = parsedPSN[0]; - if (parsedPSN.Length > 1) - Layer = parsedPSN[1]; - } - if (parsedBatch.Length > 3) - Zone = parsedBatch[3]; + string[] segmentsB = segments[2].Split('.'); + if (segmentsB.Length > 1) + psn = segmentsB[0]; + if (segmentsB.Length <= 1) + layer = string.Empty; + else + layer = segmentsB[1]; } + if (segments.Length <= 3) + zone = string.Empty; + else + zone = segments[3]; } + result = new(layer, psn, rds, reactor, run, zone); + return result; + } + + private void SetTitleData(Logistics logistics, string text) + { + string timeFormat = "yyyyMMddHHmmss"; + Descriptor descriptor = GetDescriptor(text); + PSN = descriptor.PSN; + RDS = descriptor.RDS; + Run = descriptor.Run; + Zone = descriptor.Zone; + Layer = descriptor.Layer; + Reactor = descriptor.Reactor; + UniqueId = string.Concat(logistics.JobID, "_", descriptor.Run, "_", logistics.DateTimeFromSequence.ToString(timeFormat)); } private void SetFileNameData(string[] segments) @@ -174,9 +223,9 @@ public class ProcessData : IProcessData StandardDeviationPercentage = Math.Round(standardDeviation / average, 4).ToString("0.00%"); } - private void SetOperatorData(string[] segments) + private void SetOperatorData(string[] segments, bool updateEmployee) { - if (segments.Length > 1) + if (segments.Length > 1 && updateEmployee) Employee = segments[0]; if (segments.Length > 2) EquipId = segments[1]; @@ -219,20 +268,19 @@ public class ProcessData : IProcessData Lot = "LotID"; Detail detail; string[] segments; - string timeFormat = "yyyyMMddHHmmss"; string[] separator = new string[] { " " }; string[] lines = File.ReadAllLines(logistics.ReportFullPath); for (int i = 0; i < lines.Length; i++) { segments = lines[i].Split(separator, StringSplitOptions.RemoveEmptyEntries); - if (lines[i].Contains("")) - SetTitleData(segments); + if (lines[i].Contains("<Title>") && segments.Length > 0) + SetTitleData(logistics, segments[0]); else if (lines[i].Contains("<FileName, Proj,Rcpe, LotID,WfrID")) SetFileNameData(segments); else if (lines[i].Contains("<DateTime,Temp,TCR%,N|P>")) SetDateTimeData(logistics, segments); else if (lines[i].Contains("<Operator, Epuipment>")) - SetOperatorData(segments); + SetOperatorData(segments, updateEmployee: string.IsNullOrEmpty(Employee)); else if (lines[i].Contains("<Engineer>")) SetEngineerData(segments); else if (lines[i].Contains("<NumProbePoints, SingleOrDualProbeConfig, #ActPrbPts, Rsens,IdrvMx,VinGain, DataRejectSigma, MeritThreshold")) @@ -249,7 +297,6 @@ public class ProcessData : IProcessData } } } - UniqueId = string.Concat(EquipId, "_", Run, "_", logistics.DateTimeFromSequence.ToString(timeFormat)); for (int i = 0; i < _Details.Count; i++) { if (_Details[i] is not Detail item) diff --git a/Adaptation/FileHandlers/pcl/Description.cs b/Adaptation/FileHandlers/txt/Description.cs similarity index 99% rename from Adaptation/FileHandlers/pcl/Description.cs rename to Adaptation/FileHandlers/txt/Description.cs index ae6c0e9..6af34fb 100644 --- a/Adaptation/FileHandlers/pcl/Description.cs +++ b/Adaptation/FileHandlers/txt/Description.cs @@ -5,7 +5,7 @@ using System.Collections.Generic; using System.Linq; using System.Text.Json; -namespace Adaptation.FileHandlers.pcl; +namespace Adaptation.FileHandlers.txt; public class Description : IDescription, Shared.Properties.IDescription { @@ -209,7 +209,7 @@ public class Description : IDescription, Shared.Properties.IDescription MID = logistics.MID, // Date = processData.Date, - Employee = processData.Engineer, + Employee = processData.Employee, Lot = processData.Lot, PSN = processData.PSN, Reactor = processData.Reactor, diff --git a/Adaptation/FileHandlers/txt/Descriptor.cs b/Adaptation/FileHandlers/txt/Descriptor.cs new file mode 100644 index 0000000..dde1150 --- /dev/null +++ b/Adaptation/FileHandlers/txt/Descriptor.cs @@ -0,0 +1,25 @@ +namespace Adaptation.FileHandlers.txt; + +public class Descriptor +{ + + public string Layer { get; private set; } + public string PSN { get; private set; } + public string RDS { get; private set; } + public string Reactor { get; private set; } + public string Run { get; private set; } + public string Title { get; private set; } + public string Zone { get; private set; } + + public Descriptor(string layer, string psn, string rds, string reactor, string run, string title, string zone) + { + Layer = layer; + PSN = psn; + RDS = rds; + Reactor = reactor; + Run = run; + Title = title; + Zone = zone; + } + +} \ No newline at end of file diff --git a/Adaptation/FileHandlers/pcl/Detail.cs b/Adaptation/FileHandlers/txt/Detail.cs similarity index 90% rename from Adaptation/FileHandlers/pcl/Detail.cs rename to Adaptation/FileHandlers/txt/Detail.cs index 5abc494..2eddb6f 100644 --- a/Adaptation/FileHandlers/pcl/Detail.cs +++ b/Adaptation/FileHandlers/txt/Detail.cs @@ -1,4 +1,4 @@ -namespace Adaptation.FileHandlers.pcl; +namespace Adaptation.FileHandlers.txt; public class Detail { diff --git a/Adaptation/FileHandlers/pcl/FileRead.cs b/Adaptation/FileHandlers/txt/FileRead.cs similarity index 90% rename from Adaptation/FileHandlers/pcl/FileRead.cs rename to Adaptation/FileHandlers/txt/FileRead.cs index 1c16595..0ed06d0 100644 --- a/Adaptation/FileHandlers/pcl/FileRead.cs +++ b/Adaptation/FileHandlers/txt/FileRead.cs @@ -9,7 +9,7 @@ using System.Linq; using System.Text.Json; using System.Text.RegularExpressions; -namespace Adaptation.FileHandlers.pcl; +namespace Adaptation.FileHandlers.txt; public class FileRead : Shared.FileRead, IFileRead { @@ -105,8 +105,14 @@ public class FileRead : Shared.FileRead, IFileRead IProcessData iProcessData = new ProcessData(this, _Logistics, results.Item4); if (iProcessData is not ProcessData processData) throw new Exception(string.Concat("A) No Data - ", dateTime.Ticks)); - string mid = string.Concat(processData.Reactor, "-", processData.RDS, "-", processData.PSN); - mid = Regex.Replace(mid, @"[\\,\/,\:,\*,\?,\"",\<,\>,\|]", "_").Split('\r')[0].Split('\n')[0]; + string mid; + if (!string.IsNullOrEmpty(processData.Employee) && string.IsNullOrEmpty(processData.Reactor) && string.IsNullOrEmpty(processData.RDS) && string.IsNullOrEmpty(processData.PSN)) + mid = processData.Employee; + else + { + mid = string.Concat(processData.Reactor, "-", processData.RDS, "-", processData.PSN); + mid = Regex.Replace(mid, @"[\\,\/,\:,\*,\?,\"",\<,\>,\|]", "_").Split('\r')[0].Split('\n')[0]; + } SetFileParameterLotID(mid); _Logistics.Update(mid, processData.Reactor); if (!iProcessData.Details.Any()) diff --git a/Adaptation/FileHandlers/pcl/ProcessData.cs b/Adaptation/FileHandlers/txt/ProcessData.cs similarity index 78% rename from Adaptation/FileHandlers/pcl/ProcessData.cs rename to Adaptation/FileHandlers/txt/ProcessData.cs index 60c556d..f4cb91a 100644 --- a/Adaptation/FileHandlers/pcl/ProcessData.cs +++ b/Adaptation/FileHandlers/txt/ProcessData.cs @@ -12,7 +12,7 @@ using System.Text.Json; using System.Text.Json.Serialization; using System.Text.RegularExpressions; -namespace Adaptation.FileHandlers.pcl; +namespace Adaptation.FileHandlers.txt; public class ProcessData : IProcessData { @@ -32,8 +32,8 @@ public class ProcessData : IProcessData public string DataReject { get; set; } public string Date { get; set; } public string Employee { get; set; } - public string EquipId { get; set; } public string Engineer { get; set; } + public string EquipId { get; set; } public string FileName { get; set; } public string Layer { get; set; } public string Lot { get; set; } @@ -242,6 +242,152 @@ public class ProcessData : IProcessData return result; } + public static Descriptor GetDescriptor(string text) + { + Descriptor result; + string psn; + string rds; + string run; + string zone; + string title; + string layer; + string reactor; + string[] segments; + const string defaultPSN = "0000"; + const string defaultRDS = "000000"; + const string defaultReactor = "00"; + if (text.Length is 2 or 3) + { + run = text; + title = text; + psn = defaultPSN; + rds = defaultRDS; + zone = string.Empty; + layer = string.Empty; + reactor = defaultReactor; + } + else + { + // Remove illegal characters \/:*?"<>| found in the run. + title = Regex.Replace(text.Trim(), @"[\\,\/,\:,\*,\?,\"",\<,\>,\|]", "_").Split('\r')[0].Split('\n')[0]; + if (title.StartsWith("1T") || title.StartsWith("1t")) + title = title.Substring(2); + run = title; + segments = title.Split('-'); + if (segments.Length == 0) + reactor = defaultReactor; + else + reactor = segments[0]; + if (segments.Length <= 1) + rds = defaultRDS; + else + rds = segments[1]; + if (reactor.Length > 3) + { + rds = reactor; + reactor = defaultReactor; + } + if (segments.Length <= 2) + psn = defaultPSN; + else + psn = segments[2]; + if (segments.Length < 3) + layer = string.Empty; + else + { + string[] segmentsB = segments[2].Split('.'); + if (segmentsB.Length > 1) + psn = segmentsB[0]; + if (segmentsB.Length <= 1) + layer = string.Empty; + else + layer = segmentsB[1]; + } + if (segments.Length <= 3) + zone = string.Empty; + else + zone = segments[3]; + } + result = new(layer, psn, rds, reactor, run, title, zone); + return result; + } + + private void Set(Logistics logistics, string receivedData) + { + string lot; + string psn; + string rds; + string run; + string date; + string temp; + string zone; + string layer; + string title; + string recipe; + string dlRatio; + string equipId; + string reactor; + string employee; + string engineer; + string resistivitySpec; + ScanPast("RUN:"); + title = GetToEOL(); + ScanPast("Recipe:"); + recipe = GetBefore("RESISTIVITY SPEC:"); + if (string.IsNullOrEmpty(recipe)) + { + _I = 0; + _Data = receivedData; + ScanPast("RUN:"); + title = GetToEOL(); + ScanPast("DEVICE:"); + recipe = GetBefore("RESISTIVITY SPEC:"); + } + Descriptor descriptor = GetDescriptor(title); + psn = descriptor.PSN; + rds = descriptor.RDS; + run = descriptor.Run; + zone = descriptor.Zone; + layer = descriptor.Layer; + title = descriptor.Title; + reactor = descriptor.Reactor; + resistivitySpec = GetToEOL(); + ScanPast("EQUIP#:"); + equipId = GetBefore("Engineer:"); + // Remove illegal characters \/:*?"<>| found in the equipId. + equipId = Regex.Replace(equipId, @"[\\,\/,\:,\*,\?,\"",\<,\>,\|]", "_").Split('\r')[0].Split('\n')[0]; + engineer = GetToEOL(); + ScanPast("LotID:"); + lot = GetBefore("D.L.RATIO:"); + dlRatio = GetToEOL(); + ScanPast("OPERATOR:"); + employee = GetBefore("TEMP:"); + temp = GetToken(); + string dateTimeText = GetToEOL(); + DateTime dateTime = GetDateTime(logistics, dateTimeText); + date = dateTime.ToString(); + //create filename / unique id + string timeFormat = "yyyyMMddHHmmss"; + _Log.Debug($"****ParseData - Title:{title}; EquipId:{equipId};"); + if (string.IsNullOrEmpty(title)) + throw new Exception("Batch (title) information does not exist"); + Lot = lot; + PSN = psn; + RDS = rds; + Run = run; + Date = date; + Temp = temp; + Zone = zone; + Layer = layer; + Recipe = recipe; + DLRatio = dlRatio; + Reactor = reactor; + Employee = employee; + Engineer = engineer; + ResistivitySpec = resistivitySpec; + UniqueId = string.Concat(equipId, "_", title, "_", logistics.DateTimeFromSequence.ToString(timeFormat)); + } + private void Parse(IFileRead fileRead, Logistics logistics, List<FileInfo> fileInfoCollection) { if (fileRead is null) @@ -277,60 +423,7 @@ public class ProcessData : IProcessData Detail detail; _I = 0; _Data = receivedData; - ScanPast("RUN:"); - string title = GetToEOL(); - ScanPast("Recipe:"); - Recipe = GetBefore("RESISTIVITY SPEC:"); - if (string.IsNullOrEmpty(Recipe)) - { - _I = 0; - _Data = receivedData; - ScanPast("RUN:"); - title = GetToEOL(); - ScanPast("DEVICE:"); - Recipe = GetBefore("RESISTIVITY SPEC:"); - } - // Remove illegal characters \/:*?"<>| found in the run. - title = Regex.Replace(title.Trim(), @"[\\,\/,\:,\*,\?,\"",\<,\>,\|]", "_").Split('\r')[0].Split('\n')[0]; - if (title.StartsWith("1T") || title.StartsWith("1t")) - title = title.Substring(2); - Run = title; - string[] parsedBatch = title.Split('-'); - if (parsedBatch.Length == 1) - RDS = title; - else - { - if (parsedBatch.Length > 0) - Reactor = parsedBatch[0]; - if (parsedBatch.Length > 1) - RDS = parsedBatch[1]; - if (parsedBatch.Length > 2) - { - string[] parsedPSN = parsedBatch[2].Split('.'); - if (parsedPSN.Length >= 1) - PSN = parsedPSN[0]; - if (parsedPSN.Length >= 2) - Layer = parsedPSN[1]; - } - if (parsedBatch.Length > 3) - Zone = parsedBatch[3]; - } - ResistivitySpec = GetToEOL(); - ScanPast("EQUIP#:"); - string equipId = GetBefore("Engineer:"); - // Remove illegal characters \/:*?"<>| found in the equipId. - equipId = Regex.Replace(equipId, @"[\\,\/,\:,\*,\?,\"",\<,\>,\|]", "_").Split('\r')[0].Split('\n')[0]; - EquipId = equipId; - Engineer = GetToEOL(); - ScanPast("LotID:"); - Lot = GetBefore("D.L.RATIO:"); - DLRatio = GetToEOL(); - ScanPast("OPERATOR:"); - Employee = GetBefore("TEMP:"); - Temp = GetToken(); - string dateTimeText = GetToEOL(); - DateTime dateTime = GetDateTime(logistics, dateTimeText); - Date = dateTime.ToString(); + Set(logistics, receivedData); ScanPast("AutoOptimizeGain ="); AutoOptimizeGain = GetBefore("AutoProbeHeightSet ="); AutoProbeHeightSet = GetToEOL(); @@ -400,12 +493,6 @@ public class ProcessData : IProcessData } } } - //create filename / unique id - string timeFormat = "yyyyMMddHHmmss"; - _Log.Debug($"****ParseData - Title:{title}; EquipId:{equipId};"); - if (string.IsNullOrEmpty(title)) - throw new Exception("Batch (title) information does not exist"); - UniqueId = string.Concat(equipId, "_", title, "_", logistics.DateTimeFromSequence.ToString(timeFormat)); foreach (Detail item in _Details.Cast<Detail>()) { item.HeaderUniqueId = UniqueId; diff --git a/Adaptation/Shared/FileRead.cs b/Adaptation/Shared/FileRead.cs index d91b636..06374d3 100644 --- a/Adaptation/Shared/FileRead.cs +++ b/Adaptation/Shared/FileRead.cs @@ -54,6 +54,7 @@ public class FileRead : Properties.IFileRead string Properties.IFileRead.EventName => _EventName; string Properties.IFileRead.MesEntity => _MesEntity; bool Properties.IFileRead.IsEAFHosted => _IsEAFHosted; + bool Properties.IFileRead.IsDuplicator => _IsDuplicator; string Properties.IFileRead.EquipmentType => _EquipmentType; string Properties.IFileRead.ReportFullPath => _ReportFullPath; string Properties.IFileRead.CellInstanceName => _CellInstanceName; diff --git a/Adaptation/Shared/Properties/IFileRead.cs b/Adaptation/Shared/Properties/IFileRead.cs index 2e85ac9..5cf9a69 100644 --- a/Adaptation/Shared/Properties/IFileRead.cs +++ b/Adaptation/Shared/Properties/IFileRead.cs @@ -7,6 +7,7 @@ public interface IFileRead string MesEntity { get; } bool IsEAFHosted { get; } string EventName { get; } + bool IsDuplicator { get; } string EquipmentType { get; } string ReportFullPath { get; } string CellInstanceName { get; } diff --git a/Adaptation/_Tests/CreateSelfDescription/Staging/v2.36.1/CDE2.cs b/Adaptation/_Tests/CreateSelfDescription/Staging/v2.36.1/CDE2.cs index 8c00f1a..bb0b105 100644 --- a/Adaptation/_Tests/CreateSelfDescription/Staging/v2.36.1/CDE2.cs +++ b/Adaptation/_Tests/CreateSelfDescription/Staging/v2.36.1/CDE2.cs @@ -14,15 +14,18 @@ public class CDE2 : EAFLoggingUnitTesting #pragma warning disable CA2254 #pragma warning disable IDE0060 + internal static string DummyRoot { get; private set; } internal static CDE2 EAFLoggingUnitTesting { get; private set; } - public CDE2() : base(testContext: null, declaringType: null, skipEquipmentDictionary: false) + static CDE2() => DummyRoot = @"\\messv02ecc1.ec.local\EC_Characterization_Si\Dummy"; + + public CDE2() : base(DummyRoot, testContext: null, declaringType: null, skipEquipmentDictionary: false) { if (EAFLoggingUnitTesting is null) throw new Exception(); } - public CDE2(TestContext testContext) : base(testContext, new StackFrame().GetMethod().DeclaringType, skipEquipmentDictionary: false) + public CDE2(TestContext testContext) : base(DummyRoot, testContext, new StackFrame().GetMethod().DeclaringType, skipEquipmentDictionary: false) { } @@ -46,6 +49,9 @@ public class CDE2 : EAFLoggingUnitTesting EAFLoggingUnitTesting.Dispose(); } +#if true + [Ignore] +#endif [TestMethod] public void Staging__v2_36_1__CDE2__() { 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 24b36a8..0fd529f 100644 --- a/Adaptation/_Tests/CreateSelfDescription/Staging/v2.36.1/CDE3-EQPT.cs +++ b/Adaptation/_Tests/CreateSelfDescription/Staging/v2.36.1/CDE3-EQPT.cs @@ -15,15 +15,18 @@ public class CDE3_EQPT : EAFLoggingUnitTesting #pragma warning disable CA2254 #pragma warning disable IDE0060 + internal static string DummyRoot { get; private set; } internal static CDE3_EQPT EAFLoggingUnitTesting { get; private set; } - public CDE3_EQPT() : base(testContext: null, declaringType: null, skipEquipmentDictionary: false) + static CDE3_EQPT() => DummyRoot = @"\\messv02ecc1.ec.local\EC_Characterization_Si\Dummy"; + + public CDE3_EQPT() : base(DummyRoot, testContext: null, declaringType: null, skipEquipmentDictionary: false) { if (EAFLoggingUnitTesting is null) throw new Exception(); } - public CDE3_EQPT(TestContext testContext) : base(testContext, new StackFrame().GetMethod().DeclaringType, skipEquipmentDictionary: false) + public CDE3_EQPT(TestContext testContext) : base(DummyRoot, testContext, new StackFrame().GetMethod().DeclaringType, skipEquipmentDictionary: false) { } @@ -47,6 +50,9 @@ public class CDE3_EQPT : EAFLoggingUnitTesting EAFLoggingUnitTesting.Dispose(); } +#if true + [Ignore] +#endif [TestMethod] public void Staging__v2_36_1__CDE3_EQPT__DownloadRsMFile() { diff --git a/Adaptation/_Tests/CreateSelfDescription/Staging/v2.36.1/CDE3.cs b/Adaptation/_Tests/CreateSelfDescription/Staging/v2.36.1/CDE3.cs index 1a4aa19..9aed78c 100644 --- a/Adaptation/_Tests/CreateSelfDescription/Staging/v2.36.1/CDE3.cs +++ b/Adaptation/_Tests/CreateSelfDescription/Staging/v2.36.1/CDE3.cs @@ -15,15 +15,18 @@ public class CDE3 : EAFLoggingUnitTesting #pragma warning disable CA2254 #pragma warning disable IDE0060 + internal static string DummyRoot { get; private set; } internal static CDE3 EAFLoggingUnitTesting { get; private set; } - public CDE3() : base(testContext: null, declaringType: null, skipEquipmentDictionary: false) + static CDE3() => DummyRoot = @"\\messv02ecc1.ec.local\EC_Characterization_Si\Dummy"; + + public CDE3() : base(DummyRoot, testContext: null, declaringType: null, skipEquipmentDictionary: false) { if (EAFLoggingUnitTesting is null) throw new Exception(); } - public CDE3(TestContext testContext) : base(testContext, new StackFrame().GetMethod().DeclaringType, skipEquipmentDictionary: false) + public CDE3(TestContext testContext) : base(DummyRoot, testContext, new StackFrame().GetMethod().DeclaringType, skipEquipmentDictionary: false) { } @@ -47,6 +50,9 @@ public class CDE3 : EAFLoggingUnitTesting EAFLoggingUnitTesting.Dispose(); } +#if true + [Ignore] +#endif [TestMethod] public void Staging__v2_36_1__CDE3__RsM() { diff --git a/Adaptation/_Tests/CreateSelfDescription/Staging/v2.36.1/CDE5.cs b/Adaptation/_Tests/CreateSelfDescription/Staging/v2.36.1/CDE5.cs index f3d18af..256ce42 100644 --- a/Adaptation/_Tests/CreateSelfDescription/Staging/v2.36.1/CDE5.cs +++ b/Adaptation/_Tests/CreateSelfDescription/Staging/v2.36.1/CDE5.cs @@ -14,15 +14,18 @@ public class CDE5 : EAFLoggingUnitTesting #pragma warning disable CA2254 #pragma warning disable IDE0060 + internal static string DummyRoot { get; private set; } internal static CDE5 EAFLoggingUnitTesting { get; private set; } - public CDE5() : base(testContext: null, declaringType: null, skipEquipmentDictionary: false) + static CDE5() => DummyRoot = @"\\messv02ecc1.ec.local\EC_Characterization_Si\Dummy"; + + public CDE5() : base(DummyRoot, testContext: null, declaringType: null, skipEquipmentDictionary: false) { if (EAFLoggingUnitTesting is null) throw new Exception(); } - public CDE5(TestContext testContext) : base(testContext, new StackFrame().GetMethod().DeclaringType, skipEquipmentDictionary: false) + public CDE5(TestContext testContext) : base(DummyRoot, testContext, new StackFrame().GetMethod().DeclaringType, skipEquipmentDictionary: false) { } @@ -46,6 +49,9 @@ public class CDE5 : EAFLoggingUnitTesting EAFLoggingUnitTesting.Dispose(); } +#if true + [Ignore] +#endif [TestMethod] public void Staging__v2_36_1__CDE5__() { diff --git a/Adaptation/_Tests/CreateSelfDescription/Staging/v2.36.1/MET08RESIMAPCDE.cs b/Adaptation/_Tests/CreateSelfDescription/Staging/v2.36.1/MET08RESIMAPCDE.cs index 1324388..5b1b839 100644 --- a/Adaptation/_Tests/CreateSelfDescription/Staging/v2.36.1/MET08RESIMAPCDE.cs +++ b/Adaptation/_Tests/CreateSelfDescription/Staging/v2.36.1/MET08RESIMAPCDE.cs @@ -15,15 +15,18 @@ public class MET08RESIMAPCDE : EAFLoggingUnitTesting #pragma warning disable CA2254 #pragma warning disable IDE0060 + internal static string DummyRoot { get; private set; } internal static MET08RESIMAPCDE EAFLoggingUnitTesting { get; private set; } - public MET08RESIMAPCDE() : base(testContext: null, declaringType: null, skipEquipmentDictionary: false) + static MET08RESIMAPCDE() => DummyRoot = @"\\messv02ecc1.ec.local\EC_Characterization_Si\Dummy"; + + public MET08RESIMAPCDE() : base(DummyRoot, testContext: null, declaringType: null, skipEquipmentDictionary: false) { if (EAFLoggingUnitTesting is null) throw new Exception(); } - public MET08RESIMAPCDE(TestContext testContext) : base(testContext, new StackFrame().GetMethod().DeclaringType, skipEquipmentDictionary: false) + public MET08RESIMAPCDE(TestContext testContext) : base(DummyRoot, testContext, new StackFrame().GetMethod().DeclaringType, skipEquipmentDictionary: false) { } @@ -47,6 +50,9 @@ public class MET08RESIMAPCDE : EAFLoggingUnitTesting EAFLoggingUnitTesting.Dispose(); } +#if true + [Ignore] +#endif [TestMethod] public void Staging__v2_36_1__MET08RESIMAPCDE__MET08RESIMAPCDE() { @@ -57,6 +63,9 @@ public class MET08RESIMAPCDE : EAFLoggingUnitTesting EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit")); } +#if true + [Ignore] +#endif [TestMethod] public void Staging__v2_36_1__MET08RESIMAPCDE__MET08RESIMAPCDE_() { @@ -67,6 +76,9 @@ public class MET08RESIMAPCDE : EAFLoggingUnitTesting EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit")); } +#if true + [Ignore] +#endif [TestMethod] public void Staging__v2_36_1__MET08RESIMAPCDE__MET08RESIMAPCDE__() { @@ -77,6 +89,9 @@ public class MET08RESIMAPCDE : EAFLoggingUnitTesting EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit")); } +#if true + [Ignore] +#endif [TestMethod] public void Staging__v2_36_1__MET08RESIMAPCDE__MET08RESIMAPCDE___() { @@ -87,6 +102,9 @@ public class MET08RESIMAPCDE : EAFLoggingUnitTesting EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit")); } +#if true + [Ignore] +#endif [TestMethod] public void Staging__v2_36_1__MET08RESIMAPCDE__MET08RESIMAPCDE____() { @@ -97,6 +115,9 @@ public class MET08RESIMAPCDE : EAFLoggingUnitTesting EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit")); } +#if true + [Ignore] +#endif [TestMethod] public void Staging__v2_36_1__MET08RESIMAPCDE__MET08RESIMAPCDE_____() { @@ -107,6 +128,9 @@ public class MET08RESIMAPCDE : EAFLoggingUnitTesting EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit")); } +#if true + [Ignore] +#endif [TestMethod] public void Staging__v2_36_1__MET08RESIMAPCDE__MET08RESIMAPCDE______() { @@ -117,6 +141,9 @@ public class MET08RESIMAPCDE : EAFLoggingUnitTesting EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit")); } +#if true + [Ignore] +#endif [TestMethod] public void Staging__v2_36_1__MET08RESIMAPCDE__MET08RESIMAPCDE_______() { @@ -127,6 +154,9 @@ public class MET08RESIMAPCDE : EAFLoggingUnitTesting EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit")); } +#if true + [Ignore] +#endif [TestMethod] public void Staging__v2_36_1__MET08RESIMAPCDE__MET08RESIMAPCDE________() { diff --git a/Adaptation/_Tests/CreateSelfDescription/Staging/v2.39.0/CDE2.cs b/Adaptation/_Tests/CreateSelfDescription/Staging/v2.39.0/CDE2.cs index e65071a..d22dada 100644 --- a/Adaptation/_Tests/CreateSelfDescription/Staging/v2.39.0/CDE2.cs +++ b/Adaptation/_Tests/CreateSelfDescription/Staging/v2.39.0/CDE2.cs @@ -14,15 +14,18 @@ public class CDE2 : EAFLoggingUnitTesting #pragma warning disable CA2254 #pragma warning disable IDE0060 + internal static string DummyRoot { get; private set; } internal static CDE2 EAFLoggingUnitTesting { get; private set; } - public CDE2() : base(testContext: null, declaringType: null, skipEquipmentDictionary: false) + static CDE2() => DummyRoot = @"\\messv02ecc1.ec.local\EC_Characterization_Si\Dummy"; + + public CDE2() : base(DummyRoot, testContext: null, declaringType: null, skipEquipmentDictionary: false) { if (EAFLoggingUnitTesting is null) throw new Exception(); } - public CDE2(TestContext testContext) : base(testContext, new StackFrame().GetMethod().DeclaringType, skipEquipmentDictionary: false) + public CDE2(TestContext testContext) : base(DummyRoot, testContext, new StackFrame().GetMethod().DeclaringType, skipEquipmentDictionary: false) { } @@ -46,6 +49,9 @@ public class CDE2 : EAFLoggingUnitTesting EAFLoggingUnitTesting.Dispose(); } +#if true + [Ignore] +#endif [TestMethod] public void Staging__v2_39_0__CDE2__() { 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 1216747..db0b118 100644 --- a/Adaptation/_Tests/CreateSelfDescription/Staging/v2.39.0/CDE3-EQPT.cs +++ b/Adaptation/_Tests/CreateSelfDescription/Staging/v2.39.0/CDE3-EQPT.cs @@ -15,15 +15,18 @@ public class CDE3_EQPT : EAFLoggingUnitTesting #pragma warning disable CA2254 #pragma warning disable IDE0060 + internal static string DummyRoot { get; private set; } internal static CDE3_EQPT EAFLoggingUnitTesting { get; private set; } - public CDE3_EQPT() : base(testContext: null, declaringType: null, skipEquipmentDictionary: false) + static CDE3_EQPT() => DummyRoot = @"\\messv02ecc1.ec.local\EC_Characterization_Si\Dummy"; + + public CDE3_EQPT() : base(DummyRoot, testContext: null, declaringType: null, skipEquipmentDictionary: false) { if (EAFLoggingUnitTesting is null) throw new Exception(); } - public CDE3_EQPT(TestContext testContext) : base(testContext, new StackFrame().GetMethod().DeclaringType, skipEquipmentDictionary: false) + public CDE3_EQPT(TestContext testContext) : base(DummyRoot, testContext, new StackFrame().GetMethod().DeclaringType, skipEquipmentDictionary: false) { } @@ -47,6 +50,9 @@ public class CDE3_EQPT : EAFLoggingUnitTesting EAFLoggingUnitTesting.Dispose(); } +#if true + [Ignore] +#endif [TestMethod] public void Staging__v2_39_0__CDE3_EQPT__DownloadRsMFile() { diff --git a/Adaptation/_Tests/CreateSelfDescription/Staging/v2.39.0/CDE3.cs b/Adaptation/_Tests/CreateSelfDescription/Staging/v2.39.0/CDE3.cs index 5bc937b..5d67bd8 100644 --- a/Adaptation/_Tests/CreateSelfDescription/Staging/v2.39.0/CDE3.cs +++ b/Adaptation/_Tests/CreateSelfDescription/Staging/v2.39.0/CDE3.cs @@ -15,15 +15,18 @@ public class CDE3 : EAFLoggingUnitTesting #pragma warning disable CA2254 #pragma warning disable IDE0060 + internal static string DummyRoot { get; private set; } internal static CDE3 EAFLoggingUnitTesting { get; private set; } - public CDE3() : base(testContext: null, declaringType: null, skipEquipmentDictionary: false) + static CDE3() => DummyRoot = @"\\messv02ecc1.ec.local\EC_Characterization_Si\Dummy"; + + public CDE3() : base(DummyRoot, testContext: null, declaringType: null, skipEquipmentDictionary: false) { if (EAFLoggingUnitTesting is null) throw new Exception(); } - public CDE3(TestContext testContext) : base(testContext, new StackFrame().GetMethod().DeclaringType, skipEquipmentDictionary: false) + public CDE3(TestContext testContext) : base(DummyRoot, testContext, new StackFrame().GetMethod().DeclaringType, skipEquipmentDictionary: false) { } @@ -47,6 +50,9 @@ public class CDE3 : EAFLoggingUnitTesting EAFLoggingUnitTesting.Dispose(); } +#if true + [Ignore] +#endif [TestMethod] public void Staging__v2_39_0__CDE3__RsM() { diff --git a/Adaptation/_Tests/CreateSelfDescription/Staging/v2.39.0/CDE5.cs b/Adaptation/_Tests/CreateSelfDescription/Staging/v2.39.0/CDE5.cs index 8fb76ee..2370a69 100644 --- a/Adaptation/_Tests/CreateSelfDescription/Staging/v2.39.0/CDE5.cs +++ b/Adaptation/_Tests/CreateSelfDescription/Staging/v2.39.0/CDE5.cs @@ -14,15 +14,18 @@ public class CDE5 : EAFLoggingUnitTesting #pragma warning disable CA2254 #pragma warning disable IDE0060 + internal static string DummyRoot { get; private set; } internal static CDE5 EAFLoggingUnitTesting { get; private set; } - public CDE5() : base(testContext: null, declaringType: null, skipEquipmentDictionary: false) + static CDE5() => DummyRoot = @"\\messv02ecc1.ec.local\EC_Characterization_Si\Dummy"; + + public CDE5() : base(DummyRoot, testContext: null, declaringType: null, skipEquipmentDictionary: false) { if (EAFLoggingUnitTesting is null) throw new Exception(); } - public CDE5(TestContext testContext) : base(testContext, new StackFrame().GetMethod().DeclaringType, skipEquipmentDictionary: false) + public CDE5(TestContext testContext) : base(DummyRoot, testContext, new StackFrame().GetMethod().DeclaringType, skipEquipmentDictionary: false) { } @@ -46,6 +49,9 @@ public class CDE5 : EAFLoggingUnitTesting EAFLoggingUnitTesting.Dispose(); } +#if true + [Ignore] +#endif [TestMethod] public void Staging__v2_39_0__CDE5__() { diff --git a/Adaptation/_Tests/CreateSelfDescription/Staging/v2.39.0/MET08RESIMAPCDE.cs b/Adaptation/_Tests/CreateSelfDescription/Staging/v2.39.0/MET08RESIMAPCDE.cs index 4d824f3..e98e6ff 100644 --- a/Adaptation/_Tests/CreateSelfDescription/Staging/v2.39.0/MET08RESIMAPCDE.cs +++ b/Adaptation/_Tests/CreateSelfDescription/Staging/v2.39.0/MET08RESIMAPCDE.cs @@ -15,15 +15,18 @@ public class MET08RESIMAPCDE : EAFLoggingUnitTesting #pragma warning disable CA2254 #pragma warning disable IDE0060 + internal static string DummyRoot { get; private set; } internal static MET08RESIMAPCDE EAFLoggingUnitTesting { get; private set; } - public MET08RESIMAPCDE() : base(testContext: null, declaringType: null, skipEquipmentDictionary: false) + static MET08RESIMAPCDE() => DummyRoot = @"\\messv02ecc1.ec.local\EC_Characterization_Si\Dummy"; + + public MET08RESIMAPCDE() : base(DummyRoot, testContext: null, declaringType: null, skipEquipmentDictionary: false) { if (EAFLoggingUnitTesting is null) throw new Exception(); } - public MET08RESIMAPCDE(TestContext testContext) : base(testContext, new StackFrame().GetMethod().DeclaringType, skipEquipmentDictionary: false) + public MET08RESIMAPCDE(TestContext testContext) : base(DummyRoot, testContext, new StackFrame().GetMethod().DeclaringType, skipEquipmentDictionary: false) { } @@ -47,6 +50,9 @@ public class MET08RESIMAPCDE : EAFLoggingUnitTesting EAFLoggingUnitTesting.Dispose(); } +#if true + [Ignore] +#endif [TestMethod] public void Staging__v2_39_0__MET08RESIMAPCDE__MET08RESIMAPCDE() { @@ -57,6 +63,9 @@ public class MET08RESIMAPCDE : EAFLoggingUnitTesting EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit")); } +#if true + [Ignore] +#endif [TestMethod] public void Staging__v2_39_0__MET08RESIMAPCDE__MET08RESIMAPCDE_() { @@ -67,6 +76,9 @@ public class MET08RESIMAPCDE : EAFLoggingUnitTesting EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit")); } +#if true + [Ignore] +#endif [TestMethod] public void Staging__v2_39_0__MET08RESIMAPCDE__MET08RESIMAPCDE__() { @@ -77,6 +89,9 @@ public class MET08RESIMAPCDE : EAFLoggingUnitTesting EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit")); } +#if true + [Ignore] +#endif [TestMethod] public void Staging__v2_39_0__MET08RESIMAPCDE__MET08RESIMAPCDE___() { @@ -87,6 +102,9 @@ public class MET08RESIMAPCDE : EAFLoggingUnitTesting EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit")); } +#if true + [Ignore] +#endif [TestMethod] public void Staging__v2_39_0__MET08RESIMAPCDE__MET08RESIMAPCDE____() { @@ -97,6 +115,9 @@ public class MET08RESIMAPCDE : EAFLoggingUnitTesting EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit")); } +#if true + [Ignore] +#endif [TestMethod] public void Staging__v2_39_0__MET08RESIMAPCDE__MET08RESIMAPCDE_____() { @@ -107,6 +128,9 @@ public class MET08RESIMAPCDE : EAFLoggingUnitTesting EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit")); } +#if true + [Ignore] +#endif [TestMethod] public void Staging__v2_39_0__MET08RESIMAPCDE__MET08RESIMAPCDE______() { @@ -117,6 +141,9 @@ public class MET08RESIMAPCDE : EAFLoggingUnitTesting EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit")); } +#if true + [Ignore] +#endif [TestMethod] public void Staging__v2_39_0__MET08RESIMAPCDE__MET08RESIMAPCDE_______() { @@ -127,6 +154,9 @@ public class MET08RESIMAPCDE : EAFLoggingUnitTesting EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit")); } +#if true + [Ignore] +#endif [TestMethod] public void Staging__v2_39_0__MET08RESIMAPCDE__MET08RESIMAPCDE________() { diff --git a/Adaptation/_Tests/CreateSelfDescription/Staging/v2.43.2/CDE2.cs b/Adaptation/_Tests/CreateSelfDescription/Staging/v2.43.2/CDE2.cs index 2a1f53c..38c6887 100644 --- a/Adaptation/_Tests/CreateSelfDescription/Staging/v2.43.2/CDE2.cs +++ b/Adaptation/_Tests/CreateSelfDescription/Staging/v2.43.2/CDE2.cs @@ -14,15 +14,18 @@ public class CDE2 : EAFLoggingUnitTesting #pragma warning disable CA2254 #pragma warning disable IDE0060 + internal static string DummyRoot { get; private set; } internal static CDE2 EAFLoggingUnitTesting { get; private set; } - public CDE2() : base(testContext: null, declaringType: null, skipEquipmentDictionary: false) + static CDE2() => DummyRoot = @"\\messv02ecc1.ec.local\EC_Characterization_Si\Dummy"; + + public CDE2() : base(DummyRoot, testContext: null, declaringType: null, skipEquipmentDictionary: false) { if (EAFLoggingUnitTesting is null) throw new Exception(); } - public CDE2(TestContext testContext) : base(testContext, new StackFrame().GetMethod().DeclaringType, skipEquipmentDictionary: false) + public CDE2(TestContext testContext) : base(DummyRoot, testContext, new StackFrame().GetMethod().DeclaringType, skipEquipmentDictionary: false) { } @@ -46,6 +49,9 @@ public class CDE2 : EAFLoggingUnitTesting EAFLoggingUnitTesting.Dispose(); } +#if true + [Ignore] +#endif [TestMethod] public void Staging__v2_43_2__CDE2__() { 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 655826d..64cd620 100644 --- a/Adaptation/_Tests/CreateSelfDescription/Staging/v2.43.2/CDE3-EQPT.cs +++ b/Adaptation/_Tests/CreateSelfDescription/Staging/v2.43.2/CDE3-EQPT.cs @@ -15,15 +15,18 @@ public class CDE3_EQPT : EAFLoggingUnitTesting #pragma warning disable CA2254 #pragma warning disable IDE0060 + internal static string DummyRoot { get; private set; } internal static CDE3_EQPT EAFLoggingUnitTesting { get; private set; } - public CDE3_EQPT() : base(testContext: null, declaringType: null, skipEquipmentDictionary: false) + static CDE3_EQPT() => DummyRoot = @"\\messv02ecc1.ec.local\EC_Characterization_Si\Dummy"; + + public CDE3_EQPT() : base(DummyRoot, testContext: null, declaringType: null, skipEquipmentDictionary: false) { if (EAFLoggingUnitTesting is null) throw new Exception(); } - public CDE3_EQPT(TestContext testContext) : base(testContext, new StackFrame().GetMethod().DeclaringType, skipEquipmentDictionary: false) + public CDE3_EQPT(TestContext testContext) : base(DummyRoot, testContext, new StackFrame().GetMethod().DeclaringType, skipEquipmentDictionary: false) { } @@ -47,6 +50,9 @@ public class CDE3_EQPT : EAFLoggingUnitTesting EAFLoggingUnitTesting.Dispose(); } +#if true + [Ignore] +#endif [TestMethod] public void Staging__v2_43_2__CDE3_EQPT__DownloadRsMFile() { diff --git a/Adaptation/_Tests/CreateSelfDescription/Staging/v2.43.2/CDE3.cs b/Adaptation/_Tests/CreateSelfDescription/Staging/v2.43.2/CDE3.cs index a403bbf..641c752 100644 --- a/Adaptation/_Tests/CreateSelfDescription/Staging/v2.43.2/CDE3.cs +++ b/Adaptation/_Tests/CreateSelfDescription/Staging/v2.43.2/CDE3.cs @@ -15,15 +15,18 @@ public class CDE3 : EAFLoggingUnitTesting #pragma warning disable CA2254 #pragma warning disable IDE0060 + internal static string DummyRoot { get; private set; } internal static CDE3 EAFLoggingUnitTesting { get; private set; } - public CDE3() : base(testContext: null, declaringType: null, skipEquipmentDictionary: false) + static CDE3() => DummyRoot = @"\\messv02ecc1.ec.local\EC_Characterization_Si\Dummy"; + + public CDE3() : base(DummyRoot, testContext: null, declaringType: null, skipEquipmentDictionary: false) { if (EAFLoggingUnitTesting is null) throw new Exception(); } - public CDE3(TestContext testContext) : base(testContext, new StackFrame().GetMethod().DeclaringType, skipEquipmentDictionary: false) + public CDE3(TestContext testContext) : base(DummyRoot, testContext, new StackFrame().GetMethod().DeclaringType, skipEquipmentDictionary: false) { } @@ -47,6 +50,9 @@ public class CDE3 : EAFLoggingUnitTesting EAFLoggingUnitTesting.Dispose(); } +#if true + [Ignore] +#endif [TestMethod] public void Staging__v2_43_2__CDE3__RsM() { diff --git a/Adaptation/_Tests/CreateSelfDescription/Staging/v2.43.2/CDE5.cs b/Adaptation/_Tests/CreateSelfDescription/Staging/v2.43.2/CDE5.cs index 8d74a24..6552dc7 100644 --- a/Adaptation/_Tests/CreateSelfDescription/Staging/v2.43.2/CDE5.cs +++ b/Adaptation/_Tests/CreateSelfDescription/Staging/v2.43.2/CDE5.cs @@ -14,15 +14,18 @@ public class CDE5 : EAFLoggingUnitTesting #pragma warning disable CA2254 #pragma warning disable IDE0060 + internal static string DummyRoot { get; private set; } internal static CDE5 EAFLoggingUnitTesting { get; private set; } - public CDE5() : base(testContext: null, declaringType: null, skipEquipmentDictionary: false) + static CDE5() => DummyRoot = @"\\messv02ecc1.ec.local\EC_Characterization_Si\Dummy"; + + public CDE5() : base(DummyRoot, testContext: null, declaringType: null, skipEquipmentDictionary: false) { if (EAFLoggingUnitTesting is null) throw new Exception(); } - public CDE5(TestContext testContext) : base(testContext, new StackFrame().GetMethod().DeclaringType, skipEquipmentDictionary: false) + public CDE5(TestContext testContext) : base(DummyRoot, testContext, new StackFrame().GetMethod().DeclaringType, skipEquipmentDictionary: false) { } @@ -46,6 +49,9 @@ public class CDE5 : EAFLoggingUnitTesting EAFLoggingUnitTesting.Dispose(); } +#if true + [Ignore] +#endif [TestMethod] public void Staging__v2_43_2__CDE5__() { diff --git a/Adaptation/_Tests/CreateSelfDescription/Staging/v2.43.2/MET08RESIMAPCDE.cs b/Adaptation/_Tests/CreateSelfDescription/Staging/v2.43.2/MET08RESIMAPCDE.cs index ae8cd86..050cbaa 100644 --- a/Adaptation/_Tests/CreateSelfDescription/Staging/v2.43.2/MET08RESIMAPCDE.cs +++ b/Adaptation/_Tests/CreateSelfDescription/Staging/v2.43.2/MET08RESIMAPCDE.cs @@ -15,15 +15,18 @@ public class MET08RESIMAPCDE : EAFLoggingUnitTesting #pragma warning disable CA2254 #pragma warning disable IDE0060 + internal static string DummyRoot { get; private set; } internal static MET08RESIMAPCDE EAFLoggingUnitTesting { get; private set; } - public MET08RESIMAPCDE() : base(testContext: null, declaringType: null, skipEquipmentDictionary: false) + static MET08RESIMAPCDE() => DummyRoot = @"\\messv02ecc1.ec.local\EC_Characterization_Si\Dummy"; + + public MET08RESIMAPCDE() : base(DummyRoot, testContext: null, declaringType: null, skipEquipmentDictionary: false) { if (EAFLoggingUnitTesting is null) throw new Exception(); } - public MET08RESIMAPCDE(TestContext testContext) : base(testContext, new StackFrame().GetMethod().DeclaringType, skipEquipmentDictionary: false) + public MET08RESIMAPCDE(TestContext testContext) : base(DummyRoot, testContext, new StackFrame().GetMethod().DeclaringType, skipEquipmentDictionary: false) { } @@ -47,6 +50,9 @@ public class MET08RESIMAPCDE : EAFLoggingUnitTesting EAFLoggingUnitTesting.Dispose(); } +#if true + [Ignore] +#endif [TestMethod] public void Staging__v2_43_2__MET08RESIMAPCDE__MoveMatchingFiles() { @@ -57,6 +63,9 @@ public class MET08RESIMAPCDE : EAFLoggingUnitTesting EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit")); } +#if true + [Ignore] +#endif [TestMethod] public void Staging__v2_43_2__MET08RESIMAPCDE__OpenInsightMetrologyViewer() { @@ -67,6 +76,9 @@ public class MET08RESIMAPCDE : EAFLoggingUnitTesting EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit")); } +#if true + [Ignore] +#endif [TestMethod] public void Staging__v2_43_2__MET08RESIMAPCDE__IQSSi() { @@ -77,6 +89,9 @@ public class MET08RESIMAPCDE : EAFLoggingUnitTesting EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit")); } +#if true + [Ignore] +#endif [TestMethod] public void Staging__v2_43_2__MET08RESIMAPCDE__OpenInsight() { @@ -87,6 +102,9 @@ public class MET08RESIMAPCDE : EAFLoggingUnitTesting EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit")); } +#if true + [Ignore] +#endif [TestMethod] public void Staging__v2_43_2__MET08RESIMAPCDE__OpenInsightMetrologyViewerAttachments() { @@ -97,6 +115,9 @@ public class MET08RESIMAPCDE : EAFLoggingUnitTesting EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit")); } +#if true + [Ignore] +#endif [TestMethod] public void Staging__v2_43_2__MET08RESIMAPCDE__APC() { @@ -107,6 +128,9 @@ public class MET08RESIMAPCDE : EAFLoggingUnitTesting EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit")); } +#if true + [Ignore] +#endif [TestMethod] public void Staging__v2_43_2__MET08RESIMAPCDE__SPaCe() { @@ -117,6 +141,9 @@ public class MET08RESIMAPCDE : EAFLoggingUnitTesting EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit")); } +#if true + [Ignore] +#endif [TestMethod] public void Staging__v2_43_2__MET08RESIMAPCDE__Processed() { @@ -127,6 +154,9 @@ public class MET08RESIMAPCDE : EAFLoggingUnitTesting EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit")); } +#if true + [Ignore] +#endif [TestMethod] public void Staging__v2_43_2__MET08RESIMAPCDE__Archive() { @@ -137,6 +167,9 @@ public class MET08RESIMAPCDE : EAFLoggingUnitTesting EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit")); } +#if true + [Ignore] +#endif [TestMethod] public void Staging__v2_43_2__MET08RESIMAPCDE__Dummy() { 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 ac65a80..37b23e3 100644 --- a/Adaptation/_Tests/CreateSelfDescription/Staging/v2.43.3/CDE5-EQPT.cs +++ b/Adaptation/_Tests/CreateSelfDescription/Staging/v2.43.3/CDE5-EQPT.cs @@ -15,15 +15,18 @@ public class CDE5_EQPT : EAFLoggingUnitTesting #pragma warning disable CA2254 #pragma warning disable IDE0060 + internal static string DummyRoot { get; private set; } internal static CDE5_EQPT EAFLoggingUnitTesting { get; private set; } - public CDE5_EQPT() : base(testContext: null, declaringType: null, skipEquipmentDictionary: false) + static CDE5_EQPT() => DummyRoot = @"\\messv02ecc1.ec.local\EC_Characterization_Si\Dummy"; + + public CDE5_EQPT() : base(DummyRoot, testContext: null, declaringType: null, skipEquipmentDictionary: false) { if (EAFLoggingUnitTesting is null) throw new Exception(); } - public CDE5_EQPT(TestContext testContext) : base(testContext, new StackFrame().GetMethod().DeclaringType, skipEquipmentDictionary: false) + public CDE5_EQPT(TestContext testContext) : base(DummyRoot, testContext, new StackFrame().GetMethod().DeclaringType, skipEquipmentDictionary: false) { } @@ -47,6 +50,9 @@ public class CDE5_EQPT : EAFLoggingUnitTesting EAFLoggingUnitTesting.Dispose(); } +#if true + [Ignore] +#endif [TestMethod] public void Staging__v2_43_3__CDE5_EQPT__DownloadRsMFile() { diff --git a/Adaptation/_Tests/CreateSelfDescription/Staging/v2.43.3/CDE5.cs b/Adaptation/_Tests/CreateSelfDescription/Staging/v2.43.3/CDE5.cs index f6de933..7c9dcf0 100644 --- a/Adaptation/_Tests/CreateSelfDescription/Staging/v2.43.3/CDE5.cs +++ b/Adaptation/_Tests/CreateSelfDescription/Staging/v2.43.3/CDE5.cs @@ -15,15 +15,18 @@ public class CDE5 : EAFLoggingUnitTesting #pragma warning disable CA2254 #pragma warning disable IDE0060 + internal static string DummyRoot { get; private set; } internal static CDE5 EAFLoggingUnitTesting { get; private set; } - public CDE5() : base(testContext: null, declaringType: null, skipEquipmentDictionary: false) + static CDE5() => DummyRoot = @"\\messv02ecc1.ec.local\EC_Characterization_Si\Dummy"; + + public CDE5() : base(DummyRoot, testContext: null, declaringType: null, skipEquipmentDictionary: false) { if (EAFLoggingUnitTesting is null) throw new Exception(); } - public CDE5(TestContext testContext) : base(testContext, new StackFrame().GetMethod().DeclaringType, skipEquipmentDictionary: false) + public CDE5(TestContext testContext) : base(DummyRoot, testContext, new StackFrame().GetMethod().DeclaringType, skipEquipmentDictionary: false) { } @@ -47,6 +50,9 @@ public class CDE5 : EAFLoggingUnitTesting EAFLoggingUnitTesting.Dispose(); } +#if true + [Ignore] +#endif [TestMethod] public void Staging__v2_43_3__CDE5__RsM() { diff --git a/Adaptation/_Tests/CreateSelfDescription/Staging/v2.43.4/CDE2.cs b/Adaptation/_Tests/CreateSelfDescription/Staging/v2.43.4/CDE2.cs new file mode 100644 index 0000000..f5ea3ac --- /dev/null +++ b/Adaptation/_Tests/CreateSelfDescription/Staging/v2.43.4/CDE2.cs @@ -0,0 +1,66 @@ +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_43_4; + +[TestClass] +public class CDE2 : EAFLoggingUnitTesting +{ + +#pragma warning disable CA2254 +#pragma warning disable IDE0060 + + internal static string DummyRoot { get; private set; } + internal static CDE2 EAFLoggingUnitTesting { get; private set; } + + static CDE2() => DummyRoot = @"\\messv02ecc1.ec.local\EC_Characterization_Si\Dummy"; + + public CDE2() : base(DummyRoot, testContext: null, declaringType: null, skipEquipmentDictionary: false) + { + if (EAFLoggingUnitTesting is null) + throw new Exception(); + } + + public CDE2(TestContext testContext) : base(DummyRoot, testContext, new StackFrame().GetMethod().DeclaringType, skipEquipmentDictionary: false) + { + } + + [ClassInitialize] + public static void ClassInitialize(TestContext testContext) + { + if (EAFLoggingUnitTesting is null) + EAFLoggingUnitTesting = new CDE2(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() + { + if (EAFLoggingUnitTesting.Logger is not null) + EAFLoggingUnitTesting.Logger.LogInformation("Cleanup"); + if (EAFLoggingUnitTesting is not null) + EAFLoggingUnitTesting.Dispose(); + } + +#if true + [Ignore] +#endif + [TestMethod] + public void Staging__v2_43_4__CDE2__txt() + { + string check = "*.txt"; + 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")); + } + +} \ No newline at end of file diff --git a/Adaptation/_Tests/CreateSelfDescription/Staging/v2.43.4/CDE5.cs b/Adaptation/_Tests/CreateSelfDescription/Staging/v2.43.4/CDE5.cs new file mode 100644 index 0000000..fb68c7f --- /dev/null +++ b/Adaptation/_Tests/CreateSelfDescription/Staging/v2.43.4/CDE5.cs @@ -0,0 +1,66 @@ +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_43_4; + +[TestClass] +public class CDE5 : EAFLoggingUnitTesting +{ + +#pragma warning disable CA2254 +#pragma warning disable IDE0060 + + internal static string DummyRoot { get; private set; } + internal static CDE5 EAFLoggingUnitTesting { get; private set; } + + static CDE5() => DummyRoot = @"\\messv02ecc1.ec.local\EC_Characterization_Si\Dummy"; + + public CDE5() : base(DummyRoot, testContext: null, declaringType: null, skipEquipmentDictionary: false) + { + if (EAFLoggingUnitTesting is null) + throw new Exception(); + } + + public CDE5(TestContext testContext) : base(DummyRoot, testContext, new StackFrame().GetMethod().DeclaringType, skipEquipmentDictionary: false) + { + } + + [ClassInitialize] + public static void ClassInitialize(TestContext testContext) + { + if (EAFLoggingUnitTesting is null) + EAFLoggingUnitTesting = new CDE5(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() + { + if (EAFLoggingUnitTesting.Logger is not null) + EAFLoggingUnitTesting.Logger.LogInformation("Cleanup"); + if (EAFLoggingUnitTesting is not null) + EAFLoggingUnitTesting.Dispose(); + } + +#if true + [Ignore] +#endif + [TestMethod] + public void Staging__v2_43_4__CDE5__RsM() + { + string check = "*.RsM"; + 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")); + } + +} \ No newline at end of file diff --git a/Adaptation/_Tests/CreateSelfDescription/Staging/v2.43.4/MET08RESIMAPCDE.cs b/Adaptation/_Tests/CreateSelfDescription/Staging/v2.43.4/MET08RESIMAPCDE.cs new file mode 100644 index 0000000..b1f40d5 --- /dev/null +++ b/Adaptation/_Tests/CreateSelfDescription/Staging/v2.43.4/MET08RESIMAPCDE.cs @@ -0,0 +1,183 @@ +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_43_4; + +[TestClass] +public class MET08RESIMAPCDE : EAFLoggingUnitTesting +{ + +#pragma warning disable CA2254 +#pragma warning disable IDE0060 + + internal static string DummyRoot { get; private set; } + internal static MET08RESIMAPCDE EAFLoggingUnitTesting { get; private set; } + + static MET08RESIMAPCDE() => DummyRoot = @"\\messv02ecc1.ec.local\EC_Characterization_Si\Dummy"; + + public MET08RESIMAPCDE() : base(DummyRoot, testContext: null, declaringType: null, skipEquipmentDictionary: false) + { + if (EAFLoggingUnitTesting is null) + throw new Exception(); + } + + public MET08RESIMAPCDE(TestContext testContext) : base(DummyRoot, testContext, new StackFrame().GetMethod().DeclaringType, skipEquipmentDictionary: false) + { + } + + [ClassInitialize] + public static void ClassInitialize(TestContext testContext) + { + if (EAFLoggingUnitTesting is null) + EAFLoggingUnitTesting = new MET08RESIMAPCDE(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() + { + if (EAFLoggingUnitTesting.Logger is not null) + EAFLoggingUnitTesting.Logger.LogInformation("Cleanup"); + if (EAFLoggingUnitTesting is not null) + EAFLoggingUnitTesting.Dispose(); + } + +#if true + [Ignore] +#endif + [TestMethod] + public void Staging__v2_43_4__MET08RESIMAPCDE__MoveMatchingFiles() + { + 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")); + } + +#if true + [Ignore] +#endif + [TestMethod] + public void Staging__v2_43_4__MET08RESIMAPCDE__OpenInsightMetrologyViewer() + { + 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")); + } + +#if true + [Ignore] +#endif + [TestMethod] + public void Staging__v2_43_4__MET08RESIMAPCDE__IQSSi() + { + 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")); + } + +#if true + [Ignore] +#endif + [TestMethod] + public void Staging__v2_43_4__MET08RESIMAPCDE__OpenInsight() + { + 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")); + } + +#if true + [Ignore] +#endif + [TestMethod] + public void Staging__v2_43_4__MET08RESIMAPCDE__OpenInsightMetrologyViewerAttachments() + { + 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")); + } + +#if true + [Ignore] +#endif + [TestMethod] + public void Staging__v2_43_4__MET08RESIMAPCDE__APC() + { + 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")); + } + +#if true + [Ignore] +#endif + [TestMethod] + public void Staging__v2_43_4__MET08RESIMAPCDE__SPaCe() + { + 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")); + } + +#if true + [Ignore] +#endif + [TestMethod] + public void Staging__v2_43_4__MET08RESIMAPCDE__Processed() + { + 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")); + } + +#if true + [Ignore] +#endif + [TestMethod] + public void Staging__v2_43_4__MET08RESIMAPCDE__Archive() + { + 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")); + } + +#if true + [Ignore] +#endif + [TestMethod] + public void Staging__v2_43_4__MET08RESIMAPCDE__Dummy() + { + string check = "637400762024374000.zip"; + 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")); + } + +} \ No newline at end of file diff --git a/Adaptation/_Tests/Extract/Staging/v2.36.1/CDE2.cs b/Adaptation/_Tests/Extract/Staging/v2.36.1/CDE2.cs deleted file mode 100644 index e69de29..0000000 diff --git a/Adaptation/_Tests/Extract/Staging/v2.36.1/CDE3-EQPT.cs b/Adaptation/_Tests/Extract/Staging/v2.36.1/CDE3-EQPT.cs index ccfb4bf..eb1f9d3 100644 --- a/Adaptation/_Tests/Extract/Staging/v2.36.1/CDE3-EQPT.cs +++ b/Adaptation/_Tests/Extract/Staging/v2.36.1/CDE3-EQPT.cs @@ -18,6 +18,9 @@ public class CDE3_EQPT _CDE3_EQPT = CreateSelfDescription.Staging.v2_36_1.CDE3_EQPT.EAFLoggingUnitTesting; } +#if true + [Ignore] +#endif [TestMethod] public void Staging__v2_36_1__CDE3_EQPT__DownloadRsMFile() => _CDE3_EQPT.Staging__v2_36_1__CDE3_EQPT__DownloadRsMFile(); diff --git a/Adaptation/_Tests/Extract/Staging/v2.36.1/CDE3.cs b/Adaptation/_Tests/Extract/Staging/v2.36.1/CDE3.cs index 8ec7229..b3d3f60 100644 --- a/Adaptation/_Tests/Extract/Staging/v2.36.1/CDE3.cs +++ b/Adaptation/_Tests/Extract/Staging/v2.36.1/CDE3.cs @@ -24,9 +24,15 @@ public class CDE3 _CDE3 = CreateSelfDescription.Staging.v2_36_1.CDE3.EAFLoggingUnitTesting; } +#if true + [Ignore] +#endif [TestMethod] public void Staging__v2_36_1__CDE3__RsM() => _CDE3.Staging__v2_36_1__CDE3__RsM(); +#if true + [Ignore] +#endif [TestMethod] public void Staging__v2_36_1__CDE3__RsM643047560320000000__Normal() { diff --git a/Adaptation/_Tests/Extract/Staging/v2.36.1/CDE5.cs b/Adaptation/_Tests/Extract/Staging/v2.36.1/CDE5.cs deleted file mode 100644 index e69de29..0000000 diff --git a/Adaptation/_Tests/Extract/Staging/v2.36.1/MET08RESIMAPCDE.cs b/Adaptation/_Tests/Extract/Staging/v2.36.1/MET08RESIMAPCDE.cs index 4868af5..4dbbb97 100644 --- a/Adaptation/_Tests/Extract/Staging/v2.36.1/MET08RESIMAPCDE.cs +++ b/Adaptation/_Tests/Extract/Staging/v2.36.1/MET08RESIMAPCDE.cs @@ -22,9 +22,15 @@ public class MET08RESIMAPCDE _MET08RESIMAPCDE = CreateSelfDescription.Staging.v2_36_1.MET08RESIMAPCDE.EAFLoggingUnitTesting; } +#if true + [Ignore] +#endif [TestMethod] public void Staging__v2_36_1__MET08RESIMAPCDE__MET08RESIMAPCDE() => _MET08RESIMAPCDE.Staging__v2_36_1__MET08RESIMAPCDE__MET08RESIMAPCDE(); +#if true + [Ignore] +#endif [TestMethod] public void Staging__v2_36_1__MET08RESIMAPCDE__MET08RESIMAPCDE637710931421087642__Normal() { @@ -37,27 +43,51 @@ public class MET08RESIMAPCDE _ = Shared.AdaptationTesting.ReExtractCompareUpdatePassDirectory(variables, fileRead, logistics); } +#if true + [Ignore] +#endif [TestMethod] public void Staging__v2_36_1__MET08RESIMAPCDE__MET08RESIMAPCDE_() => _MET08RESIMAPCDE.Staging__v2_36_1__MET08RESIMAPCDE__MET08RESIMAPCDE_(); +#if true + [Ignore] +#endif [TestMethod] public void Staging__v2_36_1__MET08RESIMAPCDE__MET08RESIMAPCDE__() => _MET08RESIMAPCDE.Staging__v2_36_1__MET08RESIMAPCDE__MET08RESIMAPCDE__(); +#if true + [Ignore] +#endif [TestMethod] public void Staging__v2_36_1__MET08RESIMAPCDE__MET08RESIMAPCDE___() => _MET08RESIMAPCDE.Staging__v2_36_1__MET08RESIMAPCDE__MET08RESIMAPCDE___(); +#if true + [Ignore] +#endif [TestMethod] public void Staging__v2_36_1__MET08RESIMAPCDE__MET08RESIMAPCDE____() => _MET08RESIMAPCDE.Staging__v2_36_1__MET08RESIMAPCDE__MET08RESIMAPCDE____(); +#if true + [Ignore] +#endif [TestMethod] public void Staging__v2_36_1__MET08RESIMAPCDE__MET08RESIMAPCDE_____() => _MET08RESIMAPCDE.Staging__v2_36_1__MET08RESIMAPCDE__MET08RESIMAPCDE_____(); +#if true + [Ignore] +#endif [TestMethod] public void Staging__v2_36_1__MET08RESIMAPCDE__MET08RESIMAPCDE______() => _MET08RESIMAPCDE.Staging__v2_36_1__MET08RESIMAPCDE__MET08RESIMAPCDE______(); +#if true + [Ignore] +#endif [TestMethod] public void Staging__v2_36_1__MET08RESIMAPCDE__MET08RESIMAPCDE_______() => _MET08RESIMAPCDE.Staging__v2_36_1__MET08RESIMAPCDE__MET08RESIMAPCDE_______(); +#if true + [Ignore] +#endif [TestMethod] public void Staging__v2_36_1__MET08RESIMAPCDE__MET08RESIMAPCDE________() => _MET08RESIMAPCDE.Staging__v2_36_1__MET08RESIMAPCDE__MET08RESIMAPCDE________(); diff --git a/Adaptation/_Tests/Extract/Staging/v2.39.0/CDE2.cs b/Adaptation/_Tests/Extract/Staging/v2.39.0/CDE2.cs deleted file mode 100644 index e69de29..0000000 diff --git a/Adaptation/_Tests/Extract/Staging/v2.39.0/CDE3-EQPT.cs b/Adaptation/_Tests/Extract/Staging/v2.39.0/CDE3-EQPT.cs index 2044d55..f7fad39 100644 --- a/Adaptation/_Tests/Extract/Staging/v2.39.0/CDE3-EQPT.cs +++ b/Adaptation/_Tests/Extract/Staging/v2.39.0/CDE3-EQPT.cs @@ -18,6 +18,9 @@ public class CDE3_EQPT _CDE3_EQPT = CreateSelfDescription.Staging.v2_39_0.CDE3_EQPT.EAFLoggingUnitTesting; } +#if true + [Ignore] +#endif [TestMethod] public void Staging__v2_39_0__CDE3_EQPT__DownloadRsMFile() => _CDE3_EQPT.Staging__v2_39_0__CDE3_EQPT__DownloadRsMFile(); diff --git a/Adaptation/_Tests/Extract/Staging/v2.39.0/CDE3.cs b/Adaptation/_Tests/Extract/Staging/v2.39.0/CDE3.cs index 837b005..d9c5e33 100644 --- a/Adaptation/_Tests/Extract/Staging/v2.39.0/CDE3.cs +++ b/Adaptation/_Tests/Extract/Staging/v2.39.0/CDE3.cs @@ -24,9 +24,15 @@ public class CDE3 _CDE3 = CreateSelfDescription.Staging.v2_39_0.CDE3.EAFLoggingUnitTesting; } +#if true + [Ignore] +#endif [TestMethod] public void Staging__v2_39_0__CDE3__RsM() => _CDE3.Staging__v2_39_0__CDE3__RsM(); +#if true + [Ignore] +#endif [TestMethod] public void Staging__v2_39_0__CDE3__RsM643047560320000000__Normal() { diff --git a/Adaptation/_Tests/Extract/Staging/v2.39.0/CDE5.cs b/Adaptation/_Tests/Extract/Staging/v2.39.0/CDE5.cs deleted file mode 100644 index e69de29..0000000 diff --git a/Adaptation/_Tests/Extract/Staging/v2.39.0/MET08RESIMAPCDE.cs b/Adaptation/_Tests/Extract/Staging/v2.39.0/MET08RESIMAPCDE.cs index d5e7ff9..aaaffe3 100644 --- a/Adaptation/_Tests/Extract/Staging/v2.39.0/MET08RESIMAPCDE.cs +++ b/Adaptation/_Tests/Extract/Staging/v2.39.0/MET08RESIMAPCDE.cs @@ -22,9 +22,15 @@ public class MET08RESIMAPCDE _MET08RESIMAPCDE = CreateSelfDescription.Staging.v2_39_0.MET08RESIMAPCDE.EAFLoggingUnitTesting; } +#if true + [Ignore] +#endif [TestMethod] public void Staging__v2_39_0__MET08RESIMAPCDE__MET08RESIMAPCDE() => _MET08RESIMAPCDE.Staging__v2_39_0__MET08RESIMAPCDE__MET08RESIMAPCDE(); +#if true + [Ignore] +#endif [TestMethod] public void Staging__v2_39_0__MET08RESIMAPCDE__MET08RESIMAPCDE637710931421087642__Normal() { @@ -37,27 +43,51 @@ public class MET08RESIMAPCDE _ = Shared.AdaptationTesting.ReExtractCompareUpdatePassDirectory(variables, fileRead, logistics); } +#if true + [Ignore] +#endif [TestMethod] public void Staging__v2_39_0__MET08RESIMAPCDE__MET08RESIMAPCDE_() => _MET08RESIMAPCDE.Staging__v2_39_0__MET08RESIMAPCDE__MET08RESIMAPCDE_(); +#if true + [Ignore] +#endif [TestMethod] public void Staging__v2_39_0__MET08RESIMAPCDE__MET08RESIMAPCDE__() => _MET08RESIMAPCDE.Staging__v2_39_0__MET08RESIMAPCDE__MET08RESIMAPCDE__(); +#if true + [Ignore] +#endif [TestMethod] public void Staging__v2_39_0__MET08RESIMAPCDE__MET08RESIMAPCDE___() => _MET08RESIMAPCDE.Staging__v2_39_0__MET08RESIMAPCDE__MET08RESIMAPCDE___(); +#if true + [Ignore] +#endif [TestMethod] public void Staging__v2_39_0__MET08RESIMAPCDE__MET08RESIMAPCDE____() => _MET08RESIMAPCDE.Staging__v2_39_0__MET08RESIMAPCDE__MET08RESIMAPCDE____(); +#if true + [Ignore] +#endif [TestMethod] public void Staging__v2_39_0__MET08RESIMAPCDE__MET08RESIMAPCDE_____() => _MET08RESIMAPCDE.Staging__v2_39_0__MET08RESIMAPCDE__MET08RESIMAPCDE_____(); +#if true + [Ignore] +#endif [TestMethod] public void Staging__v2_39_0__MET08RESIMAPCDE__MET08RESIMAPCDE______() => _MET08RESIMAPCDE.Staging__v2_39_0__MET08RESIMAPCDE__MET08RESIMAPCDE______(); +#if true + [Ignore] +#endif [TestMethod] public void Staging__v2_39_0__MET08RESIMAPCDE__MET08RESIMAPCDE_______() => _MET08RESIMAPCDE.Staging__v2_39_0__MET08RESIMAPCDE__MET08RESIMAPCDE_______(); +#if true + [Ignore] +#endif [TestMethod] public void Staging__v2_39_0__MET08RESIMAPCDE__MET08RESIMAPCDE________() => _MET08RESIMAPCDE.Staging__v2_39_0__MET08RESIMAPCDE__MET08RESIMAPCDE________(); diff --git a/Adaptation/_Tests/Extract/Staging/v2.43.2/CDE2.cs b/Adaptation/_Tests/Extract/Staging/v2.43.2/CDE2.cs deleted file mode 100644 index e69de29..0000000 diff --git a/Adaptation/_Tests/Extract/Staging/v2.43.2/CDE3-EQPT.cs b/Adaptation/_Tests/Extract/Staging/v2.43.2/CDE3-EQPT.cs index eb6f361..a3239c5 100644 --- a/Adaptation/_Tests/Extract/Staging/v2.43.2/CDE3-EQPT.cs +++ b/Adaptation/_Tests/Extract/Staging/v2.43.2/CDE3-EQPT.cs @@ -18,6 +18,9 @@ public class CDE3_EQPT _CDE3_EQPT = CreateSelfDescription.Staging.v2_43_2.CDE3_EQPT.EAFLoggingUnitTesting; } +#if true + [Ignore] +#endif [TestMethod] public void Staging__v2_43_2__CDE3_EQPT__DownloadRsMFile() => _CDE3_EQPT.Staging__v2_43_2__CDE3_EQPT__DownloadRsMFile(); diff --git a/Adaptation/_Tests/Extract/Staging/v2.43.2/CDE3.cs b/Adaptation/_Tests/Extract/Staging/v2.43.2/CDE3.cs index dd0c292..4e75725 100644 --- a/Adaptation/_Tests/Extract/Staging/v2.43.2/CDE3.cs +++ b/Adaptation/_Tests/Extract/Staging/v2.43.2/CDE3.cs @@ -24,9 +24,15 @@ public class CDE3 _CDE3 = CreateSelfDescription.Staging.v2_43_2.CDE3.EAFLoggingUnitTesting; } +#if true + [Ignore] +#endif [TestMethod] public void Staging__v2_43_2__CDE3__RsM() => _CDE3.Staging__v2_43_2__CDE3__RsM(); +#if true + [Ignore] +#endif [TestMethod] public void Staging__v2_43_2__CDE3__RsM643047560320000000__Normal() { diff --git a/Adaptation/_Tests/Extract/Staging/v2.43.2/CDE5.cs b/Adaptation/_Tests/Extract/Staging/v2.43.2/CDE5.cs deleted file mode 100644 index e69de29..0000000 diff --git a/Adaptation/_Tests/Extract/Staging/v2.43.2/MET08RESIMAPCDE.cs b/Adaptation/_Tests/Extract/Staging/v2.43.2/MET08RESIMAPCDE.cs index 7fb2b6e..74eb12e 100644 --- a/Adaptation/_Tests/Extract/Staging/v2.43.2/MET08RESIMAPCDE.cs +++ b/Adaptation/_Tests/Extract/Staging/v2.43.2/MET08RESIMAPCDE.cs @@ -18,33 +18,63 @@ public class MET08RESIMAPCDE _MET08RESIMAPCDE = CreateSelfDescription.Staging.v2_43_2.MET08RESIMAPCDE.EAFLoggingUnitTesting; } +#if true + [Ignore] +#endif [TestMethod] public void Staging__v2_43_2__MET08RESIMAPCDE__MoveMatchingFiles() => _MET08RESIMAPCDE.Staging__v2_43_2__MET08RESIMAPCDE__MoveMatchingFiles(); +#if true + [Ignore] +#endif [TestMethod] public void Staging__v2_43_2__MET08RESIMAPCDE__OpenInsightMetrologyViewer() => _MET08RESIMAPCDE.Staging__v2_43_2__MET08RESIMAPCDE__OpenInsightMetrologyViewer(); +#if true + [Ignore] +#endif [TestMethod] public void Staging__v2_43_2__MET08RESIMAPCDE__IQSSi() => _MET08RESIMAPCDE.Staging__v2_43_2__MET08RESIMAPCDE__IQSSi(); +#if true + [Ignore] +#endif [TestMethod] public void Staging__v2_43_2__MET08RESIMAPCDE__OpenInsight() => _MET08RESIMAPCDE.Staging__v2_43_2__MET08RESIMAPCDE__OpenInsight(); +#if true + [Ignore] +#endif [TestMethod] public void Staging__v2_43_2__MET08RESIMAPCDE__OpenInsightMetrologyViewerAttachments() => _MET08RESIMAPCDE.Staging__v2_43_2__MET08RESIMAPCDE__OpenInsightMetrologyViewerAttachments(); +#if true + [Ignore] +#endif [TestMethod] public void Staging__v2_43_2__MET08RESIMAPCDE__APC() => _MET08RESIMAPCDE.Staging__v2_43_2__MET08RESIMAPCDE__APC(); +#if true + [Ignore] +#endif [TestMethod] public void Staging__v2_43_2__MET08RESIMAPCDE__SPaCe() => _MET08RESIMAPCDE.Staging__v2_43_2__MET08RESIMAPCDE__SPaCe(); +#if true + [Ignore] +#endif [TestMethod] public void Staging__v2_43_2__MET08RESIMAPCDE__Processed() => _MET08RESIMAPCDE.Staging__v2_43_2__MET08RESIMAPCDE__Processed(); +#if true + [Ignore] +#endif [TestMethod] public void Staging__v2_43_2__MET08RESIMAPCDE__Archive() => _MET08RESIMAPCDE.Staging__v2_43_2__MET08RESIMAPCDE__Archive(); +#if true + [Ignore] +#endif [TestMethod] public void Staging__v2_43_2__MET08RESIMAPCDE__Dummy() => _MET08RESIMAPCDE.Staging__v2_43_2__MET08RESIMAPCDE__Dummy(); diff --git a/Adaptation/_Tests/Extract/Staging/v2.43.3/CDE5-EQPT.cs b/Adaptation/_Tests/Extract/Staging/v2.43.3/CDE5-EQPT.cs index ba70cfa..df822c5 100644 --- a/Adaptation/_Tests/Extract/Staging/v2.43.3/CDE5-EQPT.cs +++ b/Adaptation/_Tests/Extract/Staging/v2.43.3/CDE5-EQPT.cs @@ -1,5 +1,3 @@ -using Adaptation.Shared; -using Adaptation.Shared.Methods; using Microsoft.VisualStudio.TestTools.UnitTesting; using System.Diagnostics; using System.Reflection; @@ -23,10 +21,15 @@ public class CDE5_EQPT _CDE5_EQPT = CreateSelfDescription.Staging.v2_43_3.CDE5_EQPT.EAFLoggingUnitTesting; } +#if true + [Ignore] +#endif [TestMethod] public void Staging__v2_43_3__CDE5_EQPT__DownloadRsMFile() => _CDE5_EQPT.Staging__v2_43_3__CDE5_EQPT__DownloadRsMFile(); - +#if true + [Ignore] +#endif [TestMethod] public void Staging__v2_43_3__CDE5_EQPT__DownloadRsMFile6420637710931421087642__Normal() { diff --git a/Adaptation/_Tests/Extract/Staging/v2.43.3/CDE5.cs b/Adaptation/_Tests/Extract/Staging/v2.43.3/CDE5.cs index ce45561..b511d2c 100644 --- a/Adaptation/_Tests/Extract/Staging/v2.43.3/CDE5.cs +++ b/Adaptation/_Tests/Extract/Staging/v2.43.3/CDE5.cs @@ -24,9 +24,15 @@ public class CDE5 _CDE5 = CreateSelfDescription.Staging.v2_43_3.CDE5.EAFLoggingUnitTesting; } +#if true + [Ignore] +#endif [TestMethod] public void Staging__v2_43_3__CDE5__RsM() => _CDE5.Staging__v2_43_3__CDE5__RsM(); +#if true + [Ignore] +#endif [TestMethod] public void Staging__v2_43_3__CDE5__RsM637919422210000000__Normal() { diff --git a/Adaptation/_Tests/Extract/Staging/v2.43.4/CDE2.cs b/Adaptation/_Tests/Extract/Staging/v2.43.4/CDE2.cs new file mode 100644 index 0000000..47dfbd5 --- /dev/null +++ b/Adaptation/_Tests/Extract/Staging/v2.43.4/CDE2.cs @@ -0,0 +1,51 @@ +using Adaptation.Shared; +using Adaptation.Shared.Methods; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using System; +using System.Diagnostics; +using System.Reflection; + +namespace Adaptation._Tests.Extract.Staging.v2_43_4; + +[TestClass] +public class CDE2 +{ + +#pragma warning disable CA2254 +#pragma warning disable IDE0060 + + private static CreateSelfDescription.Staging.v2_43_4.CDE2 _CDE2; + + [ClassInitialize] + public static void ClassInitialize(TestContext testContext) + { + CreateSelfDescription.Staging.v2_43_4.CDE2.ClassInitialize(testContext); + _CDE2 = CreateSelfDescription.Staging.v2_43_4.CDE2.EAFLoggingUnitTesting; + } + +#if true + [Ignore] +#endif + [TestMethod] + public void Staging__v2_43_4__CDE2__txt() => _CDE2.Staging__v2_43_4__CDE2__txt(); + + [TestMethod] + public void Staging__v2_43_4__CDE2__txt637953079123289252__Normal() + { + DateTime dateTime; + string check = "*.txt"; + bool validatePDSF = false; + _CDE2.Staging__v2_43_4__CDE2__txt(); + MethodBase methodBase = new StackFrame().GetMethod(); + Assert.IsFalse(string.IsNullOrEmpty(_CDE2.AdaptationTesting.TestContext.FullyQualifiedTestClassName)); + string[] variables = _CDE2.AdaptationTesting.GetVariables(methodBase, check, validatePDSF); + IFileRead fileRead = _CDE2.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false); + Logistics logistics = new(fileRead); + _ = Shared.AdaptationTesting.ReExtractCompareUpdatePassDirectory(variables, fileRead, logistics, validatePDSF); + dateTime = FileHandlers.RsM.ProcessData.GetDateTime(logistics, string.Empty); + Assert.IsTrue(dateTime == logistics.DateTimeFromSequence); + dateTime = FileHandlers.RsM.ProcessData.GetDateTime(logistics, "00:13 09/27/38"); + Assert.IsTrue(dateTime == logistics.DateTimeFromSequence); + } + +} \ No newline at end of file diff --git a/Adaptation/_Tests/Extract/Staging/v2.43.4/CDE5.cs b/Adaptation/_Tests/Extract/Staging/v2.43.4/CDE5.cs new file mode 100644 index 0000000..eb62f27 --- /dev/null +++ b/Adaptation/_Tests/Extract/Staging/v2.43.4/CDE5.cs @@ -0,0 +1,51 @@ +using Adaptation.Shared; +using Adaptation.Shared.Methods; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using System; +using System.Diagnostics; +using System.Reflection; + +namespace Adaptation._Tests.Extract.Staging.v2_43_4; + +[TestClass] +public class CDE5 +{ + +#pragma warning disable CA2254 +#pragma warning disable IDE0060 + + private static CreateSelfDescription.Staging.v2_43_4.CDE5 _CDE5; + + [ClassInitialize] + public static void ClassInitialize(TestContext testContext) + { + CreateSelfDescription.Staging.v2_43_4.CDE5.ClassInitialize(testContext); + _CDE5 = CreateSelfDescription.Staging.v2_43_4.CDE5.EAFLoggingUnitTesting; + } + +#if true + [Ignore] +#endif + [TestMethod] + public void Staging__v2_43_4__CDE5__RsM() => _CDE5.Staging__v2_43_4__CDE5__RsM(); + + [TestMethod] + public void Staging__v2_43_4__CDE5__RsM637952212190000000__Normal() + { + DateTime dateTime; + string check = "*.RsM"; + bool validatePDSF = false; + _CDE5.Staging__v2_43_4__CDE5__RsM(); + MethodBase methodBase = new StackFrame().GetMethod(); + Assert.IsFalse(string.IsNullOrEmpty(_CDE5.AdaptationTesting.TestContext.FullyQualifiedTestClassName)); + string[] variables = _CDE5.AdaptationTesting.GetVariables(methodBase, check, validatePDSF); + IFileRead fileRead = _CDE5.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false); + Logistics logistics = new(fileRead); + _ = Shared.AdaptationTesting.ReExtractCompareUpdatePassDirectory(variables, fileRead, logistics, validatePDSF); + dateTime = FileHandlers.RsM.ProcessData.GetDateTime(logistics, string.Empty); + Assert.IsTrue(dateTime == logistics.DateTimeFromSequence); + dateTime = FileHandlers.RsM.ProcessData.GetDateTime(logistics, "00:13 09/27/38"); + Assert.IsTrue(dateTime == logistics.DateTimeFromSequence); + } + +} \ No newline at end of file diff --git a/Adaptation/_Tests/Extract/Staging/v2.43.4/MET08RESIMAPCDE.cs b/Adaptation/_Tests/Extract/Staging/v2.43.4/MET08RESIMAPCDE.cs new file mode 100644 index 0000000..df034e2 --- /dev/null +++ b/Adaptation/_Tests/Extract/Staging/v2.43.4/MET08RESIMAPCDE.cs @@ -0,0 +1,106 @@ +using Adaptation._Tests.Shared; +using Adaptation.Shared; +using Adaptation.Shared.Methods; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using System; +using System.Diagnostics; +using System.Reflection; + +namespace Adaptation._Tests.Extract.Staging.v2_43_4; + +[TestClass] +public class MET08RESIMAPCDE +{ + +#pragma warning disable CA2254 +#pragma warning disable IDE0060 + + private static CreateSelfDescription.Staging.v2_43_4.MET08RESIMAPCDE _MET08RESIMAPCDE; + + [ClassInitialize] + public static void ClassInitialize(TestContext testContext) + { + CreateSelfDescription.Staging.v2_43_4.MET08RESIMAPCDE.ClassInitialize(testContext); + _MET08RESIMAPCDE = CreateSelfDescription.Staging.v2_43_4.MET08RESIMAPCDE.EAFLoggingUnitTesting; + } + +#if true + [Ignore] +#endif + [TestMethod] + public void Staging__v2_43_4__MET08RESIMAPCDE__MoveMatchingFiles() => _MET08RESIMAPCDE.Staging__v2_43_4__MET08RESIMAPCDE__MoveMatchingFiles(); + + [TestMethod] + public void Staging__v2_43_4__MET08RESIMAPCDE__MoveMatchingFiles637953064190000000__Normal() + { + DateTime dateTime; + string check = "*"; + bool validatePDSF = false; + _MET08RESIMAPCDE.Staging__v2_43_4__MET08RESIMAPCDE__MoveMatchingFiles(); + MethodBase methodBase = new StackFrame().GetMethod(); + Assert.IsFalse(string.IsNullOrEmpty(_MET08RESIMAPCDE.AdaptationTesting.TestContext.FullyQualifiedTestClassName)); + string[] variables = _MET08RESIMAPCDE.AdaptationTesting.GetVariables(methodBase, check, validatePDSF); + IFileRead fileRead = _MET08RESIMAPCDE.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false); + Logistics logistics = new(fileRead); + _ = AdaptationTesting.ReExtractCompareUpdatePassDirectory(variables, fileRead, logistics, validatePDSF); + dateTime = FileHandlers.RsM.ProcessData.GetDateTime(logistics, string.Empty); + Assert.IsTrue(dateTime == logistics.DateTimeFromSequence); + dateTime = FileHandlers.RsM.ProcessData.GetDateTime(logistics, "00:13 09/27/38"); + Assert.IsTrue(dateTime == logistics.DateTimeFromSequence); + } + +#if true + [Ignore] +#endif + [TestMethod] + public void Staging__v2_43_4__MET08RESIMAPCDE__OpenInsightMetrologyViewer() => _MET08RESIMAPCDE.Staging__v2_43_4__MET08RESIMAPCDE__OpenInsightMetrologyViewer(); + +#if true + [Ignore] +#endif + [TestMethod] + public void Staging__v2_43_4__MET08RESIMAPCDE__IQSSi() => _MET08RESIMAPCDE.Staging__v2_43_4__MET08RESIMAPCDE__IQSSi(); + +#if true + [Ignore] +#endif + [TestMethod] + public void Staging__v2_43_4__MET08RESIMAPCDE__OpenInsight() => _MET08RESIMAPCDE.Staging__v2_43_4__MET08RESIMAPCDE__OpenInsight(); + +#if true + [Ignore] +#endif + [TestMethod] + public void Staging__v2_43_4__MET08RESIMAPCDE__OpenInsightMetrologyViewerAttachments() => _MET08RESIMAPCDE.Staging__v2_43_4__MET08RESIMAPCDE__OpenInsightMetrologyViewerAttachments(); + +#if true + [Ignore] +#endif + [TestMethod] + public void Staging__v2_43_4__MET08RESIMAPCDE__APC() => _MET08RESIMAPCDE.Staging__v2_43_4__MET08RESIMAPCDE__APC(); + +#if true + [Ignore] +#endif + [TestMethod] + public void Staging__v2_43_4__MET08RESIMAPCDE__SPaCe() => _MET08RESIMAPCDE.Staging__v2_43_4__MET08RESIMAPCDE__SPaCe(); + +#if true + [Ignore] +#endif + [TestMethod] + public void Staging__v2_43_4__MET08RESIMAPCDE__Processed() => _MET08RESIMAPCDE.Staging__v2_43_4__MET08RESIMAPCDE__Processed(); + +#if true + [Ignore] +#endif + [TestMethod] + public void Staging__v2_43_4__MET08RESIMAPCDE__Archive() => _MET08RESIMAPCDE.Staging__v2_43_4__MET08RESIMAPCDE__Archive(); + +#if true + [Ignore] +#endif + [TestMethod] + public void Staging__v2_43_4__MET08RESIMAPCDE__Dummy() => _MET08RESIMAPCDE.Staging__v2_43_4__MET08RESIMAPCDE__Dummy(); + +} \ No newline at end of file diff --git a/Adaptation/_Tests/Shared/AdaptationTesting.cs b/Adaptation/_Tests/Shared/AdaptationTesting.cs index 997a93e..dc062a1 100644 --- a/Adaptation/_Tests/Shared/AdaptationTesting.cs +++ b/Adaptation/_Tests/Shared/AdaptationTesting.cs @@ -26,10 +26,13 @@ namespace Adaptation._Tests.Shared; public class AdaptationTesting : ISMTP { + protected readonly string _DummyRoot; protected readonly string _Environment; protected readonly string _HostNameAndPort; + protected readonly bool _HasWaitForProperty; protected readonly TestContext _TestContext; protected readonly bool _SkipEquipmentDictionary; + protected readonly string _TestContextPropertiesAsJson; protected readonly Dictionary<string, CellInstanceVersion> _CellInstanceVersions; protected readonly Dictionary<string, EquipmentTypeVersion> _EquipmentTypeVersions; protected readonly Dictionary<string, string> _ParameterizedModelObjectDefinitionTypes; @@ -38,10 +41,13 @@ public class AdaptationTesting : ISMTP protected readonly Dictionary<string, IList<ModelObjectParameterDefinition>> _ModelObjectParameters; protected readonly Dictionary<string, List<Tuple<string, string>>> _EquipmentDictionaryEventDescriptions; + public string DummyRoot => _DummyRoot; public string Environment => _Environment; public TestContext TestContext => _TestContext; public string HostNameAndPort => _HostNameAndPort; + public bool HasWaitForProperty => _HasWaitForProperty; public bool SkipEquipmentDictionary => _SkipEquipmentDictionary; + public string TestContextPropertiesAsJson => _TestContextPropertiesAsJson; public Dictionary<string, CellInstanceVersion> CellInstanceVersions => _CellInstanceVersions; public Dictionary<string, EquipmentTypeVersion> EquipmentTypeVersions => _EquipmentTypeVersions; public Dictionary<string, IList<ModelObjectParameterDefinition>> ModelObjectParameters => _ModelObjectParameters; @@ -56,17 +62,22 @@ public class AdaptationTesting : ISMTP void ISMTP.SendNormalPriorityEmailMessage(string subject, string body) => throw new NotImplementedException(); - public AdaptationTesting(TestContext testContext, bool skipEquipmentDictionary) + public AdaptationTesting(string dummyRoot, TestContext testContext, bool skipEquipmentDictionary, string testContextPropertiesAsJson, bool hasWaitForProperty) { string environment = GetEnvironment(testContext); string hostNameAndPort = GetHostNameAndPort(environment); + _DummyRoot = dummyRoot; _TestContext = testContext; _Environment = environment; _HostNameAndPort = hostNameAndPort; + _HasWaitForProperty = hasWaitForProperty; _SkipEquipmentDictionary = skipEquipmentDictionary; + _TestContextPropertiesAsJson = testContextPropertiesAsJson; _CellInstanceVersions = new Dictionary<string, CellInstanceVersion>(); _EquipmentTypeVersions = new Dictionary<string, EquipmentTypeVersion>(); + _EquipmentTypeVersions = new Dictionary<string, EquipmentTypeVersion>(); + _ParameterizedModelObjectDefinitionTypes = new Dictionary<string, string>(); _ParameterizedModelObjectDefinitionTypes = new Dictionary<string, string>(); _EquipmentDictionaryVersions = new Dictionary<string, EquipmentDictionaryVersion>(); _FileConnectorConfigurations = new Dictionary<string, FileConnectorConfiguration>(); @@ -94,23 +105,28 @@ public class AdaptationTesting : ISMTP return result; } - protected string GetTestResultsDirectory() + public static string GetTestResultsDirectory(string testContextTestResultsDirectory, bool hasWaitForProperty) { string result = string.Empty; string testResults = "05_TestResults"; - string checkDirectory = _TestContext.TestResultsDirectory; - if (string.IsNullOrEmpty(checkDirectory) || !checkDirectory.Contains(testResults)) - throw new Exception(); - string rootDirectory = Path.GetPathRoot(checkDirectory); - for (int i = 0; i < int.MaxValue; i++) + string checkDirectory = testContextTestResultsDirectory; + if (hasWaitForProperty && (string.IsNullOrEmpty(checkDirectory) || !checkDirectory.Contains(testResults))) + throw new Exception($"A:{checkDirectory}; B:{testResults};"); + else if (!hasWaitForProperty && (string.IsNullOrEmpty(checkDirectory) || !checkDirectory.Contains(testResults))) + result = testContextTestResultsDirectory; + else { - checkDirectory = Path.GetDirectoryName(checkDirectory); - if (string.IsNullOrEmpty(checkDirectory) || checkDirectory == rootDirectory) - break; - if (checkDirectory.EndsWith(testResults) && Directory.Exists(checkDirectory)) + string rootDirectory = Path.GetPathRoot(checkDirectory); + for (int i = 0; i < int.MaxValue; i++) { - result = checkDirectory; - break; + checkDirectory = Path.GetDirectoryName(checkDirectory); + if (string.IsNullOrEmpty(checkDirectory) || checkDirectory == rootDirectory) + break; + if (checkDirectory.EndsWith(testResults) && Directory.Exists(checkDirectory)) + { + result = checkDirectory; + break; + } } } if (string.IsNullOrEmpty(result)) @@ -118,6 +134,12 @@ public class AdaptationTesting : ISMTP return result; } + private string GetTestResultsDirectory(bool hasWaitForProperty) + { + string result = GetTestResultsDirectory(_TestContext.TestResultsDirectory, hasWaitForProperty); + return result; + } + protected static string GetCellInstanceConnectionName(string cellInstanceConnectionName) { string result; @@ -170,28 +192,29 @@ public class AdaptationTesting : ISMTP return results; } - internal string[] GetSegments(string methodBaseName) + public static MethodBaseName GetMethodBaseName(string dummyRoot, string environment, bool hasWaitForProperty, string methodBaseName, string testResultsDirectory) { - List<string> results; - string fileFullName; + MethodBaseName result; string comment; - string[] textFiles; + string fileFullName; + string dummyDirectory; + string withActualCICN; string separator = "__"; + string textFileDirectory; string connectionNameAndTicks; string cellInstanceConnectionName; string ticks = DateTime.Now.Ticks.ToString(); string cellInstanceConnectionNameFromMethodBaseName; - string testResultsDirectory = GetTestResultsDirectory(); string[] segments = methodBaseName.Split(new string[] { separator }, StringSplitOptions.None); - if (segments[0] != _Environment) + if (segments[0] != environment) throw new Exception(); string rawVersionName = segments[1]; string rawCellInstanceName = segments[2]; string cellInstanceVersionName = segments[1].Replace('_', '.'); string cellInstanceName = segments[2].Replace('_', '-').Replace("_EQPT", "-EQPT"); - string before = string.Concat(_Environment, separator, rawVersionName, separator, cellInstanceName, separator); + string before = string.Concat(environment, separator, rawVersionName, separator, cellInstanceName, separator); string after = methodBaseName.Substring(before.Length); - string versionDirectory = Path.Combine(testResultsDirectory, _Environment, cellInstanceName, cellInstanceVersionName); + string versionDirectory = Path.Combine(testResultsDirectory, environment, cellInstanceName, cellInstanceVersionName); if (!Directory.Exists(versionDirectory)) _ = Directory.CreateDirectory(versionDirectory); comment = segments[segments.Length - 1]; @@ -221,87 +244,76 @@ public class AdaptationTesting : ISMTP cellInstanceConnectionNameFromMethodBaseName = after; } cellInstanceConnectionName = GetCellInstanceConnectionName(cellInstanceConnectionNameFromMethodBaseName); - string methodBaseNameWithActualCICN = GetMethodBaseNameWithActualCICN(methodBaseName, rawCellInstanceName, cellInstanceConnectionNameFromMethodBaseName, cellInstanceConnectionName, ticks); + withActualCICN = GetMethodBaseNameWithActualCICN(methodBaseName, rawCellInstanceName, cellInstanceConnectionNameFromMethodBaseName, cellInstanceConnectionName, ticks); + if (hasWaitForProperty) + dummyDirectory = string.Empty; + else if (string.IsNullOrEmpty(ticks)) + dummyDirectory = string.Empty; + else + { + if (string.IsNullOrEmpty(dummyRoot)) + throw new Exception($"{nameof(dummyRoot)} is empty!"); + if (!withActualCICN.Contains(ticks)) + throw new Exception($"{withActualCICN} doesn't contain {ticks}!"); + segments = withActualCICN.Split(new string[] { ticks }, StringSplitOptions.None); + dummyDirectory = Path.Combine(dummyRoot, cellInstanceName, ticks, string.Join(null, segments)); + if (!Directory.Exists(dummyDirectory)) + _ = Directory.CreateDirectory(dummyDirectory); + } if (string.IsNullOrEmpty(ticks)) { - textFiles = Array.Empty<string>(); - fileFullName = Path.Combine(versionDirectory, methodBaseNameWithActualCICN, $"{cellInstanceConnectionNameFromMethodBaseName}.json"); + textFileDirectory = string.Empty; + fileFullName = Path.Combine(versionDirectory, withActualCICN, $"{cellInstanceConnectionNameFromMethodBaseName}.json"); } else { - segments = methodBaseNameWithActualCICN.Split(new string[] { ticks }, StringSplitOptions.None); - string textDirectory = Path.Combine(versionDirectory, segments[0], string.Concat(ticks, segments[1])); + segments = withActualCICN.Split(new string[] { ticks }, StringSplitOptions.None); + textFileDirectory = Path.Combine(versionDirectory, segments[0], string.Concat(ticks, segments[1])); fileFullName = Path.Combine(versionDirectory, segments[0], $"{cellInstanceConnectionNameFromMethodBaseName}.json"); - if (!Directory.Exists(textDirectory)) + } + result = new(after, before, cellInstanceConnectionName, cellInstanceConnectionNameFromMethodBaseName, cellInstanceName, cellInstanceVersionName, comment, dummyDirectory, fileFullName, rawCellInstanceName, rawVersionName, separator, testResultsDirectory, textFileDirectory, ticks, versionDirectory, withActualCICN); + return result; + } + + private MethodBaseName GetMethodBaseName(MethodBase methodBase) + { + MethodBaseName result; + string testResultsDirectory = GetTestResultsDirectory(_HasWaitForProperty); + result = GetMethodBaseName(_DummyRoot, _Environment, _HasWaitForProperty, methodBase.Name, testResultsDirectory); + return result; + } + + private string[] GetTextFiles(MethodBaseName mbn) + { + string[] results; + if (string.IsNullOrEmpty(mbn.TextFileDirectory)) + results = Array.Empty<string>(); + else if (!Directory.Exists(mbn.TextFileDirectory)) + { + results = Array.Empty<string>(); + if (!_HasWaitForProperty) + _ = Directory.CreateDirectory(mbn.TextFileDirectory); + else { - textFiles = Array.Empty<string>(); - string renameDirectory = Path.Combine(Path.GetDirectoryName(textDirectory), $"_Rename - {Path.GetFileName(textDirectory)}"); + string renameDirectory = Path.Combine(Path.GetDirectoryName(mbn.TextFileDirectory), $"_Rename - {Path.GetFileName(mbn.TextFileDirectory)}"); _ = Directory.CreateDirectory(renameDirectory); _ = Process.Start("explorer.exe", renameDirectory); File.WriteAllText(Path.Combine(renameDirectory, $"{nameof(FileConnectorConfiguration.SourceFileFilter)}.txt"), string.Empty); File.WriteAllText(Path.Combine(renameDirectory, $"{nameof(FileConnectorConfiguration.SourceFileLocation)}.txt"), string.Empty); } - else + } + else + { + results = Directory.GetFiles(mbn.TextFileDirectory, "*.txt", SearchOption.TopDirectoryOnly); + if (!string.IsNullOrEmpty(mbn.Ticks) && _HasWaitForProperty && !results.Any()) { - textFiles = Directory.GetFiles(textDirectory, "*.txt", SearchOption.TopDirectoryOnly); - if (!textFiles.Any()) - { - _ = Process.Start("explorer.exe", textDirectory); - File.WriteAllText(Path.Combine(textDirectory, "_ Why.why"), string.Empty); - } + _ = Process.Start("explorer.exe", mbn.TextFileDirectory); + File.WriteAllText(Path.Combine(mbn.TextFileDirectory, "_ Why.why"), string.Empty); } } - results = new List<string> - { - _Environment, - rawCellInstanceName, - cellInstanceName, - cellInstanceVersionName, - cellInstanceConnectionNameFromMethodBaseName, - cellInstanceConnectionName, - ticks, - comment, - fileFullName - }; - results.AddRange(textFiles); - return results.ToArray(); - } - - internal string[] GetSegments(MethodBase methodBase) - { - string[] results = GetSegments(methodBase.Name); return results; } - internal static string GetEnvironment(string[] segments) => segments[0]; - - internal static string GetRawCellInstanceName(string[] segments) => segments[1]; - - internal static string GetCellInstanceName(string[] segments) => segments[2]; - - internal static string GetCellInstanceVersionName(string[] segments) => segments[3]; - - internal static string GetCellInstanceConnectionNameFromMethodBaseName(string[] segments) => segments[4]; - - internal static string GetCellInstanceConnectionName(string[] segments) => segments[5]; - - internal static string GetTicks(string[] segments) => segments[6]; - - internal static string GetComment(string[] segments) => segments[7]; - - internal static FileInfo GetFileName(string[] segments) => new(segments[8]); - - internal static string[] GetTextFiles(string[] segments) - { - List<string> results = new(); - if (segments.Length > 8) - { - for (int i = 9; i < segments.Length; i++) - results.Add(segments[i]); - } - return results.ToArray(); - } - protected static Stream ToStream(string @this) { MemoryStream memoryStream = new(); @@ -466,6 +478,7 @@ public class AdaptationTesting : ISMTP AppendLine("#pragma warning disable CA2254"). AppendLine("#pragma warning disable IDE0060"). AppendLine(). + AppendLine("internal static string DummyRoot { get; private set; }"). Append("internal static ").Append(cellInstanceNameWithoutHyphen).AppendLine(" EAFLoggingUnitTesting { get; private set; }"); else throw new Exception(); @@ -474,13 +487,15 @@ public class AdaptationTesting : ISMTP else if (i == 1) _ = stringBuilder. AppendLine(). - Append("public ").Append(cellInstanceNameWithoutHyphen).AppendLine("() : base(testContext: null, declaringType: null, skipEquipmentDictionary: false)"). + Append("static ").Append(cellInstanceNameWithoutHyphen).AppendLine("() => DummyRoot = @\"\\\\messv02ecc1.ec.local\\EC_Characterization_Si\\Dummy\";"). + AppendLine(). + Append("public ").Append(cellInstanceNameWithoutHyphen).AppendLine("() : base(DummyRoot, testContext: null, declaringType: null, skipEquipmentDictionary: false)"). AppendLine("{"). AppendLine("if (EAFLoggingUnitTesting is null)"). AppendLine("throw new Exception();"). AppendLine("}"). AppendLine(). - Append("public ").Append(cellInstanceNameWithoutHyphen).AppendLine("(TestContext testContext) : base(testContext, new StackFrame().GetMethod().DeclaringType, skipEquipmentDictionary: false)"). + Append("public ").Append(cellInstanceNameWithoutHyphen).AppendLine("(TestContext testContext) : base(DummyRoot, testContext, new StackFrame().GetMethod().DeclaringType, skipEquipmentDictionary: false)"). AppendLine("{"). AppendLine("}"). AppendLine(); @@ -541,6 +556,9 @@ public class AdaptationTesting : ISMTP if (i == 2) { _ = stringBuilder. + AppendLine("#if true"). + AppendLine("[Ignore]"). + AppendLine("#endif"). AppendLine("[TestMethod]"). Append("public void ").Append(methodName).Append("() => ").Append('_').Append(cellInstanceNameWithoutHyphen).Append('.').Append(methodName).AppendLine("();").AppendLine(); } @@ -550,13 +568,16 @@ public class AdaptationTesting : ISMTP throw new Exception("Versions should match!"); equipmentTypeName = componentsCellComponentCellComponent.Equipment.EquipmentType.Name; _ = stringBuilder. + AppendLine("#if true"). + AppendLine("[Ignore]"). + AppendLine("#endif"). AppendLine("[TestMethod]"). Append("public void ").Append(methodName).AppendLine("()"). AppendLine("{"). Append("string check = \"").Append(check.Split('\\').Last()).AppendLine("\";"). AppendLine("MethodBase methodBase = new StackFrame().GetMethod();"). AppendLine("EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, \" - Getting configuration\"));"). - AppendLine("_ = Shared.AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting);"). + AppendLine("_ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting);"). AppendLine("EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, \" - Exit\"));"). AppendLine("}"). AppendLine(); @@ -879,32 +900,26 @@ public class AdaptationTesting : ISMTP public string[] GetCSharpText(string testName) { string[] results; - string[] segments = GetSegments(testName); - FileInfo fileInfo = GetFileName(segments); - string cellInstanceName = GetCellInstanceName(segments); - string cellInstanceVersionName = GetCellInstanceVersionName(segments); - string cellInstanceConnectionName = GetCellInstanceConnectionName(segments); - if (!string.IsNullOrEmpty(cellInstanceConnectionName) && !Directory.Exists(fileInfo.DirectoryName)) + string testResultsDirectory = GetTestResultsDirectory(_HasWaitForProperty); + MethodBaseName mbn = GetMethodBaseName(_DummyRoot, _Environment, _HasWaitForProperty, testName, testResultsDirectory); + FileInfo fileInfo = new(mbn.FileFullName); + if (!string.IsNullOrEmpty(mbn.CellInstanceConnectionName) && !Directory.Exists(fileInfo.DirectoryName)) _ = Directory.CreateDirectory(fileInfo.Directory.FullName); - Tuple<string, CellInstanceVersion> cellInstanceVersionTuple = GetCellInstanceVersionTuple(cellInstanceName, cellInstanceVersionName); - results = GetCSharpTextB(fileInfo, cellInstanceName, cellInstanceVersionName, cellInstanceVersionTuple.Item2); + Tuple<string, CellInstanceVersion> cellInstanceVersionTuple = GetCellInstanceVersionTuple(mbn.CellInstanceName, mbn.CellInstanceVersionName); + results = GetCSharpTextB(fileInfo, mbn.CellInstanceName, mbn.CellInstanceVersionName, cellInstanceVersionTuple.Item2); return results; } public string[] GetConfiguration(MethodBase methodBase) { string[] results; - string[] segments = GetSegments(methodBase.Name); - string ticks = GetTicks(segments); - FileInfo fileInfo = GetFileName(segments); - string cellInstanceName = GetCellInstanceName(segments); - string cellInstanceVersionName = GetCellInstanceVersionName(segments); - string cellInstanceConnectionName = GetCellInstanceConnectionName(segments); - if (!string.IsNullOrEmpty(cellInstanceConnectionName) && !Directory.Exists(fileInfo.DirectoryName)) + MethodBaseName mbn = GetMethodBaseName(methodBase); + FileInfo fileInfo = new(mbn.FileFullName); + if (!string.IsNullOrEmpty(mbn.CellInstanceConnectionName) && !Directory.Exists(fileInfo.DirectoryName)) _ = Directory.CreateDirectory(fileInfo.Directory.FullName); - Tuple<string, CellInstanceVersion> cellInstanceVersionTuple = GetCellInstanceVersionTuple(cellInstanceName, cellInstanceVersionName); - Tuple<string, FileConnectorConfiguration> fileConnectorConfigurationTuple = GetFileConnectorConfigurationTuple(cellInstanceVersionTuple, cellInstanceConnectionName); - if (string.IsNullOrEmpty(ticks) && fileConnectorConfigurationTuple.Item2?.FileScanningIntervalInSeconds is not null) + Tuple<string, CellInstanceVersion> cellInstanceVersionTuple = GetCellInstanceVersionTuple(mbn.CellInstanceName, mbn.CellInstanceVersionName); + Tuple<string, FileConnectorConfiguration> fileConnectorConfigurationTuple = GetFileConnectorConfigurationTuple(cellInstanceVersionTuple, mbn.CellInstanceConnectionName); + if (string.IsNullOrEmpty(mbn.Ticks) && fileConnectorConfigurationTuple.Item2?.FileScanningIntervalInSeconds is not null) { string fileScanningIntervalInSecondsLine; string versionDirectory = Path.GetDirectoryName(fileInfo.DirectoryName); @@ -914,12 +929,12 @@ public class AdaptationTesting : ISMTP fileScanningIntervalInSecondsLine = $"+\t{fileConnectorConfigurationTuple.Item2.FileScanningIntervalInSeconds.Value:+0000}\t{Path.GetFileName(fileInfo.DirectoryName)}"; File.AppendAllLines(Path.Combine(versionDirectory, "FileScanningIntervalInSeconds.txt"), new string[] { fileScanningIntervalInSecondsLine }); } - Tuple<string, string, string, EquipmentTypeVersion> equipmentTypeVersionTuple = GetEquipmentTypeVersionTuple(cellInstanceVersionTuple.Item2, cellInstanceConnectionName); + Tuple<string, string, string, EquipmentTypeVersion> equipmentTypeVersionTuple = GetEquipmentTypeVersionTuple(cellInstanceVersionTuple.Item2, mbn.CellInstanceConnectionName); Tuple<string, string> parameterizedModelObjectDefinitionTypeTuple = GetParameterizedModelObjectDefinitionTypeTuple(equipmentTypeVersionTuple); Tuple<string, IList<ModelObjectParameterDefinition>> modelObjectParametersTuple = GetModelObjectParameters(equipmentTypeVersionTuple); - Tuple<string, string, string, EquipmentDictionaryVersion> equipmentDictionaryVersionTuple = GetEquipmentDictionaryVersionTuple(cellInstanceVersionTuple.Item2, cellInstanceConnectionName, equipmentTypeVersionTuple.Item4); + Tuple<string, string, string, EquipmentDictionaryVersion> equipmentDictionaryVersionTuple = GetEquipmentDictionaryVersionTuple(cellInstanceVersionTuple.Item2, mbn.CellInstanceConnectionName, equipmentTypeVersionTuple.Item4); Tuple<string, List<Tuple<string, string>>> equipmentDictionaryIsAlwaysEnabledEventsTuple = GetEquipmentDictionaryIsAlwaysEnabledEventsTuple(equipmentDictionaryVersionTuple); - Dictionary<string, object> objects = GetKeyValuePairs(cellInstanceName, cellInstanceVersionName, cellInstanceConnectionName, fileConnectorConfigurationTuple.Item2, equipmentTypeVersionTuple.Item2, parameterizedModelObjectDefinitionTypeTuple.Item2, modelObjectParametersTuple.Item2, equipmentDictionaryVersionTuple.Item2, equipmentDictionaryIsAlwaysEnabledEventsTuple.Item2); + Dictionary<string, object> objects = GetKeyValuePairs(mbn.CellInstanceName, mbn.CellInstanceVersionName, mbn.CellInstanceConnectionName, fileConnectorConfigurationTuple.Item2, equipmentTypeVersionTuple.Item2, parameterizedModelObjectDefinitionTypeTuple.Item2, modelObjectParametersTuple.Item2, equipmentDictionaryVersionTuple.Item2, equipmentDictionaryIsAlwaysEnabledEventsTuple.Item2); string json = JsonSerializer.Serialize(objects, new JsonSerializerOptions { WriteIndented = true }); results = new string[] { fileInfo.FullName, json }; return results; @@ -928,22 +943,19 @@ public class AdaptationTesting : ISMTP public IFileRead Get(MethodBase methodBase, string sourceFileLocation, string sourceFileFilter, bool useCyclicalForDescription) { IFileRead result; - string[] segments = GetSegments(methodBase.Name); - FileInfo fileInfo = GetFileName(segments); - string cellInstanceName = GetCellInstanceName(segments); - string cellInstanceVersionName = GetCellInstanceVersionName(segments); + MethodBaseName mbn = GetMethodBaseName(methodBase); + FileInfo fileInfo = new(mbn.FileFullName); Dictionary<string, string> fileParameter = new(); - string cellInstanceConnectionName = GetCellInstanceConnectionName(segments); - if (!string.IsNullOrEmpty(cellInstanceConnectionName) && !Directory.Exists(fileInfo.DirectoryName)) + if (!string.IsNullOrEmpty(mbn.CellInstanceConnectionName) && !Directory.Exists(fileInfo.DirectoryName)) _ = Directory.CreateDirectory(fileInfo.Directory.FullName); Dictionary<string, List<long>> dummyRuns = new(); Dictionary<long, List<string>> staticRuns = new(); - Tuple<string, CellInstanceVersion> cellInstanceVersionTuple = GetCellInstanceVersionTuple(cellInstanceName, cellInstanceVersionName); - Tuple<string, FileConnectorConfiguration> fileConnectorConfigurationTuple = GetFileConnectorConfigurationTuple(cellInstanceVersionTuple, cellInstanceConnectionName); - Tuple<string, string, string, EquipmentTypeVersion> equipmentTypeVersionTuple = GetEquipmentTypeVersionTuple(cellInstanceVersionTuple.Item2, cellInstanceConnectionName); + Tuple<string, CellInstanceVersion> cellInstanceVersionTuple = GetCellInstanceVersionTuple(mbn.CellInstanceName, mbn.CellInstanceVersionName); + Tuple<string, FileConnectorConfiguration> fileConnectorConfigurationTuple = GetFileConnectorConfigurationTuple(cellInstanceVersionTuple, mbn.CellInstanceConnectionName); + Tuple<string, string, string, EquipmentTypeVersion> equipmentTypeVersionTuple = GetEquipmentTypeVersionTuple(cellInstanceVersionTuple.Item2, mbn.CellInstanceConnectionName); Tuple<string, string> parameterizedModelObjectDefinitionTypeTuple = GetParameterizedModelObjectDefinitionTypeTuple(equipmentTypeVersionTuple); Tuple<string, IList<ModelObjectParameterDefinition>> modelObjectParametersTuple = GetModelObjectParameters(equipmentTypeVersionTuple); - Tuple<string, string, string, EquipmentDictionaryVersion> equipmentDictionaryVersionTuple = GetEquipmentDictionaryVersionTuple(cellInstanceVersionTuple.Item2, cellInstanceConnectionName, equipmentTypeVersionTuple.Item4); + Tuple<string, string, string, EquipmentDictionaryVersion> equipmentDictionaryVersionTuple = GetEquipmentDictionaryVersionTuple(cellInstanceVersionTuple.Item2, mbn.CellInstanceConnectionName, equipmentTypeVersionTuple.Item4); _ = GetEquipmentDictionaryIsAlwaysEnabledEventsTuple(equipmentDictionaryVersionTuple); if (!string.IsNullOrEmpty(sourceFileLocation) && sourceFileLocation != fileConnectorConfigurationTuple.Item2.SourceFileLocation) fileConnectorConfigurationTuple.Item2.SourceFileLocation = sourceFileLocation; @@ -975,33 +987,29 @@ public class AdaptationTesting : ISMTP _ = Directory.CreateDirectory(fileConnectorConfigurationTuple.Item2.AlternateTargetFolder); } } - result = FileHandlers.CellInstanceConnectionName.Get(this, fileParameter, cellInstanceName, cellInstanceConnectionName, fileConnectorConfigurationTuple.Item2, equipmentTypeVersionTuple.Item2, parameterizedModelObjectDefinitionTypeTuple.Item2, modelObjectParametersTuple.Item2, equipmentDictionaryVersionTuple.Item2, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted: false); + result = FileHandlers.CellInstanceConnectionName.Get(this, fileParameter, mbn.CellInstanceName, mbn.CellInstanceConnectionName, fileConnectorConfigurationTuple.Item2, equipmentTypeVersionTuple.Item2, parameterizedModelObjectDefinitionTypeTuple.Item2, modelObjectParametersTuple.Item2, equipmentDictionaryVersionTuple.Item2, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted: false); return result; } - public string[] GetVariables(MethodBase methodBase, string check) + public string[] GetVariables(MethodBase methodBase, string check, bool validatePDSF = true) { string[] results; string[] lines; string ipdsfFile; - string textFileDirectory; + string[] segments; string fileNameWithoutExtension; string searchPattern = "*.ipdsf"; + string methodBaseNameWithActualCICN; string sourceFileFilter = string.Empty; string sourceFileLocation = string.Empty; - string[] segments = GetSegments(methodBase); - string ticks = GetTicks(segments); - FileInfo fileInfo = GetFileName(segments); - string[] textFiles = GetTextFiles(segments); - string cellInstanceName = GetCellInstanceName(segments); - string rawCellInstanceName = GetRawCellInstanceName(segments); - string cellInstanceConnectionName = GetCellInstanceConnectionName(segments); - string cellInstanceConnectionNameFromMethodBaseName = GetCellInstanceConnectionNameFromMethodBaseName(segments); - string methodBaseNameWithActualCICN = GetMethodBaseNameWithActualCICN(methodBase.Name, rawCellInstanceName, cellInstanceConnectionNameFromMethodBaseName, cellInstanceConnectionName, ticks); + MethodBaseName mbn = GetMethodBaseName(methodBase); + string[] textFiles = GetTextFiles(mbn); if (!textFiles.Any()) - textFileDirectory = string.Empty; - else - textFileDirectory = Path.GetDirectoryName(textFiles[0]); + { + if (_HasWaitForProperty) + throw new Exception("Set text file!"); + sourceFileLocation = mbn.DummyDirectory; + } foreach (string textFile in textFiles) { lines = File.ReadAllLines(textFile); @@ -1012,18 +1020,20 @@ public class AdaptationTesting : ISMTP sourceFileFilter = lines[0]; else if (fileNameWithoutExtension == nameof(FileConnectorConfiguration.SourceFileLocation)) { - segments = lines[0].Split(new string[] { ticks }, StringSplitOptions.None); + methodBaseNameWithActualCICN = GetMethodBaseNameWithActualCICN(methodBase.Name, mbn.RawCellInstanceName, mbn.CellInstanceConnectionNameFromMethodBaseName, mbn.CellInstanceConnectionName, mbn.Ticks); + segments = lines[0].Split(new string[] { mbn.Ticks }, StringSplitOptions.None); if (segments.Length > 2) throw new Exception("Ticks should only appear once in source file location!"); if (segments.Length != 2) throw new Exception("Ticks missing from source file location!"); - if (segments[1].Contains(ticks)) + if (segments[1].Contains(mbn.Ticks)) throw new Exception("From source file location path should not contain ticks!"); - if (!segments[1].EndsWith(methodBaseNameWithActualCICN.Replace(ticks, string.Empty))) + if (!segments[1].EndsWith(methodBaseNameWithActualCICN.Replace(mbn.Ticks, string.Empty))) throw new Exception("Method name missing from source file location!"); sourceFileLocation = lines[0]; } } + FileInfo fileInfo = new(mbn.FileFullName); if (!Directory.Exists(fileInfo.Directory.FullName)) _ = Directory.CreateDirectory(fileInfo.Directory.FullName); if (!fileInfo.Exists) @@ -1044,25 +1054,30 @@ public class AdaptationTesting : ISMTP fileConnectorConfiguration.SourceFileFilter = sourceFileFilter; if (!string.IsNullOrEmpty(sourceFileLocation)) fileConnectorConfiguration.SourceFileLocation = sourceFileLocation; - if (string.IsNullOrEmpty(sourceFileLocation)) - ipdsfFile = searchPattern; + if (!validatePDSF) + ipdsfFile = string.Empty; else { - string ipdsfDirectory = Path.Combine(sourceFileLocation, "ipdsf"); - if (!Directory.Exists(ipdsfDirectory)) + if (string.IsNullOrEmpty(sourceFileLocation)) ipdsfFile = searchPattern; else { - string[] files = Directory.GetFiles(ipdsfDirectory, searchPattern, SearchOption.TopDirectoryOnly); - if (files.Any()) - ipdsfFile = files[0]; - else + string ipdsfDirectory = Path.Combine(sourceFileLocation, "ipdsf"); + if (!Directory.Exists(ipdsfDirectory)) ipdsfFile = searchPattern; + else + { + string[] files = Directory.GetFiles(ipdsfDirectory, searchPattern, SearchOption.TopDirectoryOnly); + if (files.Any()) + ipdsfFile = files[0]; + else + ipdsfFile = searchPattern; + } } + if (ipdsfFile == searchPattern) + throw new Exception(); } - if (ipdsfFile == searchPattern) - throw new Exception(); - results = new string[] { fileInfo.FullName, json, fileConnectorConfiguration.SourceFileLocation, fileConnectorConfiguration.SourceFileFilter, ipdsfFile, textFileDirectory }; + results = new string[] { fileInfo.FullName, json, fileConnectorConfiguration.SourceFileLocation, fileConnectorConfiguration.SourceFileFilter, ipdsfFile, mbn.TextFileDirectory }; if (string.IsNullOrEmpty(results[0])) throw new Exception(); if (string.IsNullOrEmpty(results[1])) @@ -1071,7 +1086,7 @@ public class AdaptationTesting : ISMTP throw new Exception(); if (string.IsNullOrEmpty(results[3])) throw new Exception(); - if (string.IsNullOrEmpty(results[4])) + if (validatePDSF && string.IsNullOrEmpty(results[4])) throw new Exception(); if (string.IsNullOrEmpty(results[5])) throw new Exception(); @@ -1232,29 +1247,32 @@ public class AdaptationTesting : ISMTP { string result; 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); - if (!validatePDSF) - _ = GetLogisticsColumnsAndBody(fileRead, logistics, extractResult, new(string.Empty, Array.Empty<string>(), Array.Empty<string>())); - else + if (!fileRead.IsDuplicator) { - Tuple<string, string[], string[]> pdsf = GetLogisticsColumnsAndBody(variables[2], variables[4]); - Tuple<string, string[], string[]> pdsfNew = GetLogisticsColumnsAndBody(fileRead, logistics, extractResult, pdsf); - CompareSave(variables[5], pdsf, pdsfNew); - Assert.IsTrue(pdsf.Item1 == pdsfNew.Item1, "Item1 check!"); - string[] json = GetItem2(pdsf, pdsfNew); - CompareSaveJSON(variables[5], json); - Assert.IsTrue(json[0] == json[1], "Item2 check!"); - string[] join = GetItem3(pdsf, pdsfNew); - CompareSaveTSV(variables[5], join); - Assert.IsTrue(join[0] == join[1], "Item3 (Join) check!"); + Assert.IsFalse(string.IsNullOrEmpty(extractResult?.Item1)); + Assert.IsTrue(extractResult.Item3.Length > 0, "extractResult Array Length check!"); + Assert.IsNotNull(extractResult.Item4); + if (!validatePDSF) + _ = GetLogisticsColumnsAndBody(fileRead, logistics, extractResult, new(string.Empty, Array.Empty<string>(), Array.Empty<string>())); + else + { + Tuple<string, string[], string[]> pdsf = GetLogisticsColumnsAndBody(variables[2], variables[4]); + Tuple<string, string[], string[]> pdsfNew = GetLogisticsColumnsAndBody(fileRead, logistics, extractResult, pdsf); + CompareSave(variables[5], pdsf, pdsfNew); + Assert.IsTrue(pdsf.Item1 == pdsfNew.Item1, "Item1 check!"); + string[] json = GetItem2(pdsf, pdsfNew); + CompareSaveJSON(variables[5], json); + Assert.IsTrue(json[0] == json[1], "Item2 check!"); + string[] join = GetItem3(pdsf, pdsfNew); + CompareSaveTSV(variables[5], join); + Assert.IsTrue(join[0] == join[1], "Item3 (Join) check!"); + } + UpdatePassDirectory(variables[2]); } - UpdatePassDirectory(variables[2]); result = extractResult.Item1; return result; } } // namespace Adaptation._Tests.Helpers { public class AdaptationTesting { } } -// 2022-05-12 -> AdaptationTesting \ No newline at end of file +// 2022-08-05 -> AdaptationTesting \ No newline at end of file diff --git a/Adaptation/_Tests/Shared/EAFLoggingUnitTesting.cs b/Adaptation/_Tests/Shared/EAFLoggingUnitTesting.cs index 62a6cf7..bc6f20e 100644 --- a/Adaptation/_Tests/Shared/EAFLoggingUnitTesting.cs +++ b/Adaptation/_Tests/Shared/EAFLoggingUnitTesting.cs @@ -10,13 +10,13 @@ public class EAFLoggingUnitTesting : LoggingUnitTesting, IDisposable public AdaptationTesting AdaptationTesting => _AdaptationTesting; - public EAFLoggingUnitTesting(TestContext testContext, Type declaringType, bool skipEquipmentDictionary) : + public EAFLoggingUnitTesting(string dummyRoot, TestContext testContext, Type declaringType, bool skipEquipmentDictionary) : base(testContext, declaringType) { if (testContext is null || declaringType is null) _AdaptationTesting = null; else - _AdaptationTesting = new AdaptationTesting(testContext, skipEquipmentDictionary); + _AdaptationTesting = new AdaptationTesting(dummyRoot, testContext, skipEquipmentDictionary, _TestContextPropertiesAsJson, _HasWaitForProperty); } public new void Dispose() diff --git a/Adaptation/_Tests/Shared/MethodBaseName.cs b/Adaptation/_Tests/Shared/MethodBaseName.cs new file mode 100644 index 0000000..b14c1f5 --- /dev/null +++ b/Adaptation/_Tests/Shared/MethodBaseName.cs @@ -0,0 +1,45 @@ +namespace Adaptation._Tests.Shared; + +public class MethodBaseName +{ + + public string After { get; private set; } + public string Before { get; private set; } + public string CellInstanceConnectionName { get; private set; } + public string CellInstanceConnectionNameFromMethodBaseName { get; private set; } + public string CellInstanceName { get; private set; } + public string CellInstanceVersionName { get; private set; } + public string Comment { get; private set; } + public string DummyDirectory { get; private set; } + public string FileFullName { get; private set; } + public string RawCellInstanceName { get; private set; } + public string RawVersionName { get; private set; } + public string Separator { get; private set; } + public string TestResultsDirectory { get; private set; } + public string TextFileDirectory { get; private set; } + public string Ticks { get; private set; } + public string VersionDirectory { get; private set; } + public string WithActualCICN { get; private set; } + + public MethodBaseName(string after, string before, string cellInstanceConnectionName, string cellInstanceConnectionNameFromMethodBaseName, string cellInstanceName, string cellInstanceVersionName, string comment, string dummyDirectory, string fileFullName, string rawCellInstanceName, string rawVersionName, string separator, string testResultsDirectory, string textFileDirectory, string ticks, string versionDirectory, string withActualCICN) + { + After = after; + Before = before; + CellInstanceConnectionName = cellInstanceConnectionName; + CellInstanceConnectionNameFromMethodBaseName = cellInstanceConnectionNameFromMethodBaseName; + CellInstanceName = cellInstanceName; + CellInstanceVersionName = cellInstanceVersionName; + Comment = comment; + DummyDirectory = dummyDirectory; + FileFullName = fileFullName; + RawCellInstanceName = rawCellInstanceName; + RawVersionName = rawVersionName; + Separator = separator; + TestResultsDirectory = testResultsDirectory; + TextFileDirectory = textFileDirectory; + Ticks = ticks; + VersionDirectory = versionDirectory; + WithActualCICN = withActualCICN; + } + +} \ No newline at end of file diff --git a/Adaptation/_Tests/Shared/UnitTesting.cs b/Adaptation/_Tests/Shared/UnitTesting.cs index 3477030..28df790 100644 --- a/Adaptation/_Tests/Shared/UnitTesting.cs +++ b/Adaptation/_Tests/Shared/UnitTesting.cs @@ -13,9 +13,13 @@ namespace Adaptation._Tests.Shared; public class UnitTesting { + protected readonly bool _HasWaitForProperty; protected readonly IsEnvironment _IsEnvironment; + protected readonly string _TestContextPropertiesAsJson; public IsEnvironment IsEnvironment => _IsEnvironment; + public bool HasWaitForProperty => _HasWaitForProperty; + public string TestContextPropertiesAsJson => _TestContextPropertiesAsJson; public UnitTesting(TestContext testContext, Type declaringType) { @@ -23,18 +27,23 @@ public class UnitTesting _IsEnvironment = null; else { + string waitFor = "\"WaitFor\":"; string projectDirectory = GetProjectDirectory(testContext); - string json = JsonSerializer.Serialize(testContext.Properties); + _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); - for (int i = 0; i < int.MaxValue; i++) + if (_HasWaitForProperty) { - if (!json.Contains("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) diff --git a/Adaptation/_Tests/Static/RsM.cs b/Adaptation/_Tests/Static/RsM.cs new file mode 100644 index 0000000..447efbb --- /dev/null +++ b/Adaptation/_Tests/Static/RsM.cs @@ -0,0 +1,66 @@ +using Adaptation._Tests.Shared; +using Microsoft.Extensions.Logging; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using System; +using System.Diagnostics; +using System.Reflection; + +namespace Adaptation._Tests.Static; + +[TestClass] +public class RsM : LoggingUnitTesting, IDisposable +{ + +#pragma warning disable CA2254 +#pragma warning disable IDE0060 + + internal static RsM LoggingUnitTesting { get; private set; } + + public RsM() : base(testContext: null, declaringType: null) + { + if (LoggingUnitTesting is null) + throw new Exception(); + } + + public RsM(TestContext testContext) : base(testContext, new StackFrame().GetMethod().DeclaringType) + { + } + + [ClassInitialize] + public static void ClassInitialize(TestContext testContext) + { + if (LoggingUnitTesting is null) + LoggingUnitTesting = new RsM(testContext); + } + + [ClassCleanup()] + public static void ClassCleanup() + { + if (LoggingUnitTesting.Logger is not null) + LoggingUnitTesting.Logger.LogInformation("Cleanup"); + if (LoggingUnitTesting is not null) + LoggingUnitTesting.Dispose(); + } + + [TestMethod] + public void TestDescriptor() + { + FileHandlers.RsM.Descriptor descriptor; + MethodBase methodBase = new StackFrame().GetMethod(); + LoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration")); + descriptor = FileHandlers.RsM.ProcessData.GetDescriptor("12-123456-1234"); + Assert.IsTrue(descriptor.Reactor is "12"); + Assert.IsTrue(descriptor.RDS is "123456"); + Assert.IsTrue(descriptor.PSN is "1234"); + descriptor = FileHandlers.RsM.ProcessData.GetDescriptor("123456"); + Assert.IsTrue(descriptor.Reactor is "00"); + Assert.IsTrue(descriptor.RDS is "123456"); + Assert.IsTrue(descriptor.PSN is "0000"); + descriptor = FileHandlers.RsM.ProcessData.GetDescriptor("MP"); + Assert.IsTrue(descriptor.Reactor is "00"); + Assert.IsTrue(descriptor.RDS is "000000"); + Assert.IsTrue(descriptor.PSN is "0000"); + LoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit")); + } + +} \ No newline at end of file diff --git a/Adaptation/_Tests/Static/txt.cs b/Adaptation/_Tests/Static/txt.cs new file mode 100644 index 0000000..b816412 --- /dev/null +++ b/Adaptation/_Tests/Static/txt.cs @@ -0,0 +1,66 @@ +using Adaptation._Tests.Shared; +using Microsoft.Extensions.Logging; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using System; +using System.Diagnostics; +using System.Reflection; + +namespace Adaptation._Tests.Static; + +[TestClass] +public class TXT : LoggingUnitTesting, IDisposable +{ + +#pragma warning disable CA2254 +#pragma warning disable IDE0060 + + internal static TXT LoggingUnitTesting { get; private set; } + + public TXT() : base(testContext: null, declaringType: null) + { + if (LoggingUnitTesting is null) + throw new Exception(); + } + + public TXT(TestContext testContext) : base(testContext, new StackFrame().GetMethod().DeclaringType) + { + } + + [ClassInitialize] + public static void ClassInitialize(TestContext testContext) + { + if (LoggingUnitTesting is null) + LoggingUnitTesting = new TXT(testContext); + } + + [ClassCleanup()] + public static void ClassCleanup() + { + if (LoggingUnitTesting.Logger is not null) + LoggingUnitTesting.Logger.LogInformation("Cleanup"); + if (LoggingUnitTesting is not null) + LoggingUnitTesting.Dispose(); + } + + [TestMethod] + public void TestDescriptor() + { + FileHandlers.txt.Descriptor descriptor; + MethodBase methodBase = new StackFrame().GetMethod(); + LoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration")); + descriptor = FileHandlers.txt.ProcessData.GetDescriptor("12-123456-1234"); + Assert.IsTrue(descriptor.Reactor is "12"); + Assert.IsTrue(descriptor.RDS is "123456"); + Assert.IsTrue(descriptor.PSN is "1234"); + descriptor = FileHandlers.txt.ProcessData.GetDescriptor("123456"); + Assert.IsTrue(descriptor.Reactor is "00"); + Assert.IsTrue(descriptor.RDS is "123456"); + Assert.IsTrue(descriptor.PSN is "0000"); + descriptor = FileHandlers.txt.ProcessData.GetDescriptor("MP"); + Assert.IsTrue(descriptor.Reactor is "00"); + Assert.IsTrue(descriptor.RDS is "000000"); + Assert.IsTrue(descriptor.PSN is "0000"); + LoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit")); + } + +} \ No newline at end of file diff --git a/Adaptation/package.json b/Adaptation/package.json index 2fb8a71..763fdfd 100644 --- a/Adaptation/package.json +++ b/Adaptation/package.json @@ -1,5 +1,17 @@ { "scripts": { + "AA-CreateSelfDescription.Staging.v2_43_4-CDE2_EQPT": "dotnet test --runtime win-x64 --no-build --filter \"FullyQualifiedName~Adaptation._Tests.CreateSelfDescription.Staging.v2_43_4 & ClassName~CDE2_EQPT\" -- TestRunParameters.Parameter(name=\\\"WaitFor\\\", value=\\\"Debugger.IsAttached\\\")", + "AB-CreateSelfDescription.Staging.v2_43_4-CDE5_EQPT": "dotnet test --runtime win-x64 --no-build --filter \"FullyQualifiedName~Adaptation._Tests.CreateSelfDescription.Staging.v2_43_4 & ClassName~CDE5_EQPT\" -- TestRunParameters.Parameter(name=\\\"WaitFor\\\", value=\\\"Debugger.IsAttached\\\")", + "BA-CreateSelfDescription.Staging.v2_43_4-CDE2": "dotnet test --runtime win-x64 --no-build --filter \"FullyQualifiedName~Adaptation._Tests.CreateSelfDescription.Staging.v2_43_4 & ClassName~CDE2\" -- TestRunParameters.Parameter(name=\\\"WaitFor\\\", value=\\\"Debugger.IsAttached\\\")", + "BB-CreateSelfDescription.Staging.v2_43_4-CDE5": "dotnet test --runtime win-x64 --no-build --filter \"FullyQualifiedName~Adaptation._Tests.CreateSelfDescription.Staging.v2_43_4 & ClassName~CDE5\" -- TestRunParameters.Parameter(name=\\\"WaitFor\\\", value=\\\"Debugger.IsAttached\\\")", + "CA-CreateSelfDescription.Staging.v2_43_4-MET08RESIMAPCDE": "dotnet test --runtime win-x64 --no-build --filter \"FullyQualifiedName~Adaptation._Tests.CreateSelfDescription.Staging.v2_43_4 & ClassName~MET08RESIMAPCDE\" -- TestRunParameters.Parameter(name=\\\"WaitFor\\\", value=\\\"Debugger.IsAttached\\\")", + "DA-CreateSelfDescription.Staging.v2_43_4": "dotnet test --runtime win-x64 --no-build --filter \"FullyQualifiedName~Adaptation._Tests.CreateSelfDescription.Staging.v2_43_4\" -- TestRunParameters.Parameter(name=\\\"WaitFor\\\", value=\\\"Debugger.IsAttached\\\")", + "EA-Extract.Staging.v2_43_4-CDE2_EQPT-Staging__v2_43_4__CDE2_EQPT__DownloadRsMFile637953072332628623__Normal": "dotnet test --runtime win-x64 --no-build --filter \"FullyQualifiedName~Adaptation._Tests.Extract.Staging.v2_43_4 & ClassName~CDE2_EQPT & Name~Staging__v2_43_4__CDE2_EQPT__DownloadRsMFile637953072332628623__Normal\" -- TestRunParameters.Parameter(name=\\\"WaitFor\\\", value=\\\"Debugger.IsAttached\\\")", + "EB-Extract.Staging.v2_43_4-CDE5_EQPT-Staging__v2_43_4__CDE5_EQPT__DownloadRsMFile637953072332628623__Normal": "dotnet test --runtime win-x64 --no-build --filter \"FullyQualifiedName~Adaptation._Tests.Extract.Staging.v2_43_4 & ClassName~CDE5_EQPT & Name~Staging__v2_43_4__CDE5_EQPT__DownloadRsMFile637953072332628623__Normal\" -- TestRunParameters.Parameter(name=\\\"WaitFor\\\", value=\\\"Debugger.IsAttached\\\")", + "FA-Extract.Staging.v2_43_4-CDE2-Staging__v2_43_4__CDE2__txt637953079123289252__Normal": "dotnet test --runtime win-x64 --no-build --filter \"FullyQualifiedName~Adaptation._Tests.Extract.Staging.v2_43_4 & ClassName~CDE2 & Name~Staging__v2_43_4__CDE2__txt637953079123289252__Normal\" -- TestRunParameters.Parameter(name=\\\"WaitFor\\\", value=\\\"Debugger.IsAttached\\\")", + "FB-Extract.Staging.v2_43_4-CDE5-Staging__v2_43_4__CDE5__RsM637952212190000000__Normal": "dotnet test --runtime win-x64 --no-build --filter \"FullyQualifiedName~Adaptation._Tests.Extract.Staging.v2_43_4 & ClassName~CDE5 & Name~Staging__v2_43_4__CDE5__RsM637952212190000000__Normal\" -- TestRunParameters.Parameter(name=\\\"WaitFor\\\", value=\\\"Debugger.IsAttached\\\")", + "GA-Extract.Staging.v2_43_4-MET08RESIMAPCDE-Staging__v2_43_4__MET08RESIMAPCDE__MoveMatchingFiles637953064190000000__Normal": "dotnet test --runtime win-x64 --no-build --filter \"FullyQualifiedName~Adaptation._Tests.Extract.Staging.v2_43_4 & ClassName~MET08RESIMAPCDE & Name~Staging__v2_43_4__MET08RESIMAPCDE__MoveMatchingFiles637953064190000000__Normal\" -- TestRunParameters.Parameter(name=\\\"WaitFor\\\", value=\\\"Debugger.IsAttached\\\")", + "HA-Extract.Staging.v2_43_4-CDE2-Staging__v2_43_4__CDE2__pcl637812984345592512__MinFileLength": "dotnet test --filter \"FullyQualifiedName~Adaptation._Tests.Extract.Staging.v2_43_4 & ClassName~CDE2 & Name~Staging__v2_43_4__CDE2__pcl637812984345592512__MinFileLength\" -- TestRunParameters.Parameter(name=\\\"WaitFor\\\", value=\\\"Debugger.IsAttached\\\")", "Alpha": "ABCDEFGHIJKLMNOPQRSTUVWXYZ", "nuget-clear": "dotnet nuget locals all --clear", "build": "dotnet build --runtime win-x64 --self-contained", @@ -9,22 +21,6 @@ "dotnet-format": "dotnet format --report .vscode --verbosity detailed --severity warn", "MSBuild": "\"C:/Program Files (x86)/Microsoft Visual Studio/2022/BuildTools/MSBuild/Current/Bin/MSBuild.exe\" /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 /detailedsummary /consoleloggerparameters:PerformanceSummary;ErrorsOnly; /property:Configuration=Debug;TargetFrameworkVersion=v4.8 ../MET08RESIMAPCDE.csproj", "pull": "git pull", - "garbage-collect": "git gc", - "AA-CreateSelfDescription.Staging.v2_43_2-CDE3_EQPT-Staging__v2_43_2__CDE3_EQPT__DownloadRsMFile": "dotnet test --runtime win-x64 --no-build --filter \"FullyQualifiedName~Adaptation._Tests.CreateSelfDescription.Staging.v2_43_2 & ClassName~CDE3_EQPT & Name~Staging__v2_43_2__CDE3_EQPT__DownloadRsMFile\" -- TestRunParameters.Parameter(name=\\\"Debug\\\", value=\\\"Debugger.IsAttached\\\")", - "AT-CreateSelfDescription.Staging.v2_43_2-MET08RESIMAPCDE": "dotnet test --runtime win-x64 --no-build --filter \"FullyQualifiedName~Adaptation._Tests.CreateSelfDescription.Staging.v2_43_2 & ClassName~MET08RESIMAPCDE\" -- TestRunParameters.Parameter(name=\\\"Debug\\\", value=\\\"Debugger.IsAttached\\\")", - "AV-CreateSelfDescription.Staging.v2_43_2-CDE2_EQPT": "dotnet test --runtime win-x64 --no-build --filter \"FullyQualifiedName~Adaptation._Tests.CreateSelfDescription.Staging.v2_43_2 & ClassName~CDE2_EQPT\" -- TestRunParameters.Parameter(name=\\\"Debug\\\", value=\\\"Debugger.IsAttached\\\")", - "AW-CreateSelfDescription.Staging.v2_43_2-CDE2": "dotnet test --runtime win-x64 --no-build --filter \"FullyQualifiedName~Adaptation._Tests.CreateSelfDescription.Staging.v2_43_2 & ClassName~CDE2\" -- TestRunParameters.Parameter(name=\\\"Debug\\\", value=\\\"Debugger.IsAttached\\\")", - "AX-CreateSelfDescription.Staging.v2_43_2-CDE3_EQPT": "dotnet test --runtime win-x64 --no-build --filter \"FullyQualifiedName~Adaptation._Tests.CreateSelfDescription.Staging.v2_43_2 & ClassName~CDE3_EQPT\" -- TestRunParameters.Parameter(name=\\\"Debug\\\", value=\\\"Debugger.IsAttached\\\")", - "AY-CreateSelfDescription.Staging.v2_43_2-CDE3": "dotnet test --runtime win-x64 --no-build --filter \"FullyQualifiedName~Adaptation._Tests.CreateSelfDescription.Staging.v2_43_2 & ClassName~CDE3\" -- TestRunParameters.Parameter(name=\\\"Debug\\\", value=\\\"Debugger.IsAttached\\\")", - "AZ-CreateSelfDescription.Staging.v2_43_2": "dotnet test --runtime win-x64 --no-build --filter \"FullyQualifiedName~Adaptation._Tests.CreateSelfDescription.Staging.v2_43_2\" -- TestRunParameters.Parameter(name=\\\"Debug\\\", value=\\\"Debugger.IsAttached\\\")", - "BA-Extract.Staging.v2_43_2-CDE3-Staging__v2_43_2__CDE3__RsM643047560320000000__Normal": "dotnet test --runtime win-x64 --no-build --filter \"FullyQualifiedName~Adaptation._Tests.Extract.Staging.v2_43_2 & ClassName~CDE3 & Name~Staging__v2_43_2__CDE3__RsM643047560320000000__Normal\" -- TestRunParameters.Parameter(name=\\\"Debug\\\", value=\\\"Debugger.IsAttached\\\")", - "BT-Extract.Staging.v2_43_2-MET08RESIMAPCDE": "dotnet test --runtime win-x64 --no-build --filter \"FullyQualifiedName~Adaptation._Tests.Extract.Staging.v2_43_2 & ClassName~MET08RESIMAPCDE\" -- TestRunParameters.Parameter(name=\\\"Debug\\\", value=\\\"Debugger.IsAttached\\\")", - "BV-Extract.Staging.v2_43_2-CDE2_EQPT": "dotnet test --runtime win-x64 --no-build --filter \"FullyQualifiedName~Adaptation._Tests.Extract.Staging.v2_43_2 & ClassName~CDE2_EQPT\" -- TestRunParameters.Parameter(name=\\\"Debug\\\", value=\\\"Debugger.IsAttached\\\")", - "BW-Extract.Staging.v2_43_2-CDE2": "dotnet test --runtime win-x64 --no-build --filter \"FullyQualifiedName~Adaptation._Tests.Extract.Staging.v2_43_2 & ClassName~CDE2\" -- TestRunParameters.Parameter(name=\\\"Debug\\\", value=\\\"Debugger.IsAttached\\\")", - "BX-Extract.Staging.v2_43_2-CDE3_EQPT": "dotnet test --runtime win-x64 --no-build --filter \"FullyQualifiedName~Adaptation._Tests.Extract.Staging.v2_43_2 & ClassName~CDE3_EQPT\" -- TestRunParameters.Parameter(name=\\\"Debug\\\", value=\\\"Debugger.IsAttached\\\")", - "BY-Extract.Staging.v2_43_2-CDE3": "dotnet test --runtime win-x64 --no-build --filter \"FullyQualifiedName~Adaptation._Tests.Extract.Staging.v2_43_2 & ClassName~CDE3\" -- TestRunParameters.Parameter(name=\\\"Debug\\\", value=\\\"Debugger.IsAttached\\\")", - "BZ-Extract.Staging.v2_43_2": "dotnet test --runtime win-x64 --no-build --filter \"FullyQualifiedName~Adaptation._Tests.Extract.Staging.v2_43_2\" -- TestRunParameters.Parameter(name=\\\"Debug\\\", value=\\\"Debugger.IsAttached\\\")", - "CA-Extract.Staging.v2_43_3-CDE5-Staging__v2_43_3__CDE5_EQPT__DownloadRsMFile6420637710931421087642__Normal": "dotnet test --runtime win-x64 --no-build --filter \"FullyQualifiedName~Adaptation._Tests.Extract.Staging.v2_43_3 & ClassName~CDE5 & Name~Staging__v2_43_3__CDE5_EQPT__DownloadRsMFile6420637710931421087642__Normal\" -- TestRunParameters.Parameter(name=\\\"Debug\\\", value=\\\"Debugger.IsAttached\\\")", - "CB-Extract.Staging.v2_43_3-CDE5-Staging__v2_43_3__CDE5__RsM637919422210000000__Normal": "dotnet test --runtime win-x64 --no-build --filter \"FullyQualifiedName~Adaptation._Tests.Extract.Staging.v2_43_3 & ClassName~CDE5 & Name~Staging__v2_43_3__CDE5__RsM637919422210000000__Normal\" -- TestRunParameters.Parameter(name=\\\"Debug\\\", value=\\\"Debugger.IsAttached\\\")" + "garbage-collect": "git gc" } } \ No newline at end of file diff --git a/MET08RESIMAPCDE.csproj b/MET08RESIMAPCDE.csproj index 058f044..036157f 100644 --- a/MET08RESIMAPCDE.csproj +++ b/MET08RESIMAPCDE.csproj @@ -108,16 +108,18 @@ <Compile Include="Adaptation\FileHandlers\OpenInsightMetrologyViewer\FileRead.cs" /> <Compile Include="Adaptation\FileHandlers\OpenInsightMetrologyViewer\WSRequest.cs" /> <Compile Include="Adaptation\FileHandlers\OpenInsight\FileRead.cs" /> - <Compile Include="Adaptation\FileHandlers\pcl\Description.cs" /> - <Compile Include="Adaptation\FileHandlers\pcl\Detail.cs" /> - <Compile Include="Adaptation\FileHandlers\pcl\FileRead.cs" /> - <Compile Include="Adaptation\FileHandlers\pcl\ProcessData.cs" /> <Compile Include="Adaptation\FileHandlers\Processed\FileRead.cs" /> <Compile Include="Adaptation\FileHandlers\RsM\Description.cs" /> + <Compile Include="Adaptation\FileHandlers\RsM\Descriptor.cs" /> <Compile Include="Adaptation\FileHandlers\RsM\Detail.cs" /> <Compile Include="Adaptation\FileHandlers\RsM\FileRead.cs" /> <Compile Include="Adaptation\FileHandlers\RsM\ProcessData.cs" /> <Compile Include="Adaptation\FileHandlers\SPaCe\FileRead.cs" /> + <Compile Include="Adaptation\FileHandlers\txt\Description.cs" /> + <Compile Include="Adaptation\FileHandlers\txt\Descriptor.cs" /> + <Compile Include="Adaptation\FileHandlers\txt\Detail.cs" /> + <Compile Include="Adaptation\FileHandlers\txt\FileRead.cs" /> + <Compile Include="Adaptation\FileHandlers\txt\ProcessData.cs" /> <Compile Include="Adaptation\Ifx\Eaf\Common\Configuration\ConnectionSetting.cs" /> <Compile Include="Adaptation\Ifx\Eaf\EquipmentConnector\File\Component\File.cs" /> <Compile Include="Adaptation\Ifx\Eaf\EquipmentConnector\File\Component\FilePathGenerator.cs" /> diff --git a/Properties/AssemblyInfo.cs b/Properties/AssemblyInfo.cs index 8e09942..1d78531 100644 --- a/Properties/AssemblyInfo.cs +++ b/Properties/AssemblyInfo.cs @@ -32,5 +32,5 @@ using System.Runtime.InteropServices; // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("2.43.0.0")] -[assembly: AssemblyFileVersion("2.43.0.0")] +[assembly: AssemblyVersion("2.43.4.0")] +[assembly: AssemblyFileVersion("2.43.4.0")]