From cedcc57f12af7fa0274483c7cc994b807c1c6bb7 Mon Sep 17 00:00:00 2001 From: Mike Phares Date: Wed, 22 Mar 2023 10:49:42 -0700 Subject: [PATCH] Nuget bump and QP oversight --- Adaptation/.vscode/launch.json | 2 +- Adaptation/FileHandlers/QS408M/ProcessData.cs | 4 ++-- Adaptation/MET08THFTIRQS408M.Tests.csproj | 4 ++-- Adaptation/_Tests/Static/QS408M.cs | 8 ++++++++ 4 files changed, 13 insertions(+), 5 deletions(-) diff --git a/Adaptation/.vscode/launch.json b/Adaptation/.vscode/launch.json index f5e348e..151344f 100644 --- a/Adaptation/.vscode/launch.json +++ b/Adaptation/.vscode/launch.json @@ -4,7 +4,7 @@ "name": ".NET Core Attach", "type": "coreclr", "request": "attach", - "processId": 24580 + "processId": 12204 } ] } diff --git a/Adaptation/FileHandlers/QS408M/ProcessData.cs b/Adaptation/FileHandlers/QS408M/ProcessData.cs index 561efd7..5bdc609 100644 --- a/Adaptation/FileHandlers/QS408M/ProcessData.cs +++ b/Adaptation/FileHandlers/QS408M/ProcessData.cs @@ -261,7 +261,7 @@ public partial class ProcessData : IProcessData reactor = defaultReactor; else reactor = segments[0]; - if (segments.Length <= 1 || !int.TryParse(segments[1], out int rdsValue) || rdsValue < 99) + if (segments.Length <= 1 || !int.TryParse(segments[1].Replace("QP", string.Empty), out int rdsValue) || rdsValue < 99) rds = defaultRDS; else rds = segments[1]; @@ -359,7 +359,7 @@ public partial class ProcessData : IProcessData if (wafer.Length > 2 && wafer[0] == '1' && (wafer[1] == 'T' || wafer[1] == 't')) wafer = wafer.Substring(2); string[] segments = wafer.Split('-'); - bool hasRDS = Regex.IsMatch(wafer, "[-]?[0-9]{5,}[-]?"); + bool hasRDS = Regex.IsMatch(wafer, "[-]?([QP][0-9]{4,}|[0-9]{5,})[-]?"); (reactor, rds) = GetReactorAndRDS(defaultReactor, defaultRDS, text, wafer, segments, hasRDS); (layer, psn) = GetLayerAndPSN(defaultLayer, defaultPSN, segments, hasRDS); zone = GetZone(segments); diff --git a/Adaptation/MET08THFTIRQS408M.Tests.csproj b/Adaptation/MET08THFTIRQS408M.Tests.csproj index 4a05c63..07cf38d 100644 --- a/Adaptation/MET08THFTIRQS408M.Tests.csproj +++ b/Adaptation/MET08THFTIRQS408M.Tests.csproj @@ -34,7 +34,7 @@ - + NU1701 NU1701 NU1701 @@ -43,7 +43,7 @@ NU1701 NU1701 - + diff --git a/Adaptation/_Tests/Static/QS408M.cs b/Adaptation/_Tests/Static/QS408M.cs index 54d6609..b72a603 100644 --- a/Adaptation/_Tests/Static/QS408M.cs +++ b/Adaptation/_Tests/Static/QS408M.cs @@ -133,6 +133,14 @@ public class QS408M : LoggingUnitTesting, IDisposable Assert.IsTrue(string.IsNullOrEmpty(descriptor.Reactor)); Assert.IsTrue(string.IsNullOrEmpty(descriptor.Zone)); Assert.IsTrue(string.IsNullOrEmpty(descriptor.Employee)); + descriptor = FileHandlers.QS408M.ProcessData.GetDescriptor("75-QP1414-SPLIT4"); + Assert.IsTrue(!string.IsNullOrEmpty(descriptor.Wafer)); + Assert.IsTrue(string.IsNullOrEmpty(descriptor.Layer)); + Assert.IsTrue(descriptor.PSN is "SPLIT4"); + Assert.IsTrue(descriptor.RDS is "QP1414"); + Assert.IsTrue(descriptor.Reactor is "75"); + Assert.IsTrue(string.IsNullOrEmpty(descriptor.Zone)); + Assert.IsTrue(string.IsNullOrEmpty(descriptor.Employee)); LoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit")); }