From 3ec72bd5965cffd2f2b4ea6dd26dca86b7068085 Mon Sep 17 00:00:00 2001 From: Mike Phares Date: Tue, 25 Apr 2023 10:08:40 -0700 Subject: [PATCH] Delay for RAMS connectionCount #pragma warning disable IDE0060 MesEntity Placeholder Infineon.EAF.Runtime 2.49.0 --- Adaptation/FileHandlers/APC/FileRead.cs | 4 +- Adaptation/FileHandlers/Archive/FileRead.cs | 8 +- .../CellInstanceConnectionName.cs | 24 +-- Adaptation/FileHandlers/Dummy/FileRead.cs | 4 +- Adaptation/FileHandlers/IQSSi/FileRead.cs | 6 +- .../MoveMatchingFiles/FileRead.cs | 4 +- .../FileHandlers/OpenInsight/FileRead.cs | 13 +- .../FileHandlers/OpenInsight/FromIQS.cs | 42 +++- .../OpenInsightMetrologyViewer/FileRead.cs | 8 +- .../OpenInsightMetrologyViewer/WSRequest.cs | 8 +- .../FileRead.cs | 10 +- Adaptation/FileHandlers/Processed/FileRead.cs | 8 +- Adaptation/FileHandlers/SPaCe/FileRead.cs | 6 +- Adaptation/FileHandlers/pcl/FileRead.cs | 4 +- Adaptation/FileHandlers/pcl/ProcessData.cs | 16 +- Adaptation/MET08DDUPSFS6420-Development.yml | 14 +- Adaptation/MET08DDUPSFS6420.Tests.csproj | 2 +- Adaptation/MET08DDUPSFS6420.yml | 16 +- Adaptation/Shared/FileRead.cs | 9 +- .../Staging/v2.47.5/MET08DDUPSFS6420.cs | 20 -- .../Staging/v2.47.5/TENCOR1.cs | 2 - .../Staging/v2.47.5/TENCOR2.cs | 2 - .../Staging/v2.47.5/TENCOR3.cs | 2 - .../Staging/v2.49.0/MET08DDUPSFS6420.cs | 180 ++++++++++++++++++ .../Staging/v2.49.0/TENCOR1.cs | 63 ++++++ .../Staging/v2.49.0/TENCOR2.cs | 63 ++++++ .../Staging/v2.49.0/TENCOR3.cs | 63 ++++++ .../Staging/v2.47.5/MET08DDUPSFS6420.cs | 24 --- .../_Tests/Extract/Staging/v2.47.5/TENCOR1.cs | 4 - .../_Tests/Extract/Staging/v2.47.5/TENCOR2.cs | 4 - .../_Tests/Extract/Staging/v2.47.5/TENCOR3.cs | 4 - .../Staging/v2.49.0/MET08DDUPSFS6420.cs | 116 +++++++++++ .../_Tests/Extract/Staging/v2.49.0/TENCOR1.cs | 49 +++++ .../_Tests/Extract/Staging/v2.49.0/TENCOR2.cs | 49 +++++ .../_Tests/Extract/Staging/v2.49.0/TENCOR3.cs | 49 +++++ Adaptation/_Tests/Shared/AdaptationTesting.cs | 2 +- Adaptation/_Tests/Static/MET08DDUPSFS6420.cs | 2 +- Adaptation/_Tests/Static/pcl.cs | 50 ++++- FileHandlers/FileRead.cs | 4 +- MET08DDUPSFS6420.csproj | 2 +- Properties/AssemblyInfo.cs | 4 +- 41 files changed, 810 insertions(+), 154 deletions(-) create mode 100644 Adaptation/_Tests/CreateSelfDescription/Staging/v2.49.0/MET08DDUPSFS6420.cs create mode 100644 Adaptation/_Tests/CreateSelfDescription/Staging/v2.49.0/TENCOR1.cs create mode 100644 Adaptation/_Tests/CreateSelfDescription/Staging/v2.49.0/TENCOR2.cs create mode 100644 Adaptation/_Tests/CreateSelfDescription/Staging/v2.49.0/TENCOR3.cs create mode 100644 Adaptation/_Tests/Extract/Staging/v2.49.0/MET08DDUPSFS6420.cs create mode 100644 Adaptation/_Tests/Extract/Staging/v2.49.0/TENCOR1.cs create mode 100644 Adaptation/_Tests/Extract/Staging/v2.49.0/TENCOR2.cs create mode 100644 Adaptation/_Tests/Extract/Staging/v2.49.0/TENCOR3.cs diff --git a/Adaptation/FileHandlers/APC/FileRead.cs b/Adaptation/FileHandlers/APC/FileRead.cs index 516a83f..5e2ab67 100644 --- a/Adaptation/FileHandlers/APC/FileRead.cs +++ b/Adaptation/FileHandlers/APC/FileRead.cs @@ -14,8 +14,8 @@ namespace Adaptation.FileHandlers.APC; public class FileRead : Shared.FileRead, IFileRead { - public FileRead(ISMTP smtp, Dictionary fileParameter, string cellInstanceName, string cellInstanceConnectionName, FileConnectorConfiguration fileConnectorConfiguration, string equipmentTypeName, string parameterizedModelObjectDefinitionType, IList modelObjectParameters, string equipmentDictionaryName, Dictionary> dummyRuns, Dictionary> staticRuns, bool useCyclicalForDescription, bool isEAFHosted) : - base(new Description(), false, smtp, fileParameter, cellInstanceName, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted) + public FileRead(ISMTP smtp, Dictionary fileParameter, string cellInstanceName, int? connectionCount, string cellInstanceConnectionName, FileConnectorConfiguration fileConnectorConfiguration, string equipmentTypeName, string parameterizedModelObjectDefinitionType, IList modelObjectParameters, string equipmentDictionaryName, Dictionary> dummyRuns, Dictionary> staticRuns, bool useCyclicalForDescription, bool isEAFHosted) : + base(new Description(), false, smtp, fileParameter, cellInstanceName, connectionCount, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted: connectionCount is null) { _MinFileLength = 10; _NullData = string.Empty; diff --git a/Adaptation/FileHandlers/Archive/FileRead.cs b/Adaptation/FileHandlers/Archive/FileRead.cs index f2239db..3cc4d71 100644 --- a/Adaptation/FileHandlers/Archive/FileRead.cs +++ b/Adaptation/FileHandlers/Archive/FileRead.cs @@ -18,8 +18,8 @@ public class FileRead : Shared.FileRead, IFileRead private readonly string _JobIdParentDirectory; private readonly string _JobIdArchiveParentDirectory; - public FileRead(ISMTP smtp, Dictionary fileParameter, string cellInstanceName, string cellInstanceConnectionName, FileConnectorConfiguration fileConnectorConfiguration, string equipmentTypeName, string parameterizedModelObjectDefinitionType, IList modelObjectParameters, string equipmentDictionaryName, Dictionary> dummyRuns, Dictionary> staticRuns, bool useCyclicalForDescription, bool isEAFHosted) : - base(new Description(), false, smtp, fileParameter, cellInstanceName, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted) + public FileRead(ISMTP smtp, Dictionary fileParameter, string cellInstanceName, int? connectionCount, string cellInstanceConnectionName, FileConnectorConfiguration fileConnectorConfiguration, string equipmentTypeName, string parameterizedModelObjectDefinitionType, IList modelObjectParameters, string equipmentDictionaryName, Dictionary> dummyRuns, Dictionary> staticRuns, bool useCyclicalForDescription, bool isEAFHosted) : + base(new Description(), false, smtp, fileParameter, cellInstanceName, connectionCount, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted: connectionCount is null) { _MinFileLength = 10; _NullData = string.Empty; @@ -115,10 +115,10 @@ public class FileRead : Shared.FileRead, IFileRead } } +#pragma warning disable IDE0060 private void MoveArchive(string reportFullPath, DateTime dateTime) +#pragma warning restore IDE0060 { - if (dateTime == DateTime.MinValue) - { } string logisticsSequence = _Logistics.Sequence.ToString(); string weekOfYear = _Calendar.GetWeekOfYear(_Logistics.DateTimeFromSequence, CalendarWeekRule.FirstDay, DayOfWeek.Sunday).ToString("00"); string weekDirectory = $"{_Logistics.DateTimeFromSequence:yyyy}_Week_{weekOfYear}{@"\"}{_Logistics.DateTimeFromSequence:yyyy-MM-dd}"; diff --git a/Adaptation/FileHandlers/CellInstanceConnectionName.cs b/Adaptation/FileHandlers/CellInstanceConnectionName.cs index 31d51b9..e8bb40b 100644 --- a/Adaptation/FileHandlers/CellInstanceConnectionName.cs +++ b/Adaptation/FileHandlers/CellInstanceConnectionName.cs @@ -9,21 +9,21 @@ namespace Adaptation.FileHandlers; public class CellInstanceConnectionName { - internal static IFileRead Get(ISMTP smtp, Dictionary fileParameter, string cellInstanceName, string cellInstanceConnectionName, FileConnectorConfiguration fileConnectorConfiguration, string equipmentTypeName, string parameterizedModelObjectDefinitionType, IList modelObjectParameters, string equipmentDictionaryName, Dictionary> dummyRuns, Dictionary> staticRuns, bool useCyclicalForDescription, bool isEAFHosted) + internal static IFileRead Get(ISMTP smtp, Dictionary fileParameter, string cellInstanceName, string cellInstanceConnectionName, FileConnectorConfiguration fileConnectorConfiguration, string equipmentTypeName, string parameterizedModelObjectDefinitionType, IList modelObjectParameters, string equipmentDictionaryName, Dictionary> dummyRuns, Dictionary> staticRuns, bool useCyclicalForDescription, int? connectionCount) { IFileRead result = cellInstanceConnectionName switch { - nameof(APC) => new APC.FileRead(smtp, fileParameter, cellInstanceName, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted), - nameof(Archive) => new Archive.FileRead(smtp, fileParameter, cellInstanceName, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted), - nameof(Dummy) => new Dummy.FileRead(smtp, fileParameter, cellInstanceName, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted), - nameof(IQSSi) => new IQSSi.FileRead(smtp, fileParameter, cellInstanceName, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted), - nameof(MoveMatchingFiles) => new MoveMatchingFiles.FileRead(smtp, fileParameter, cellInstanceName, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted), - 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(Processed) => new Processed.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), + nameof(APC) => new APC.FileRead(smtp, fileParameter, cellInstanceName, connectionCount, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted: connectionCount is null), + nameof(Archive) => new Archive.FileRead(smtp, fileParameter, cellInstanceName, connectionCount, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted: connectionCount is null), + nameof(Dummy) => new Dummy.FileRead(smtp, fileParameter, cellInstanceName, connectionCount, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted: connectionCount is null), + nameof(IQSSi) => new IQSSi.FileRead(smtp, fileParameter, cellInstanceName, connectionCount, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted: connectionCount is null), + nameof(MoveMatchingFiles) => new MoveMatchingFiles.FileRead(smtp, fileParameter, cellInstanceName, connectionCount, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted: connectionCount is null), + nameof(OpenInsight) => new OpenInsight.FileRead(smtp, fileParameter, cellInstanceName, connectionCount, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted: connectionCount is null), + nameof(OpenInsightMetrologyViewer) => new OpenInsightMetrologyViewer.FileRead(smtp, fileParameter, cellInstanceName, connectionCount, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted: connectionCount is null), + nameof(OpenInsightMetrologyViewerAttachments) => new OpenInsightMetrologyViewerAttachments.FileRead(smtp, fileParameter, cellInstanceName, connectionCount, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted: connectionCount is null), + nameof(pcl) => new pcl.FileRead(smtp, fileParameter, cellInstanceName, connectionCount, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted: connectionCount is null), + nameof(Processed) => new Processed.FileRead(smtp, fileParameter, cellInstanceName, connectionCount, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted: connectionCount is null), + nameof(SPaCe) => new SPaCe.FileRead(smtp, fileParameter, cellInstanceName, connectionCount, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted: connectionCount is null), _ => throw new Exception($"\"{cellInstanceConnectionName}\" not mapped") }; return result; diff --git a/Adaptation/FileHandlers/Dummy/FileRead.cs b/Adaptation/FileHandlers/Dummy/FileRead.cs index 7692d3d..79eda27 100644 --- a/Adaptation/FileHandlers/Dummy/FileRead.cs +++ b/Adaptation/FileHandlers/Dummy/FileRead.cs @@ -23,8 +23,8 @@ public class FileRead : Shared.FileRead, IFileRead private int _LastDummyRunIndex; private readonly string[] _CellNames; - public FileRead(ISMTP smtp, Dictionary fileParameter, string cellInstanceName, string cellInstanceConnectionName, FileConnectorConfiguration fileConnectorConfiguration, string equipmentTypeName, string parameterizedModelObjectDefinitionType, IList modelObjectParameters, string equipmentDictionaryName, Dictionary> dummyRuns, Dictionary> staticRuns, bool useCyclicalForDescription, bool isEAFHosted) : - base(new Description(), false, smtp, fileParameter, cellInstanceName, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted) + public FileRead(ISMTP smtp, Dictionary fileParameter, string cellInstanceName, int? connectionCount, string cellInstanceConnectionName, FileConnectorConfiguration fileConnectorConfiguration, string equipmentTypeName, string parameterizedModelObjectDefinitionType, IList modelObjectParameters, string equipmentDictionaryName, Dictionary> dummyRuns, Dictionary> staticRuns, bool useCyclicalForDescription, bool isEAFHosted) : + base(new Description(), false, smtp, fileParameter, cellInstanceName, connectionCount, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted: connectionCount is null) { _MinFileLength = 10; _NullData = string.Empty; diff --git a/Adaptation/FileHandlers/IQSSi/FileRead.cs b/Adaptation/FileHandlers/IQSSi/FileRead.cs index 315ce1e..1814ad0 100644 --- a/Adaptation/FileHandlers/IQSSi/FileRead.cs +++ b/Adaptation/FileHandlers/IQSSi/FileRead.cs @@ -17,8 +17,8 @@ public class FileRead : Shared.FileRead, IFileRead private readonly string _IQSFile; - public FileRead(ISMTP smtp, Dictionary fileParameter, string cellInstanceName, string cellInstanceConnectionName, FileConnectorConfiguration fileConnectorConfiguration, string equipmentTypeName, string parameterizedModelObjectDefinitionType, IList modelObjectParameters, string equipmentDictionaryName, Dictionary> dummyRuns, Dictionary> staticRuns, bool useCyclicalForDescription, bool isEAFHosted) : - base(new Description(), false, smtp, fileParameter, cellInstanceName, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted) + public FileRead(ISMTP smtp, Dictionary fileParameter, string cellInstanceName, int? connectionCount, string cellInstanceConnectionName, FileConnectorConfiguration fileConnectorConfiguration, string equipmentTypeName, string parameterizedModelObjectDefinitionType, IList modelObjectParameters, string equipmentDictionaryName, Dictionary> dummyRuns, Dictionary> staticRuns, bool useCyclicalForDescription, bool isEAFHosted) : + base(new Description(), false, smtp, fileParameter, cellInstanceName, connectionCount, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted: connectionCount is null) { _MinFileLength = 10; _NullData = string.Empty; @@ -153,8 +153,6 @@ public class FileRead : Shared.FileRead, IFileRead private Tuple> GetExtractResult(string reportFullPath, DateTime dateTime) { - if (dateTime == DateTime.MinValue) - { } Tuple> results; Tuple pdsf = ProcessDataStandardFormat.GetLogisticsColumnsAndBody(reportFullPath); _Logistics = new Logistics(reportFullPath, pdsf.Item1); diff --git a/Adaptation/FileHandlers/MoveMatchingFiles/FileRead.cs b/Adaptation/FileHandlers/MoveMatchingFiles/FileRead.cs index 7ec2cfb..39f8d62 100644 --- a/Adaptation/FileHandlers/MoveMatchingFiles/FileRead.cs +++ b/Adaptation/FileHandlers/MoveMatchingFiles/FileRead.cs @@ -16,8 +16,8 @@ namespace Adaptation.FileHandlers.MoveMatchingFiles; public class FileRead : Shared.FileRead, IFileRead { - public FileRead(ISMTP smtp, Dictionary fileParameter, string cellInstanceName, string cellInstanceConnectionName, FileConnectorConfiguration fileConnectorConfiguration, string equipmentTypeName, string parameterizedModelObjectDefinitionType, IList modelObjectParameters, string equipmentDictionaryName, Dictionary> dummyRuns, Dictionary> staticRuns, bool useCyclicalForDescription, bool isEAFHosted) : - base(new Description(), false, smtp, fileParameter, cellInstanceName, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted) + public FileRead(ISMTP smtp, Dictionary fileParameter, string cellInstanceName, int? connectionCount, string cellInstanceConnectionName, FileConnectorConfiguration fileConnectorConfiguration, string equipmentTypeName, string parameterizedModelObjectDefinitionType, IList modelObjectParameters, string equipmentDictionaryName, Dictionary> dummyRuns, Dictionary> staticRuns, bool useCyclicalForDescription, bool isEAFHosted) : + base(new Description(), false, smtp, fileParameter, cellInstanceName, connectionCount, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted: connectionCount is null) { _MinFileLength = 10; _NullData = string.Empty; diff --git a/Adaptation/FileHandlers/OpenInsight/FileRead.cs b/Adaptation/FileHandlers/OpenInsight/FileRead.cs index 6783b13..a1aa712 100644 --- a/Adaptation/FileHandlers/OpenInsight/FileRead.cs +++ b/Adaptation/FileHandlers/OpenInsight/FileRead.cs @@ -22,8 +22,8 @@ public class FileRead : Shared.FileRead, IFileRead private readonly string _OpenInsightApiECDirectory; private readonly string _OpenInsightApiIFXDirectory; - public FileRead(ISMTP smtp, Dictionary fileParameter, string cellInstanceName, string cellInstanceConnectionName, FileConnectorConfiguration fileConnectorConfiguration, string equipmentTypeName, string parameterizedModelObjectDefinitionType, IList modelObjectParameters, string equipmentDictionaryName, Dictionary> dummyRuns, Dictionary> staticRuns, bool useCyclicalForDescription, bool isEAFHosted) : - base(new Description(), false, smtp, fileParameter, cellInstanceName, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted) + public FileRead(ISMTP smtp, Dictionary fileParameter, string cellInstanceName, int? connectionCount, string cellInstanceConnectionName, FileConnectorConfiguration fileConnectorConfiguration, string equipmentTypeName, string parameterizedModelObjectDefinitionType, IList modelObjectParameters, string equipmentDictionaryName, Dictionary> dummyRuns, Dictionary> staticRuns, bool useCyclicalForDescription, bool isEAFHosted) : + base(new Description(), false, smtp, fileParameter, cellInstanceName, connectionCount, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted: connectionCount is null) { _MinFileLength = 10; _NullData = string.Empty; @@ -252,20 +252,17 @@ public class FileRead : Shared.FileRead, IFileRead string lines = GetLines(_Logistics, descriptions); if (!string.IsNullOrEmpty(lines)) { - int? count; long? subGroupId; long breakAfter = dateTime.AddSeconds(_BreakAfterSeconds).Ticks; long preWait = _FileConnectorConfiguration?.FileHandleWaitTime is null ? dateTime.AddMilliseconds(1234).Ticks : dateTime.AddMilliseconds(_FileConnectorConfiguration.FileHandleWaitTime.Value).Ticks; if (string.IsNullOrEmpty(descriptions[0].Reactor) || string.IsNullOrEmpty(descriptions[0].PSN)) - (subGroupId, count) = (null, null); + subGroupId = null; else - (subGroupId, count, string _) = FromIQS.GetCommandText(_IqsConnectionString, _Logistics, descriptions[0], breakAfter, preWait); + (subGroupId, int? _, string _) = FromIQS.GetCommandText(_IqsConnectionString, _Logistics, descriptions[0], breakAfter, preWait); if (subGroupId is null) collection.Add(new(new ScopeInfo(tests[0], _OpenInsightFilePattern), lines)); - else if (count is null) - collection.Add(new(new ScopeInfo(tests[0], $"{subGroupId.Value} {_OpenInsightFilePattern}"), lines)); else - collection.Add(new(new ScopeInfo(tests[0], $"{subGroupId.Value} E{count.Value} {_OpenInsightFilePattern}"), lines)); + collection.Add(new(new ScopeInfo(tests[0], $"{subGroupId.Value} {_OpenInsightFilePattern}"), lines)); string weekOfYear = _Calendar.GetWeekOfYear(_Logistics.DateTimeFromSequence, CalendarWeekRule.FirstDay, DayOfWeek.Sunday).ToString("00"); FromIQS.Save(_OpenInsightApiECDirectory, _OpenInsightApiIFXDirectory, _Logistics, reportFullPath, logistics, descriptions.First(), lines, subGroupId, weekOfYear); } diff --git a/Adaptation/FileHandlers/OpenInsight/FromIQS.cs b/Adaptation/FileHandlers/OpenInsight/FromIQS.cs index 21cedbb..772e652 100644 --- a/Adaptation/FileHandlers/OpenInsight/FromIQS.cs +++ b/Adaptation/FileHandlers/OpenInsight/FromIQS.cs @@ -20,25 +20,38 @@ public class FromIQS { StringBuilder result = new(); _ = result + .AppendLine(" select iq.ev_count, iq.cl_count, iq.sl_count, iq.se_sgrp, iq.se_sgtm, iq.se_tsno, iq.td_test, iq.pr_name, iq.jd_name, iq.pl_name, iq.pd_name, iq.td_name, iq.se_val ") + .AppendLine(" from ( ") .AppendLine(" select ") .AppendLine(" se.f_sgrp se_sgrp, ") .AppendLine(" se.f_sgtm se_sgtm, ") .AppendLine(" se.f_tsno se_tsno, ") .AppendLine(" se.f_val se_val, ") - .AppendLine(" rd.f_name rd_name, ") + .AppendLine(" pr.f_name pr_name, ") .AppendLine(" jd.f_name jd_name, ") .AppendLine(" pl.f_name pl_name, ") .AppendLine(" pd.f_name pd_name, ") .AppendLine(" td.f_test td_test, ") .AppendLine(" td.f_name td_name, ") + .AppendLine(" (select count(cl.f_part) ") + .AppendLine(" from [spcepiworld].[dbo].[ctrl_lim] cl ") + .AppendLine(" where cl.f_part = pd.f_part ") + .AppendLine(" and cl.f_test = td.f_test ") + .AppendLine(" ) cl_count, ") + .AppendLine(" (select count(sl.f_part) ") + .AppendLine(" from [spcepiworld].[dbo].[spec_lim] sl ") + .AppendLine(" where sl.f_part = pd.f_part ") + .AppendLine(" and sl.f_test = td.f_test ") + .AppendLine(" ) sl_count, ") .AppendLine(" (select count(ev.f_evnt) ") .AppendLine(" from [spcepiworld].[dbo].[evnt_inf] ev ") - .AppendLine(" where ev.f_prcs = rd.f_prcs ") + .AppendLine(" where ev.f_prcs = pr.f_prcs ") .AppendLine(" and ev.f_part = pd.f_part ") - .AppendLine(" and ev.f_sgtm = se.f_sgtm) ev_count ") + .AppendLine(" and ev.f_sgtm = se.f_sgtm ") + .AppendLine(" ) ev_count ") .AppendLine(" from [spcepiworld].[dbo].[sgrp_ext] se ") - .AppendLine(" join [spcepiworld].[dbo].[prcs_dat] rd ") - .AppendLine(" on se.f_prcs = rd.f_prcs ") + .AppendLine(" join [spcepiworld].[dbo].[prcs_dat] pr ") + .AppendLine(" on se.f_prcs = pr.f_prcs ") .AppendLine(" join [spcepiworld].[dbo].[job_dat] jd ") .AppendLine(" on se.f_job = jd.f_job ") .AppendLine(" join [spcepiworld].[dbo].[part_lot] pl ") @@ -53,11 +66,13 @@ public class FromIQS if (!string.IsNullOrEmpty(description.RDS)) _ = result.Append(" and pl.f_name = '").Append(description.RDS).AppendLine("' "); _ = result - .Append(" and rd.f_name = '").Append(description.Reactor).AppendLine("' ") + .Append(" and pr.f_name = '").Append(description.Reactor).AppendLine("' ") .Append(" and pd.f_name = '").Append(description.PSN).AppendLine("' ") .AppendLine(" and jd.f_name in ('TENCOR1', 'TENCOR2', 'TENCOR3') ") .Append(" and jd.f_name = '").Append(logistics.MesEntity).AppendLine("' ") .Append(" and dateadd(HH, -7, (dateadd(SS, convert(bigint, se.f_sgtm), '19700101'))) = '").Append(dateTime).AppendLine("' ") + .AppendLine(" ) as iq ") + .AppendLine(" order by iq.ev_count desc, iq.cl_count desc, iq.sl_count desc, iq.se_sgrp, iq.se_tsno, iq.td_test ") .AppendLine(" for json path "); return result.ToString(); } @@ -99,7 +114,17 @@ public class FromIQS { stringBuilder = GetForJsonPath(connectionString, commandText); if (stringBuilder.Length > 0) + { + long postBreakAfter = DateTime.Now.AddSeconds(5).Ticks; + for (short y = 0; y < short.MaxValue; y++) + { + if (DateTime.Now.Ticks > postBreakAfter) + break; + Thread.Sleep(250); + } + stringBuilder = GetForJsonPath(connectionString, commandText); break; + } if (DateTime.Now.Ticks > breakAfter) // throw new Exception($"After {breakAfterSeconds} seconds, didn't find sub group id!"); break; @@ -115,13 +140,12 @@ public class FromIQS else { JsonProperty[] jsonProperties = jsonElements[0].EnumerateObject().ToArray(); - if (!jsonProperties.Any() || jsonProperties[0].Name != "se_sgrp" || !long.TryParse(jsonProperties[0].Value.ToString(), out long subGroupId)) + if (!jsonProperties.Any() || jsonProperties[3].Name != "se_sgrp" || !long.TryParse(jsonProperties[3].Value.ToString(), out long subGroupId)) commandText = stringBuilder.ToString(); else { result = subGroupId; - commandText = GetCommandText(logistics, description, dateTime, subGroupId); - if (jsonProperties.Any() && jsonProperties[10].Name == "ev_count" && int.TryParse(jsonProperties[10].Value.ToString(), out int evCount)) + if (jsonProperties.Any() && jsonProperties[0].Name == "ev_count" && int.TryParse(jsonProperties[0].Value.ToString(), out int evCount)) count = evCount; } } diff --git a/Adaptation/FileHandlers/OpenInsightMetrologyViewer/FileRead.cs b/Adaptation/FileHandlers/OpenInsightMetrologyViewer/FileRead.cs index c7212a3..49affd8 100644 --- a/Adaptation/FileHandlers/OpenInsightMetrologyViewer/FileRead.cs +++ b/Adaptation/FileHandlers/OpenInsightMetrologyViewer/FileRead.cs @@ -17,8 +17,8 @@ public class FileRead : Shared.FileRead, IFileRead private readonly string _OpenInsightMetrologyViewerAPI; - public FileRead(ISMTP smtp, Dictionary fileParameter, string cellInstanceName, string cellInstanceConnectionName, FileConnectorConfiguration fileConnectorConfiguration, string equipmentTypeName, string parameterizedModelObjectDefinitionType, IList modelObjectParameters, string equipmentDictionaryName, Dictionary> dummyRuns, Dictionary> staticRuns, bool useCyclicalForDescription, bool isEAFHosted) : - base(new Description(), false, smtp, fileParameter, cellInstanceName, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted) + public FileRead(ISMTP smtp, Dictionary fileParameter, string cellInstanceName, int? connectionCount, string cellInstanceConnectionName, FileConnectorConfiguration fileConnectorConfiguration, string equipmentTypeName, string parameterizedModelObjectDefinitionType, IList modelObjectParameters, string equipmentDictionaryName, Dictionary> dummyRuns, Dictionary> staticRuns, bool useCyclicalForDescription, bool isEAFHosted) : + base(new Description(), false, smtp, fileParameter, cellInstanceName, connectionCount, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted: connectionCount is null) { _MinFileLength = 10; _NullData = string.Empty; @@ -107,10 +107,10 @@ public class FileRead : Shared.FileRead, IFileRead return results; } +#pragma warning disable IDE0060 private void SendData(DateTime dateTime, List descriptions) +#pragma warning restore IDE0060 { - if (dateTime == DateTime.MinValue) - { } WSRequest wsRequest = new(this, _Logistics, descriptions); (string json, WS.Results wsResults) = WS.SendData(_OpenInsightMetrologyViewerAPI, wsRequest); if (!wsResults.Success) diff --git a/Adaptation/FileHandlers/OpenInsightMetrologyViewer/WSRequest.cs b/Adaptation/FileHandlers/OpenInsightMetrologyViewer/WSRequest.cs index 7ad0038..78b484e 100644 --- a/Adaptation/FileHandlers/OpenInsightMetrologyViewer/WSRequest.cs +++ b/Adaptation/FileHandlers/OpenInsightMetrologyViewer/WSRequest.cs @@ -71,10 +71,10 @@ public class WSRequest [Obsolete("For json")] public WSRequest() { } +#pragma warning disable IDE0060 internal WSRequest(IFileRead fileRead, Logistics logistics, List descriptions) +#pragma warning restore IDE0060 { - if (fileRead is null) - { } i = -1; Id = 0; Zone = null; @@ -286,10 +286,10 @@ public class WSRequest pdDocument.close(); } +#pragma warning disable IDE0060 internal static void PostOpenInsightMetrologyViewerAttachments(IFileRead fileRead, Logistics logistics, string openInsightMetrologyViewerAPI, DateTime dateTime, string json, List descriptions, string matchDirectory) +#pragma warning restore IDE0060 { - if (dateTime == DateTime.MinValue) - { } string checkFileName; if (string.IsNullOrEmpty(json)) { diff --git a/Adaptation/FileHandlers/OpenInsightMetrologyViewerAttachments/FileRead.cs b/Adaptation/FileHandlers/OpenInsightMetrologyViewerAttachments/FileRead.cs index 9f5965e..3babc7b 100644 --- a/Adaptation/FileHandlers/OpenInsightMetrologyViewerAttachments/FileRead.cs +++ b/Adaptation/FileHandlers/OpenInsightMetrologyViewerAttachments/FileRead.cs @@ -17,8 +17,8 @@ public class FileRead : Shared.FileRead, IFileRead private readonly string _JobIdParentDirectory; private readonly string _OpenInsightMetrologyViewerAPI; - public FileRead(ISMTP smtp, Dictionary fileParameter, string cellInstanceName, string cellInstanceConnectionName, FileConnectorConfiguration fileConnectorConfiguration, string equipmentTypeName, string parameterizedModelObjectDefinitionType, IList modelObjectParameters, string equipmentDictionaryName, Dictionary> dummyRuns, Dictionary> staticRuns, bool useCyclicalForDescription, bool isEAFHosted) : - base(new Description(), false, smtp, fileParameter, cellInstanceName, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted) + public FileRead(ISMTP smtp, Dictionary fileParameter, string cellInstanceName, int? connectionCount, string cellInstanceConnectionName, FileConnectorConfiguration fileConnectorConfiguration, string equipmentTypeName, string parameterizedModelObjectDefinitionType, IList modelObjectParameters, string equipmentDictionaryName, Dictionary> dummyRuns, Dictionary> staticRuns, bool useCyclicalForDescription, bool isEAFHosted) : + base(new Description(), false, smtp, fileParameter, cellInstanceName, connectionCount, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted: connectionCount is null) { _MinFileLength = 10; _NullData = string.Empty; @@ -108,12 +108,10 @@ public class FileRead : Shared.FileRead, IFileRead return results; } +#pragma warning disable IDE0060 private void PostOpenInsightMetrologyViewerAttachments(string reportFullPath, DateTime dateTime, List descriptions) +#pragma warning restore IDE0060 { - if (string.IsNullOrEmpty(reportFullPath)) - { } - if (dateTime == DateTime.MinValue) - { } string jobIdDirectory = Path.Combine(_JobIdParentDirectory, _Logistics.JobID); if (!Directory.Exists(jobIdDirectory)) _ = Directory.CreateDirectory(jobIdDirectory); diff --git a/Adaptation/FileHandlers/Processed/FileRead.cs b/Adaptation/FileHandlers/Processed/FileRead.cs index 846b0f2..928e84d 100644 --- a/Adaptation/FileHandlers/Processed/FileRead.cs +++ b/Adaptation/FileHandlers/Processed/FileRead.cs @@ -17,8 +17,8 @@ public class FileRead : Shared.FileRead, IFileRead private readonly string _JobIdParentDirectory; private readonly string _JobIdProcessParentDirectory; - public FileRead(ISMTP smtp, Dictionary fileParameter, string cellInstanceName, string cellInstanceConnectionName, FileConnectorConfiguration fileConnectorConfiguration, string equipmentTypeName, string parameterizedModelObjectDefinitionType, IList modelObjectParameters, string equipmentDictionaryName, Dictionary> dummyRuns, Dictionary> staticRuns, bool useCyclicalForDescription, bool isEAFHosted) : - base(new Description(), false, smtp, fileParameter, cellInstanceName, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted) + public FileRead(ISMTP smtp, Dictionary fileParameter, string cellInstanceName, int? connectionCount, string cellInstanceConnectionName, FileConnectorConfiguration fileConnectorConfiguration, string equipmentTypeName, string parameterizedModelObjectDefinitionType, IList modelObjectParameters, string equipmentDictionaryName, Dictionary> dummyRuns, Dictionary> staticRuns, bool useCyclicalForDescription, bool isEAFHosted) : + base(new Description(), false, smtp, fileParameter, cellInstanceName, connectionCount, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted: connectionCount is null) { _MinFileLength = 10; _NullData = string.Empty; @@ -108,10 +108,10 @@ public class FileRead : Shared.FileRead, IFileRead return results; } +#pragma warning disable IDE0060 private void DirectoryMove(string reportFullPath, DateTime dateTime, List descriptions) +#pragma warning restore IDE0060 { - if (dateTime == DateTime.MinValue) - { } FileInfo fileInfo = new(reportFullPath); string logisticsSequence = _Logistics.Sequence.ToString(); string jobIdDirectory = Path.Combine(_JobIdParentDirectory, _Logistics.JobID); diff --git a/Adaptation/FileHandlers/SPaCe/FileRead.cs b/Adaptation/FileHandlers/SPaCe/FileRead.cs index a6c47a1..a8155b6 100644 --- a/Adaptation/FileHandlers/SPaCe/FileRead.cs +++ b/Adaptation/FileHandlers/SPaCe/FileRead.cs @@ -14,8 +14,8 @@ namespace Adaptation.FileHandlers.SPaCe; public class FileRead : Shared.FileRead, IFileRead { - public FileRead(ISMTP smtp, Dictionary fileParameter, string cellInstanceName, string cellInstanceConnectionName, FileConnectorConfiguration fileConnectorConfiguration, string equipmentTypeName, string parameterizedModelObjectDefinitionType, IList modelObjectParameters, string equipmentDictionaryName, Dictionary> dummyRuns, Dictionary> staticRuns, bool useCyclicalForDescription, bool isEAFHosted) : - base(new Description(), false, smtp, fileParameter, cellInstanceName, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted) + public FileRead(ISMTP smtp, Dictionary fileParameter, string cellInstanceName, int? connectionCount, string cellInstanceConnectionName, FileConnectorConfiguration fileConnectorConfiguration, string equipmentTypeName, string parameterizedModelObjectDefinitionType, IList modelObjectParameters, string equipmentDictionaryName, Dictionary> dummyRuns, Dictionary> staticRuns, bool useCyclicalForDescription, bool isEAFHosted) : + base(new Description(), false, smtp, fileParameter, cellInstanceName, connectionCount, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted: connectionCount is null) { _MinFileLength = 10; _NullData = string.Empty; @@ -116,8 +116,6 @@ public class FileRead : Shared.FileRead, IFileRead private Tuple> GetExtractResult(string reportFullPath, DateTime dateTime) { - if (dateTime == DateTime.MinValue) - { } Tuple> results; Tuple pdsf = ProcessDataStandardFormat.GetLogisticsColumnsAndBody(reportFullPath); _Logistics = new Logistics(reportFullPath, pdsf.Item1); diff --git a/Adaptation/FileHandlers/pcl/FileRead.cs b/Adaptation/FileHandlers/pcl/FileRead.cs index 4603b30..9247d11 100644 --- a/Adaptation/FileHandlers/pcl/FileRead.cs +++ b/Adaptation/FileHandlers/pcl/FileRead.cs @@ -17,8 +17,8 @@ public class FileRead : Shared.FileRead, IFileRead private long? _TickOffset; private readonly string _GhostPCLFileName; - public FileRead(ISMTP smtp, Dictionary fileParameter, string cellInstanceName, string cellInstanceConnectionName, FileConnectorConfiguration fileConnectorConfiguration, string equipmentTypeName, string parameterizedModelObjectDefinitionType, IList modelObjectParameters, string equipmentDictionaryName, Dictionary> dummyRuns, Dictionary> staticRuns, bool useCyclicalForDescription, bool isEAFHosted) : - base(new Description(), true, smtp, fileParameter, cellInstanceName, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted) + public FileRead(ISMTP smtp, Dictionary fileParameter, string cellInstanceName, int? connectionCount, string cellInstanceConnectionName, FileConnectorConfiguration fileConnectorConfiguration, string equipmentTypeName, string parameterizedModelObjectDefinitionType, IList modelObjectParameters, string equipmentDictionaryName, Dictionary> dummyRuns, Dictionary> staticRuns, bool useCyclicalForDescription, bool isEAFHosted) : + base(new Description(), true, smtp, fileParameter, cellInstanceName, connectionCount, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted: connectionCount is null) { _MinFileLength = 15; _NullData = string.Empty; diff --git a/Adaptation/FileHandlers/pcl/ProcessData.cs b/Adaptation/FileHandlers/pcl/ProcessData.cs index bd9b68f..244ef34 100644 --- a/Adaptation/FileHandlers/pcl/ProcessData.cs +++ b/Adaptation/FileHandlers/pcl/ProcessData.cs @@ -325,7 +325,17 @@ public class ProcessData : IProcessData string defaultLayer = string.Empty; string defaultReactor = string.Empty; string defaultEmployee = string.Empty; - if (string.IsNullOrEmpty(text) || (text.Length is 2 or 3 && Regex.IsMatch(text, "^[a-zA-z]{2,3}"))) + if (Regex.IsMatch(text, @"^[a-zA-z][0-9]{4}$")) + { + lot = text.ToUpper(); + psn = defaultPSN; + rds = defaultRDS; + zone = defaultZone; + layer = defaultLayer; + reactor = defaultReactor; + employee = defaultEmployee; + } + else if (string.IsNullOrEmpty(text) || (text.Length is 2 or 3 && Regex.IsMatch(text, "^[a-zA-z]{2,3}"))) { lot = text; employee = text; @@ -398,10 +408,10 @@ public class ProcessData : IProcessData UniqueId = string.Format("{0}_{1}_{2}", logistics.JobID, lot, Path.GetFileNameWithoutExtension(logistics.ReportFullPath)); } +#pragma warning disable IDE0060 private void ParseLotSummary(IFileRead fileRead, ILogistics logistics, string headerFileName, Dictionary pages, Dictionary> slots) +#pragma warning restore IDE0060 { - if (fileRead is null) - { } _I = 0; ParseErrorText = string.Empty; if (!pages.ContainsKey(headerFileName)) diff --git a/Adaptation/MET08DDUPSFS6420-Development.yml b/Adaptation/MET08DDUPSFS6420-Development.yml index ede4952..a05a3ca 100644 --- a/Adaptation/MET08DDUPSFS6420-Development.yml +++ b/Adaptation/MET08DDUPSFS6420-Development.yml @@ -12,7 +12,7 @@ pool: steps: - script: | - set coreVersion=net6.0 + set coreVersion=net7.0 echo %coreVersion% echo ##vso[task.setvariable variable=CoreVersion;]%coreVersion% echo $(CoreVersion) @@ -22,7 +22,7 @@ steps: set configuration=Debug echo %configuration% echo ##vso[task.setvariable variable=Configuration;]%configuration% - echo ($Configuration) + echo $(Configuration) displayName: Configuration - script: | @@ -121,7 +121,15 @@ steps: testResultsFormat: VSTest testResultsFiles: "**/*.trx" testRunTitle: "$(GitCommitSeven)-$(Build.BuildId)-$(CoreVersion)-$(Configuration)-$(Build.Repository.Name)" - searchFolder: "$(System.DefaultWorkingDirectory)" + searchFolder: "$(System.DefaultWorkingDirectory)/TestResults" + + - task: PublishTestResults@2 + displayName: "Publish Test Results */coverage.cobertura.xml" + inputs: + testResultsFormat: VSTest + testResultsFiles: "*/coverage.cobertura.xml" + testRunTitle: "$(GitCommitSeven)-$(Build.BuildId)-$(CoreVersion)-$(Configuration)-$(Build.Repository.Name)" + searchFolder: "$(System.DefaultWorkingDirectory)/TestResults" - task: mspremier.CreateWorkItem.CreateWorkItem-task.CreateWorkItem@1 displayName: "Create work item" diff --git a/Adaptation/MET08DDUPSFS6420.Tests.csproj b/Adaptation/MET08DDUPSFS6420.Tests.csproj index 77afe96..caf2346 100644 --- a/Adaptation/MET08DDUPSFS6420.Tests.csproj +++ b/Adaptation/MET08DDUPSFS6420.Tests.csproj @@ -11,7 +11,7 @@ 10.0 disable win-x64 - net6.0 + net7.0 trx diff --git a/Adaptation/MET08DDUPSFS6420.yml b/Adaptation/MET08DDUPSFS6420.yml index f081305..8fcc4c3 100644 --- a/Adaptation/MET08DDUPSFS6420.yml +++ b/Adaptation/MET08DDUPSFS6420.yml @@ -12,7 +12,7 @@ pool: steps: - script: | - set coreVersion=net6.0 + set coreVersion=net7.0 echo %coreVersion% echo ##vso[task.setvariable variable=CoreVersion;]%coreVersion% echo $(CoreVersion) @@ -22,11 +22,11 @@ steps: set configuration=Release echo %configuration% echo ##vso[task.setvariable variable=Configuration;]%configuration% - echo ($Configuration) + echo $(Configuration) displayName: Configuration - script: | - set nugetSource=https://messa08ec.ec.local/v3/index.json + set nugetSource=https://eaf-prod.mes.infineon.com/v3/index.json echo %nugetSource% echo ##vso[task.setvariable variable=NugetSource;]%nugetSource% echo $(NugetSource) @@ -118,7 +118,15 @@ steps: testResultsFormat: VSTest testResultsFiles: "**/*.trx" testRunTitle: "$(GitCommitSeven)-$(Build.BuildId)-$(CoreVersion)-$(Configuration)-$(Build.Repository.Name)" - searchFolder: "$(System.DefaultWorkingDirectory)" + searchFolder: "$(System.DefaultWorkingDirectory)/TestResults" + + - task: PublishTestResults@2 + displayName: "Publish Test Results */coverage.cobertura.xml" + inputs: + testResultsFormat: VSTest + testResultsFiles: "*/coverage.cobertura.xml" + testRunTitle: "$(GitCommitSeven)-$(Build.BuildId)-$(CoreVersion)-$(Configuration)-$(Build.Repository.Name)" + searchFolder: "$(System.DefaultWorkingDirectory)/TestResults" - task: mspremier.CreateWorkItem.CreateWorkItem-task.CreateWorkItem@1 displayName: "Create work item" diff --git a/Adaptation/Shared/FileRead.cs b/Adaptation/Shared/FileRead.cs index 878ab52..956cafc 100644 --- a/Adaptation/Shared/FileRead.cs +++ b/Adaptation/Shared/FileRead.cs @@ -63,7 +63,7 @@ public class FileRead : Properties.IFileRead string Properties.IFileRead.CellInstanceConnectionName => _CellInstanceConnectionName; string Properties.IFileRead.ParameterizedModelObjectDefinitionType => _ParameterizedModelObjectDefinitionType; - public FileRead(IDescription description, bool isEvent, ISMTP smtp, Dictionary fileParameter, string cellInstanceName, string cellInstanceConnectionName, FileConnectorConfiguration fileConnectorConfiguration, string equipmentTypeName, string parameterizedModelObjectDefinitionType, IList modelObjectParameters, string equipmentDictionaryName, Dictionary> dummyRuns, Dictionary> staticRuns, bool useCyclicalForDescription, bool isEAFHosted) + public FileRead(IDescription description, bool isEvent, ISMTP smtp, Dictionary fileParameter, string cellInstanceName, int? connectionCount, string cellInstanceConnectionName, FileConnectorConfiguration fileConnectorConfiguration, string equipmentTypeName, string parameterizedModelObjectDefinitionType, IList modelObjectParameters, string equipmentDictionaryName, Dictionary> dummyRuns, Dictionary> staticRuns, bool useCyclicalForDescription, bool isEAFHosted) { _SMTP = smtp; _IsEvent = isEvent; @@ -106,7 +106,7 @@ public class FileRead : Properties.IFileRead throw new Exception(cellInstanceConnectionName); if (string.IsNullOrEmpty(equipmentDictionaryName) && isEvent) throw new Exception(cellInstanceConnectionName); - if (!string.IsNullOrEmpty(equipmentDictionaryName) && !isEvent) + if (!string.IsNullOrEmpty(equipmentDictionaryName) && !isEvent && connectionCount > 1) throw new Exception(cellInstanceConnectionName); // if (string.IsNullOrEmpty(equipmentDictionaryName) && !isEvent) // throw new Exception(cellInstanceConnectionName); @@ -266,13 +266,14 @@ public class FileRead : Properties.IFileRead string rds; string dateValue; string rdsPlaceholder = "%RDS%"; + string mesEntityPlaceholder = "%MesEntity%"; if (!descriptions.Any() || string.IsNullOrEmpty(descriptions[0].RDS)) rds = logistics.MID; else rds = descriptions[0].RDS; string[] segments = scopeInfo.FileName.Split(new string[] { "DateTime:" }, StringSplitOptions.RemoveEmptyEntries); if (segments.Length == 0) - result = string.Concat(duplicateDirectory, @"\", scopeInfo.FileNameWithoutExtension.Replace(rdsPlaceholder, rds)); + result = string.Concat(duplicateDirectory, @"\", scopeInfo.FileNameWithoutExtension.Replace(rdsPlaceholder, rds).Replace(mesEntityPlaceholder, logistics.MesEntity)); else { segments = segments[1].Split('%'); @@ -284,7 +285,7 @@ public class FileRead : Properties.IFileRead continue; datePlaceholder = string.Concat('%', segment, '%'); } - result = string.Concat(duplicateDirectory, @"\", scopeInfo.FileName.Replace(rdsPlaceholder, rds).Replace(datePlaceholder, dateValue)); + result = string.Concat(duplicateDirectory, @"\", scopeInfo.FileName.Replace(rdsPlaceholder, rds).Replace(mesEntityPlaceholder, logistics.MesEntity).Replace(datePlaceholder, dateValue)); } if (result.Contains('%')) throw new Exception("Placeholder exists!"); diff --git a/Adaptation/_Tests/CreateSelfDescription/Staging/v2.47.5/MET08DDUPSFS6420.cs b/Adaptation/_Tests/CreateSelfDescription/Staging/v2.47.5/MET08DDUPSFS6420.cs index c5b4f91..ea3915c 100644 --- a/Adaptation/_Tests/CreateSelfDescription/Staging/v2.47.5/MET08DDUPSFS6420.cs +++ b/Adaptation/_Tests/CreateSelfDescription/Staging/v2.47.5/MET08DDUPSFS6420.cs @@ -47,9 +47,7 @@ public class MET08DDUPSFS6420 : EAFLoggingUnitTesting EAFLoggingUnitTesting?.Dispose(); } -#if DEBUG [Ignore] -#endif [TestMethod] public void Staging__v2_47_5__MET08DDUPSFS6420__MoveMatchingFiles() { @@ -60,9 +58,7 @@ public class MET08DDUPSFS6420 : EAFLoggingUnitTesting EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit")); } -#if DEBUG [Ignore] -#endif [TestMethod] public void Staging__v2_47_5__MET08DDUPSFS6420__OpenInsightMetrologyViewer() { @@ -73,9 +69,7 @@ public class MET08DDUPSFS6420 : EAFLoggingUnitTesting EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit")); } -#if DEBUG [Ignore] -#endif [TestMethod] public void Staging__v2_47_5__MET08DDUPSFS6420__IQSSi() { @@ -86,9 +80,7 @@ public class MET08DDUPSFS6420 : EAFLoggingUnitTesting EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit")); } -#if DEBUG [Ignore] -#endif [TestMethod] public void Staging__v2_47_5__MET08DDUPSFS6420__OpenInsight() { @@ -99,9 +91,7 @@ public class MET08DDUPSFS6420 : EAFLoggingUnitTesting EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit")); } -#if DEBUG [Ignore] -#endif [TestMethod] public void Staging__v2_47_5__MET08DDUPSFS6420__OpenInsightMetrologyViewerAttachments() { @@ -112,9 +102,7 @@ public class MET08DDUPSFS6420 : EAFLoggingUnitTesting EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit")); } -#if DEBUG [Ignore] -#endif [TestMethod] public void Staging__v2_47_5__MET08DDUPSFS6420__APC() { @@ -125,9 +113,7 @@ public class MET08DDUPSFS6420 : EAFLoggingUnitTesting EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit")); } -#if DEBUG [Ignore] -#endif [TestMethod] public void Staging__v2_47_5__MET08DDUPSFS6420__SPaCe() { @@ -138,9 +124,7 @@ public class MET08DDUPSFS6420 : EAFLoggingUnitTesting EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit")); } -#if DEBUG [Ignore] -#endif [TestMethod] public void Staging__v2_47_5__MET08DDUPSFS6420__Processed() { @@ -151,9 +135,7 @@ public class MET08DDUPSFS6420 : EAFLoggingUnitTesting EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit")); } -#if DEBUG [Ignore] -#endif [TestMethod] public void Staging__v2_47_5__MET08DDUPSFS6420__Archive() { @@ -164,9 +146,7 @@ public class MET08DDUPSFS6420 : EAFLoggingUnitTesting EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit")); } -#if DEBUG [Ignore] -#endif [TestMethod] public void Staging__v2_47_5__MET08DDUPSFS6420__Dummy() { diff --git a/Adaptation/_Tests/CreateSelfDescription/Staging/v2.47.5/TENCOR1.cs b/Adaptation/_Tests/CreateSelfDescription/Staging/v2.47.5/TENCOR1.cs index 882bc59..c70ed94 100644 --- a/Adaptation/_Tests/CreateSelfDescription/Staging/v2.47.5/TENCOR1.cs +++ b/Adaptation/_Tests/CreateSelfDescription/Staging/v2.47.5/TENCOR1.cs @@ -47,9 +47,7 @@ public class TENCOR1 : EAFLoggingUnitTesting EAFLoggingUnitTesting?.Dispose(); } -#if DEBUG [Ignore] -#endif [TestMethod] public void Staging__v2_47_5__TENCOR1__pcl() { diff --git a/Adaptation/_Tests/CreateSelfDescription/Staging/v2.47.5/TENCOR2.cs b/Adaptation/_Tests/CreateSelfDescription/Staging/v2.47.5/TENCOR2.cs index 29d53b8..376ab7b 100644 --- a/Adaptation/_Tests/CreateSelfDescription/Staging/v2.47.5/TENCOR2.cs +++ b/Adaptation/_Tests/CreateSelfDescription/Staging/v2.47.5/TENCOR2.cs @@ -47,9 +47,7 @@ public class TENCOR2 : EAFLoggingUnitTesting EAFLoggingUnitTesting?.Dispose(); } -#if DEBUG [Ignore] -#endif [TestMethod] public void Staging__v2_47_5__TENCOR2__pcl() { diff --git a/Adaptation/_Tests/CreateSelfDescription/Staging/v2.47.5/TENCOR3.cs b/Adaptation/_Tests/CreateSelfDescription/Staging/v2.47.5/TENCOR3.cs index f7bd3ae..d9fc931 100644 --- a/Adaptation/_Tests/CreateSelfDescription/Staging/v2.47.5/TENCOR3.cs +++ b/Adaptation/_Tests/CreateSelfDescription/Staging/v2.47.5/TENCOR3.cs @@ -47,9 +47,7 @@ public class TENCOR3 : EAFLoggingUnitTesting EAFLoggingUnitTesting?.Dispose(); } -#if DEBUG [Ignore] -#endif [TestMethod] public void Staging__v2_47_5__TENCOR3__pcl() { diff --git a/Adaptation/_Tests/CreateSelfDescription/Staging/v2.49.0/MET08DDUPSFS6420.cs b/Adaptation/_Tests/CreateSelfDescription/Staging/v2.49.0/MET08DDUPSFS6420.cs new file mode 100644 index 0000000..2c33185 --- /dev/null +++ b/Adaptation/_Tests/CreateSelfDescription/Staging/v2.49.0/MET08DDUPSFS6420.cs @@ -0,0 +1,180 @@ +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_49_0; + +[TestClass] +public class MET08DDUPSFS6420 : EAFLoggingUnitTesting +{ + +#pragma warning disable CA2254 +#pragma warning disable IDE0060 + + internal static string DummyRoot { get; private set; } + internal static MET08DDUPSFS6420 EAFLoggingUnitTesting { get; private set; } + + static MET08DDUPSFS6420() => DummyRoot = @"\\messv02ecc1.ec.local\EC_Characterization_Si\Dummy"; + + public MET08DDUPSFS6420() : base(DummyRoot, testContext: null, declaringType: null, skipEquipmentDictionary: false) + { + if (EAFLoggingUnitTesting is null) + throw new Exception(); + } + + public MET08DDUPSFS6420(TestContext testContext) : base(DummyRoot, testContext, new StackFrame().GetMethod().DeclaringType, skipEquipmentDictionary: false) + { + } + + [ClassInitialize] + public static void ClassInitialize(TestContext testContext) + { + EAFLoggingUnitTesting ??= new MET08DDUPSFS6420(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() + { + EAFLoggingUnitTesting?.Logger?.LogInformation("Cleanup"); + EAFLoggingUnitTesting?.Dispose(); + } + +#if DEBUG + [Ignore] +#endif + [TestMethod] + public void Staging__v2_49_0__MET08DDUPSFS6420__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 DEBUG + [Ignore] +#endif + [TestMethod] + public void Staging__v2_49_0__MET08DDUPSFS6420__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 DEBUG + [Ignore] +#endif + [TestMethod] + public void Staging__v2_49_0__MET08DDUPSFS6420__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 DEBUG + [Ignore] +#endif + [TestMethod] + public void Staging__v2_49_0__MET08DDUPSFS6420__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 DEBUG + [Ignore] +#endif + [TestMethod] + public void Staging__v2_49_0__MET08DDUPSFS6420__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 DEBUG + [Ignore] +#endif + [TestMethod] + public void Staging__v2_49_0__MET08DDUPSFS6420__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 DEBUG + [Ignore] +#endif + [TestMethod] + public void Staging__v2_49_0__MET08DDUPSFS6420__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 DEBUG + [Ignore] +#endif + [TestMethod] + public void Staging__v2_49_0__MET08DDUPSFS6420__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 DEBUG + [Ignore] +#endif + [TestMethod] + public void Staging__v2_49_0__MET08DDUPSFS6420__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 DEBUG + [Ignore] +#endif + [TestMethod] + public void Staging__v2_49_0__MET08DDUPSFS6420__Dummy() + { + string check = "637400762709163000.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/CreateSelfDescription/Staging/v2.49.0/TENCOR1.cs b/Adaptation/_Tests/CreateSelfDescription/Staging/v2.49.0/TENCOR1.cs new file mode 100644 index 0000000..212bbd0 --- /dev/null +++ b/Adaptation/_Tests/CreateSelfDescription/Staging/v2.49.0/TENCOR1.cs @@ -0,0 +1,63 @@ +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_49_0; + +[TestClass] +public class TENCOR1 : EAFLoggingUnitTesting +{ + +#pragma warning disable CA2254 +#pragma warning disable IDE0060 + + internal static string DummyRoot { get; private set; } + internal static TENCOR1 EAFLoggingUnitTesting { get; private set; } + + static TENCOR1() => DummyRoot = @"\\messv02ecc1.ec.local\EC_Characterization_Si\Dummy"; + + public TENCOR1() : base(DummyRoot, testContext: null, declaringType: null, skipEquipmentDictionary: false) + { + if (EAFLoggingUnitTesting is null) + throw new Exception(); + } + + public TENCOR1(TestContext testContext) : base(DummyRoot, testContext, new StackFrame().GetMethod().DeclaringType, skipEquipmentDictionary: false) + { + } + + [ClassInitialize] + public static void ClassInitialize(TestContext testContext) + { + EAFLoggingUnitTesting ??= new TENCOR1(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() + { + EAFLoggingUnitTesting?.Logger?.LogInformation("Cleanup"); + EAFLoggingUnitTesting?.Dispose(); + } + +#if DEBUG + [Ignore] +#endif + [TestMethod] + public void Staging__v2_49_0__TENCOR1__pcl() + { + string check = "*.pcl"; + 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.49.0/TENCOR2.cs b/Adaptation/_Tests/CreateSelfDescription/Staging/v2.49.0/TENCOR2.cs new file mode 100644 index 0000000..60bf5fc --- /dev/null +++ b/Adaptation/_Tests/CreateSelfDescription/Staging/v2.49.0/TENCOR2.cs @@ -0,0 +1,63 @@ +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_49_0; + +[TestClass] +public class TENCOR2 : EAFLoggingUnitTesting +{ + +#pragma warning disable CA2254 +#pragma warning disable IDE0060 + + internal static string DummyRoot { get; private set; } + internal static TENCOR2 EAFLoggingUnitTesting { get; private set; } + + static TENCOR2() => DummyRoot = @"\\messv02ecc1.ec.local\EC_Characterization_Si\Dummy"; + + public TENCOR2() : base(DummyRoot, testContext: null, declaringType: null, skipEquipmentDictionary: false) + { + if (EAFLoggingUnitTesting is null) + throw new Exception(); + } + + public TENCOR2(TestContext testContext) : base(DummyRoot, testContext, new StackFrame().GetMethod().DeclaringType, skipEquipmentDictionary: false) + { + } + + [ClassInitialize] + public static void ClassInitialize(TestContext testContext) + { + EAFLoggingUnitTesting ??= new TENCOR2(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() + { + EAFLoggingUnitTesting?.Logger?.LogInformation("Cleanup"); + EAFLoggingUnitTesting?.Dispose(); + } + +#if DEBUG + [Ignore] +#endif + [TestMethod] + public void Staging__v2_49_0__TENCOR2__pcl() + { + string check = "*.pcl"; + 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.49.0/TENCOR3.cs b/Adaptation/_Tests/CreateSelfDescription/Staging/v2.49.0/TENCOR3.cs new file mode 100644 index 0000000..7889244 --- /dev/null +++ b/Adaptation/_Tests/CreateSelfDescription/Staging/v2.49.0/TENCOR3.cs @@ -0,0 +1,63 @@ +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_49_0; + +[TestClass] +public class TENCOR3 : EAFLoggingUnitTesting +{ + +#pragma warning disable CA2254 +#pragma warning disable IDE0060 + + internal static string DummyRoot { get; private set; } + internal static TENCOR3 EAFLoggingUnitTesting { get; private set; } + + static TENCOR3() => DummyRoot = @"\\messv02ecc1.ec.local\EC_Characterization_Si\Dummy"; + + public TENCOR3() : base(DummyRoot, testContext: null, declaringType: null, skipEquipmentDictionary: false) + { + if (EAFLoggingUnitTesting is null) + throw new Exception(); + } + + public TENCOR3(TestContext testContext) : base(DummyRoot, testContext, new StackFrame().GetMethod().DeclaringType, skipEquipmentDictionary: false) + { + } + + [ClassInitialize] + public static void ClassInitialize(TestContext testContext) + { + EAFLoggingUnitTesting ??= new TENCOR3(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() + { + EAFLoggingUnitTesting?.Logger?.LogInformation("Cleanup"); + EAFLoggingUnitTesting?.Dispose(); + } + +#if DEBUG + [Ignore] +#endif + [TestMethod] + public void Staging__v2_49_0__TENCOR3__pcl() + { + string check = "*.pcl"; + 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.47.5/MET08DDUPSFS6420.cs b/Adaptation/_Tests/Extract/Staging/v2.47.5/MET08DDUPSFS6420.cs index 573a2ca..82d08b6 100644 --- a/Adaptation/_Tests/Extract/Staging/v2.47.5/MET08DDUPSFS6420.cs +++ b/Adaptation/_Tests/Extract/Staging/v2.47.5/MET08DDUPSFS6420.cs @@ -22,21 +22,15 @@ public class MET08DDUPSFS6420 _MET08DDUPSFS6420 = CreateSelfDescription.Staging.v2_47_5.MET08DDUPSFS6420.EAFLoggingUnitTesting; } -#if DEBUG [Ignore] -#endif [TestMethod] public void Staging__v2_47_5__MET08DDUPSFS6420__MoveMatchingFiles() => _MET08DDUPSFS6420.Staging__v2_47_5__MET08DDUPSFS6420__MoveMatchingFiles(); -#if DEBUG [Ignore] -#endif [TestMethod] public void Staging__v2_47_5__MET08DDUPSFS6420__OpenInsightMetrologyViewer() => _MET08DDUPSFS6420.Staging__v2_47_5__MET08DDUPSFS6420__OpenInsightMetrologyViewer(); -#if DEBUG [Ignore] -#endif [TestMethod] public void Staging__v2_47_5__MET08DDUPSFS6420__OpenInsightMetrologyViewer637810124350899080__Normal() { @@ -50,21 +44,15 @@ public class MET08DDUPSFS6420 _ = Shared.AdaptationTesting.ReExtractCompareUpdatePassDirectory(variables, fileRead, logistics, validatePDSF); } -#if DEBUG [Ignore] -#endif [TestMethod] public void Staging__v2_47_5__MET08DDUPSFS6420__IQSSi() => _MET08DDUPSFS6420.Staging__v2_47_5__MET08DDUPSFS6420__IQSSi(); -#if DEBUG [Ignore] -#endif [TestMethod] public void Staging__v2_47_5__MET08DDUPSFS6420__OpenInsight() => _MET08DDUPSFS6420.Staging__v2_47_5__MET08DDUPSFS6420__OpenInsight(); -#if DEBUG [Ignore] -#endif [TestMethod] public void Staging__v2_47_5__MET08DDUPSFS6420__OpenInsight638052163299572098__IqsSql() { @@ -77,39 +65,27 @@ public class MET08DDUPSFS6420 _ = Shared.AdaptationTesting.ReExtractCompareUpdatePassDirectory(variables, fileRead, logistics); } -#if DEBUG [Ignore] -#endif [TestMethod] public void Staging__v2_47_5__MET08DDUPSFS6420__OpenInsightMetrologyViewerAttachments() => _MET08DDUPSFS6420.Staging__v2_47_5__MET08DDUPSFS6420__OpenInsightMetrologyViewerAttachments(); -#if DEBUG [Ignore] -#endif [TestMethod] public void Staging__v2_47_5__MET08DDUPSFS6420__APC() => _MET08DDUPSFS6420.Staging__v2_47_5__MET08DDUPSFS6420__APC(); -#if DEBUG [Ignore] -#endif [TestMethod] public void Staging__v2_47_5__MET08DDUPSFS6420__SPaCe() => _MET08DDUPSFS6420.Staging__v2_47_5__MET08DDUPSFS6420__SPaCe(); -#if DEBUG [Ignore] -#endif [TestMethod] public void Staging__v2_47_5__MET08DDUPSFS6420__Processed() => _MET08DDUPSFS6420.Staging__v2_47_5__MET08DDUPSFS6420__Processed(); -#if DEBUG [Ignore] -#endif [TestMethod] public void Staging__v2_47_5__MET08DDUPSFS6420__Archive() => _MET08DDUPSFS6420.Staging__v2_47_5__MET08DDUPSFS6420__Archive(); -#if DEBUG [Ignore] -#endif [TestMethod] public void Staging__v2_47_5__MET08DDUPSFS6420__Dummy() => _MET08DDUPSFS6420.Staging__v2_47_5__MET08DDUPSFS6420__Dummy(); diff --git a/Adaptation/_Tests/Extract/Staging/v2.47.5/TENCOR1.cs b/Adaptation/_Tests/Extract/Staging/v2.47.5/TENCOR1.cs index 4c8d35d..727f9fb 100644 --- a/Adaptation/_Tests/Extract/Staging/v2.47.5/TENCOR1.cs +++ b/Adaptation/_Tests/Extract/Staging/v2.47.5/TENCOR1.cs @@ -23,15 +23,11 @@ public class TENCOR1 _TENCOR1 = CreateSelfDescription.Staging.v2_47_5.TENCOR1.EAFLoggingUnitTesting; } -#if DEBUG [Ignore] -#endif [TestMethod] public void Staging__v2_47_5__TENCOR1__pcl() => _TENCOR1.Staging__v2_47_5__TENCOR1__pcl(); -#if DEBUG [Ignore] -#endif [TestMethod] [ExpectedException(typeof(MissingMethodException))] public void Staging__v2_47_5__TENCOR1__pcl637955518212649513__Normal() diff --git a/Adaptation/_Tests/Extract/Staging/v2.47.5/TENCOR2.cs b/Adaptation/_Tests/Extract/Staging/v2.47.5/TENCOR2.cs index bfcc9b5..71c0513 100644 --- a/Adaptation/_Tests/Extract/Staging/v2.47.5/TENCOR2.cs +++ b/Adaptation/_Tests/Extract/Staging/v2.47.5/TENCOR2.cs @@ -23,15 +23,11 @@ public class TENCOR2 _TENCOR2 = CreateSelfDescription.Staging.v2_47_5.TENCOR2.EAFLoggingUnitTesting; } -#if DEBUG [Ignore] -#endif [TestMethod] public void Staging__v2_47_5__TENCOR2__pcl() => _TENCOR2.Staging__v2_47_5__TENCOR2__pcl(); -#if DEBUG [Ignore] -#endif [TestMethod] [ExpectedException(typeof(MissingMethodException))] public void Staging__v2_47_5__TENCOR2__pcl637955534973701250__Normal() diff --git a/Adaptation/_Tests/Extract/Staging/v2.47.5/TENCOR3.cs b/Adaptation/_Tests/Extract/Staging/v2.47.5/TENCOR3.cs index f782fb7..2782d8f 100644 --- a/Adaptation/_Tests/Extract/Staging/v2.47.5/TENCOR3.cs +++ b/Adaptation/_Tests/Extract/Staging/v2.47.5/TENCOR3.cs @@ -23,15 +23,11 @@ public class TENCOR3 _TENCOR3 = CreateSelfDescription.Staging.v2_47_5.TENCOR3.EAFLoggingUnitTesting; } -#if DEBUG [Ignore] -#endif [TestMethod] public void Staging__v2_47_5__TENCOR3__pcl() => _TENCOR3.Staging__v2_47_5__TENCOR3__pcl(); -#if DEBUG [Ignore] -#endif [TestMethod] [ExpectedException(typeof(MissingMethodException))] public void Staging__v2_47_5__TENCOR3__pcl637955520360305921__Normal() diff --git a/Adaptation/_Tests/Extract/Staging/v2.49.0/MET08DDUPSFS6420.cs b/Adaptation/_Tests/Extract/Staging/v2.49.0/MET08DDUPSFS6420.cs new file mode 100644 index 0000000..4bd8d20 --- /dev/null +++ b/Adaptation/_Tests/Extract/Staging/v2.49.0/MET08DDUPSFS6420.cs @@ -0,0 +1,116 @@ +using Adaptation.Shared; +using Adaptation.Shared.Methods; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using System.Diagnostics; +using System.Reflection; + +namespace Adaptation._Tests.Extract.Staging.v2_49_0; + +[TestClass] +public class MET08DDUPSFS6420 +{ + +#pragma warning disable CA2254 +#pragma warning disable IDE0060 + + private static CreateSelfDescription.Staging.v2_49_0.MET08DDUPSFS6420 _MET08DDUPSFS6420; + + [ClassInitialize] + public static void ClassInitialize(TestContext testContext) + { + CreateSelfDescription.Staging.v2_49_0.MET08DDUPSFS6420.ClassInitialize(testContext); + _MET08DDUPSFS6420 = CreateSelfDescription.Staging.v2_49_0.MET08DDUPSFS6420.EAFLoggingUnitTesting; + } + +#if DEBUG + [Ignore] +#endif + [TestMethod] + public void Staging__v2_49_0__MET08DDUPSFS6420__MoveMatchingFiles() => _MET08DDUPSFS6420.Staging__v2_49_0__MET08DDUPSFS6420__MoveMatchingFiles(); + +#if DEBUG + [Ignore] +#endif + [TestMethod] + public void Staging__v2_49_0__MET08DDUPSFS6420__OpenInsightMetrologyViewer() => _MET08DDUPSFS6420.Staging__v2_49_0__MET08DDUPSFS6420__OpenInsightMetrologyViewer(); + +#if DEBUG + [Ignore] +#endif + [TestMethod] + public void Staging__v2_49_0__MET08DDUPSFS6420__OpenInsightMetrologyViewer637810124350899080__Normal() + { + string check = "*.pdsf"; + bool validatePDSF = false; + MethodBase methodBase = new StackFrame().GetMethod(); + _MET08DDUPSFS6420.Staging__v2_49_0__MET08DDUPSFS6420__OpenInsightMetrologyViewer(); + string[] variables = _MET08DDUPSFS6420.AdaptationTesting.GetVariables(methodBase, check, validatePDSF); + IFileRead fileRead = _MET08DDUPSFS6420.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false); + Logistics logistics = new(fileRead); + _ = Shared.AdaptationTesting.ReExtractCompareUpdatePassDirectory(variables, fileRead, logistics, validatePDSF); + } + +#if DEBUG + [Ignore] +#endif + [TestMethod] + public void Staging__v2_49_0__MET08DDUPSFS6420__IQSSi() => _MET08DDUPSFS6420.Staging__v2_49_0__MET08DDUPSFS6420__IQSSi(); + +#if DEBUG + [Ignore] +#endif + [TestMethod] + public void Staging__v2_49_0__MET08DDUPSFS6420__OpenInsight() => _MET08DDUPSFS6420.Staging__v2_49_0__MET08DDUPSFS6420__OpenInsight(); + +#if DEBUG + [Ignore] +#endif + [TestMethod] + public void Staging__v2_49_0__MET08DDUPSFS6420__OpenInsight638052163299572098__IqsSql() + { + string check = "*.pdsf"; + MethodBase methodBase = new StackFrame().GetMethod(); + _MET08DDUPSFS6420.Staging__v2_49_0__MET08DDUPSFS6420__OpenInsight(); + string[] variables = _MET08DDUPSFS6420.AdaptationTesting.GetVariables(methodBase, check, validatePDSF: false); + IFileRead fileRead = _MET08DDUPSFS6420.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false); + Logistics logistics = new(fileRead); + _ = Shared.AdaptationTesting.ReExtractCompareUpdatePassDirectory(variables, fileRead, logistics); + } + +#if DEBUG + [Ignore] +#endif + [TestMethod] + public void Staging__v2_49_0__MET08DDUPSFS6420__OpenInsightMetrologyViewerAttachments() => _MET08DDUPSFS6420.Staging__v2_49_0__MET08DDUPSFS6420__OpenInsightMetrologyViewerAttachments(); + +#if DEBUG + [Ignore] +#endif + [TestMethod] + public void Staging__v2_49_0__MET08DDUPSFS6420__APC() => _MET08DDUPSFS6420.Staging__v2_49_0__MET08DDUPSFS6420__APC(); + +#if DEBUG + [Ignore] +#endif + [TestMethod] + public void Staging__v2_49_0__MET08DDUPSFS6420__SPaCe() => _MET08DDUPSFS6420.Staging__v2_49_0__MET08DDUPSFS6420__SPaCe(); + +#if DEBUG + [Ignore] +#endif + [TestMethod] + public void Staging__v2_49_0__MET08DDUPSFS6420__Processed() => _MET08DDUPSFS6420.Staging__v2_49_0__MET08DDUPSFS6420__Processed(); + +#if DEBUG + [Ignore] +#endif + [TestMethod] + public void Staging__v2_49_0__MET08DDUPSFS6420__Archive() => _MET08DDUPSFS6420.Staging__v2_49_0__MET08DDUPSFS6420__Archive(); + +#if DEBUG + [Ignore] +#endif + [TestMethod] + public void Staging__v2_49_0__MET08DDUPSFS6420__Dummy() => _MET08DDUPSFS6420.Staging__v2_49_0__MET08DDUPSFS6420__Dummy(); + +} \ No newline at end of file diff --git a/Adaptation/_Tests/Extract/Staging/v2.49.0/TENCOR1.cs b/Adaptation/_Tests/Extract/Staging/v2.49.0/TENCOR1.cs new file mode 100644 index 0000000..1224441 --- /dev/null +++ b/Adaptation/_Tests/Extract/Staging/v2.49.0/TENCOR1.cs @@ -0,0 +1,49 @@ +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_49_0; + +[TestClass] +public class TENCOR1 +{ + +#pragma warning disable CA2254 +#pragma warning disable IDE0060 + + private static CreateSelfDescription.Staging.v2_49_0.TENCOR1 _TENCOR1; + + [ClassInitialize] + public static void ClassInitialize(TestContext testContext) + { + CreateSelfDescription.Staging.v2_49_0.TENCOR1.ClassInitialize(testContext); + _TENCOR1 = CreateSelfDescription.Staging.v2_49_0.TENCOR1.EAFLoggingUnitTesting; + } + +#if DEBUG + [Ignore] +#endif + [TestMethod] + public void Staging__v2_49_0__TENCOR1__pcl() => _TENCOR1.Staging__v2_49_0__TENCOR1__pcl(); + +#if DEBUG + [Ignore] +#endif + [TestMethod] + [ExpectedException(typeof(MissingMethodException))] + public void Staging__v2_49_0__TENCOR1__pcl637955518212649513__Normal() + { + string check = "*.pcl"; + bool validatePDSF = false; + _TENCOR1.Staging__v2_49_0__TENCOR1__pcl(); + MethodBase methodBase = new StackFrame().GetMethod(); + string[] variables = _TENCOR1.AdaptationTesting.GetVariables(methodBase, check, validatePDSF); + IFileRead fileRead = _TENCOR1.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false); + Logistics logistics = new(fileRead); + _ = Shared.AdaptationTesting.ReExtractCompareUpdatePassDirectory(variables, fileRead, logistics, validatePDSF); + } + +} \ No newline at end of file diff --git a/Adaptation/_Tests/Extract/Staging/v2.49.0/TENCOR2.cs b/Adaptation/_Tests/Extract/Staging/v2.49.0/TENCOR2.cs new file mode 100644 index 0000000..28c0f56 --- /dev/null +++ b/Adaptation/_Tests/Extract/Staging/v2.49.0/TENCOR2.cs @@ -0,0 +1,49 @@ +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_49_0; + +[TestClass] +public class TENCOR2 +{ + +#pragma warning disable CA2254 +#pragma warning disable IDE0060 + + private static CreateSelfDescription.Staging.v2_49_0.TENCOR2 _TENCOR2; + + [ClassInitialize] + public static void ClassInitialize(TestContext testContext) + { + CreateSelfDescription.Staging.v2_49_0.TENCOR2.ClassInitialize(testContext); + _TENCOR2 = CreateSelfDescription.Staging.v2_49_0.TENCOR2.EAFLoggingUnitTesting; + } + +#if DEBUG + [Ignore] +#endif + [TestMethod] + public void Staging__v2_49_0__TENCOR2__pcl() => _TENCOR2.Staging__v2_49_0__TENCOR2__pcl(); + +#if DEBUG + [Ignore] +#endif + [TestMethod] + [ExpectedException(typeof(MissingMethodException))] + public void Staging__v2_49_0__TENCOR2__pcl637955534973701250__Normal() + { + string check = "*.pcl"; + bool validatePDSF = false; + _TENCOR2.Staging__v2_49_0__TENCOR2__pcl(); + MethodBase methodBase = new StackFrame().GetMethod(); + string[] variables = _TENCOR2.AdaptationTesting.GetVariables(methodBase, check, validatePDSF); + IFileRead fileRead = _TENCOR2.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false); + Logistics logistics = new(fileRead); + _ = Shared.AdaptationTesting.ReExtractCompareUpdatePassDirectory(variables, fileRead, logistics, validatePDSF); + } + +} \ No newline at end of file diff --git a/Adaptation/_Tests/Extract/Staging/v2.49.0/TENCOR3.cs b/Adaptation/_Tests/Extract/Staging/v2.49.0/TENCOR3.cs new file mode 100644 index 0000000..0ec800d --- /dev/null +++ b/Adaptation/_Tests/Extract/Staging/v2.49.0/TENCOR3.cs @@ -0,0 +1,49 @@ +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_49_0; + +[TestClass] +public class TENCOR3 +{ + +#pragma warning disable CA2254 +#pragma warning disable IDE0060 + + private static CreateSelfDescription.Staging.v2_49_0.TENCOR3 _TENCOR3; + + [ClassInitialize] + public static void ClassInitialize(TestContext testContext) + { + CreateSelfDescription.Staging.v2_49_0.TENCOR3.ClassInitialize(testContext); + _TENCOR3 = CreateSelfDescription.Staging.v2_49_0.TENCOR3.EAFLoggingUnitTesting; + } + +#if DEBUG + [Ignore] +#endif + [TestMethod] + public void Staging__v2_49_0__TENCOR3__pcl() => _TENCOR3.Staging__v2_49_0__TENCOR3__pcl(); + +#if DEBUG + [Ignore] +#endif + [TestMethod] + [ExpectedException(typeof(MissingMethodException))] + public void Staging__v2_49_0__TENCOR3__pcl637955520360305921__Normal() + { + string check = "*.pcl"; + bool validatePDSF = false; + _TENCOR3.Staging__v2_49_0__TENCOR3__pcl(); + MethodBase methodBase = new StackFrame().GetMethod(); + string[] variables = _TENCOR3.AdaptationTesting.GetVariables(methodBase, check, validatePDSF); + IFileRead fileRead = _TENCOR3.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false); + Logistics logistics = new(fileRead); + _ = Shared.AdaptationTesting.ReExtractCompareUpdatePassDirectory(variables, fileRead, logistics, validatePDSF); + } + +} \ No newline at end of file diff --git a/Adaptation/_Tests/Shared/AdaptationTesting.cs b/Adaptation/_Tests/Shared/AdaptationTesting.cs index 5741fc3..e55beee 100644 --- a/Adaptation/_Tests/Shared/AdaptationTesting.cs +++ b/Adaptation/_Tests/Shared/AdaptationTesting.cs @@ -984,7 +984,7 @@ public class AdaptationTesting : ISMTP _ = Directory.CreateDirectory(fileConnectorConfigurationTuple.Item2.AlternateTargetFolder); } } - 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); + result = FileHandlers.CellInstanceConnectionName.Get(this, fileParameter, mbn.CellInstanceName, mbn.CellInstanceConnectionName, fileConnectorConfigurationTuple.Item2, equipmentTypeVersionTuple.Item2, parameterizedModelObjectDefinitionTypeTuple.Item2, modelObjectParametersTuple.Item2, equipmentDictionaryVersionTuple.Item2, dummyRuns, staticRuns, useCyclicalForDescription, connectionCount: cellInstanceVersionTuple.Item2.EquipmentConnections.Length); return result; } diff --git a/Adaptation/_Tests/Static/MET08DDUPSFS6420.cs b/Adaptation/_Tests/Static/MET08DDUPSFS6420.cs index daa49d9..7ab97c3 100644 --- a/Adaptation/_Tests/Static/MET08DDUPSFS6420.cs +++ b/Adaptation/_Tests/Static/MET08DDUPSFS6420.cs @@ -53,7 +53,7 @@ public class MET08DDUPSFS6420 : LoggingUnitTesting, IDisposable StringBuilder results = new(); (string cellInstanceName, string cellInstanceVersionName)[] collection = new (string, string)[] { - new("MET08DDUPSFS6420", "v2.47.5"), + new("MET08DDUPSFS6420", "v2.49.0"), }; string staging = "http://mestsa07ec.ec.local:9003/CellInstanceServiceV2"; Shared.PasteSpecialXml.EAF.XML.API.CellInstance.CellInstanceVersion cellInstanceVersion; diff --git a/Adaptation/_Tests/Static/pcl.cs b/Adaptation/_Tests/Static/pcl.cs index fa24ed3..db5b4be 100644 --- a/Adaptation/_Tests/Static/pcl.cs +++ b/Adaptation/_Tests/Static/pcl.cs @@ -135,6 +135,40 @@ public class PCL : LoggingUnitTesting, IDisposable Assert.IsTrue(descriptor.Reactor is "P2"); Assert.IsTrue(string.IsNullOrEmpty(descriptor.Zone)); Assert.IsTrue(string.IsNullOrEmpty(descriptor.Employee)); + Assert.IsTrue(string.IsNullOrEmpty(descriptor.Layer)); + Assert.IsTrue(descriptor.PSN is "RR"); + Assert.IsTrue(string.IsNullOrEmpty(descriptor.RDS)); + Assert.IsTrue(descriptor.Reactor is "P2"); + Assert.IsTrue(string.IsNullOrEmpty(descriptor.Zone)); + Assert.IsTrue(string.IsNullOrEmpty(descriptor.Employee)); + descriptor = FileHandlers.pcl.ProcessData.GetDescriptor("i171308.1.51"); + Assert.IsTrue(string.IsNullOrEmpty(descriptor.Layer)); + Assert.IsTrue(string.IsNullOrEmpty(descriptor.PSN)); + Assert.IsTrue(descriptor.RDS is "i171308.1.51"); + Assert.IsTrue(string.IsNullOrEmpty(descriptor.Reactor)); + Assert.IsTrue(string.IsNullOrEmpty(descriptor.Zone)); + Assert.IsTrue(string.IsNullOrEmpty(descriptor.Employee)); + descriptor = FileHandlers.pcl.ProcessData.GetDescriptor("o171308.1.51"); + Assert.IsTrue(string.IsNullOrEmpty(descriptor.Layer)); + Assert.IsTrue(string.IsNullOrEmpty(descriptor.PSN)); + Assert.IsTrue(descriptor.RDS is "o171308.1.51"); + Assert.IsTrue(string.IsNullOrEmpty(descriptor.Reactor)); + Assert.IsTrue(string.IsNullOrEmpty(descriptor.Zone)); + Assert.IsTrue(string.IsNullOrEmpty(descriptor.Employee)); + descriptor = FileHandlers.pcl.ProcessData.GetDescriptor("O171308.1.51"); + Assert.IsTrue(string.IsNullOrEmpty(descriptor.Layer)); + Assert.IsTrue(string.IsNullOrEmpty(descriptor.PSN)); + Assert.IsTrue(descriptor.RDS is "O171308.1.51"); + Assert.IsTrue(string.IsNullOrEmpty(descriptor.Reactor)); + Assert.IsTrue(string.IsNullOrEmpty(descriptor.Zone)); + Assert.IsTrue(string.IsNullOrEmpty(descriptor.Employee)); + descriptor = FileHandlers.pcl.ProcessData.GetDescriptor("171308.1.51"); + Assert.IsTrue(string.IsNullOrEmpty(descriptor.Layer)); + Assert.IsTrue(string.IsNullOrEmpty(descriptor.PSN)); + Assert.IsTrue(descriptor.RDS is "171308.1.51"); + Assert.IsTrue(string.IsNullOrEmpty(descriptor.Reactor)); + Assert.IsTrue(string.IsNullOrEmpty(descriptor.Zone)); + Assert.IsTrue(string.IsNullOrEmpty(descriptor.Employee)); descriptor = FileHandlers.pcl.ProcessData.GetDescriptor("75-QP1414-SPLIT4"); Assert.IsTrue(!string.IsNullOrEmpty(descriptor.Lot)); Assert.IsTrue(string.IsNullOrEmpty(descriptor.Layer)); @@ -143,6 +177,16 @@ public class PCL : LoggingUnitTesting, IDisposable Assert.IsTrue(descriptor.Reactor is "75"); Assert.IsTrue(string.IsNullOrEmpty(descriptor.Zone)); Assert.IsTrue(string.IsNullOrEmpty(descriptor.Employee)); + descriptor = FileHandlers.pcl.ProcessData.GetDescriptor("p5801"); + Assert.IsTrue(descriptor.Lot == "P5801"); + descriptor = FileHandlers.pcl.ProcessData.GetDescriptor("P5801"); + Assert.IsTrue(descriptor.Lot == "P5801"); + Assert.IsTrue(string.IsNullOrEmpty(descriptor.Layer)); + Assert.IsTrue(string.IsNullOrEmpty(descriptor.PSN)); + Assert.IsTrue(string.IsNullOrEmpty(descriptor.PSN)); + Assert.IsTrue(string.IsNullOrEmpty(descriptor.Reactor)); + Assert.IsTrue(string.IsNullOrEmpty(descriptor.Zone)); + Assert.IsTrue(string.IsNullOrEmpty(descriptor.Employee)); LoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit")); } @@ -154,9 +198,9 @@ public class PCL : LoggingUnitTesting, IDisposable StringBuilder results = new(); (string cellInstanceName, string cellInstanceVersionName)[] collection = new (string, string)[] { - new("TENCOR1", "v2.47.5"), - new("TENCOR2", "v2.47.5"), - new("TENCOR3", "v2.47.5"), + new("TENCOR1", "v2.49.0"), + new("TENCOR2", "v2.49.0"), + new("TENCOR3", "v2.49.0"), }; string staging = "http://mestsa07ec.ec.local:9003/CellInstanceServiceV2"; Shared.PasteSpecialXml.EAF.XML.API.CellInstance.CellInstanceVersion cellInstanceVersion; diff --git a/FileHandlers/FileRead.cs b/FileHandlers/FileRead.cs index 7605403..f49826c 100644 --- a/FileHandlers/FileRead.cs +++ b/FileHandlers/FileRead.cs @@ -197,7 +197,7 @@ public partial class FileRead : FileReaderHandler, ISMTP FileConnectorConfiguration fileConnectorConfiguration = Mapper.Map(Configuration); string parameterizedModelObjectDefinitionType = methodBase.DeclaringType.FullName; IList modelObjectParameters = Mapper.Map(ConfiguredParameters); - _FileRead = CellInstanceConnectionName.Get(this, FileParameter, cellInstanceName, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, _DummyRuns, _StaticRuns, _UseCyclicalForDescription, isEAFHosted: true); + _FileRead = CellInstanceConnectionName.Get(this, FileParameter, cellInstanceName, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, _DummyRuns, _StaticRuns, _UseCyclicalForDescription, connectionCount: null); if (_FileRead.IsEvent) AddParameterRangeAndEvent(); } @@ -338,7 +338,7 @@ public partial class FileRead : FileReaderHandler, ISMTP if (modelObjectParameterDefinitionJsonElement.ValueKind != JsonValueKind.Array) throw new Exception(); IList modelObjectParameters = JsonSerializer.Deserialize>(modelObjectParameterDefinitionJsonElement.ToString(), jsonSerializerOptions); - _FileRead = CellInstanceConnectionName.Get(this, FileParameter, cellInstanceName, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, _DummyRuns, _StaticRuns, _UseCyclicalForDescription, isEAFHosted: false); + _FileRead = CellInstanceConnectionName.Get(this, FileParameter, cellInstanceName, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, _DummyRuns, _StaticRuns, _UseCyclicalForDescription, connectionCount: null); results = _FileRead.ReExtract(); if (results?.Item2 is null) throw new Exception(); diff --git a/MET08DDUPSFS6420.csproj b/MET08DDUPSFS6420.csproj index 1ffee4f..7111e5a 100644 --- a/MET08DDUPSFS6420.csproj +++ b/MET08DDUPSFS6420.csproj @@ -170,7 +170,7 @@ 7.2.4630.5 - 2.47.0 + 2.49.0 1.1.1 diff --git a/Properties/AssemblyInfo.cs b/Properties/AssemblyInfo.cs index f778481..1a1e9b1 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.47.5.0")] -[assembly: AssemblyFileVersion("2.47.5.0")] +[assembly: AssemblyVersion("2.49.0.0")] +[assembly: AssemblyFileVersion("2.49.0.0")]