using Adaptation.FileHandlers.QS408M;

This commit is contained in:
Mike Phares 2025-02-17 12:05:31 -07:00
parent b17afe3305
commit 12949e7444
3 changed files with 30 additions and 30 deletions

View File

@ -9,6 +9,8 @@ internal class Row
public Row(Run run, int i)
{
Index = i;
//
Title = run.Header.Title;
Recipe = run.Header.Recipe;
DateTime = run.Header.DateTime;
@ -30,6 +32,8 @@ internal class Row
Slot = run.Footer.Slot;
}
public int Index { get; }
//
public string Title { get; }
public string Recipe { get; }
public string DateTime { get; }

View File

@ -83,7 +83,7 @@ internal class Run
int columns = 0;
StringBuilder stringBuilder = new();
results.Add($"\"Count\",{jsonElements?.Length}");
results.Add($"\"{nameof(logistics.Sequence)}\",{logistics.Sequence}");
results.Add($"\"{nameof(logistics.Sequence)}\",\"{logistics.Sequence}\"");
results.Add($"\"{nameof(logistics.MesEntity)}\",\"{logistics.MesEntity}\"");
string dateTimeFromSequence = logistics.DateTimeFromSequence.ToString("MM/dd/yyyy hh:mm:ss tt");
for (int i = 0; i < jsonElements?.Length;)

View File

@ -1,4 +1,5 @@
using Adaptation._Tests.Shared;
using Adaptation.FileHandlers.QS408M;
using Microsoft.Extensions.Logging;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using System;
@ -57,136 +58,131 @@ public class QS408M : LoggingUnitTesting, IDisposable
[TestMethod]
public void TestDescriptor()
{
FileHandlers.QS408M.Descriptor descriptor;
Descriptor descriptor;
MethodBase methodBase = new StackFrame().GetMethod();
LoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
descriptor = FileHandlers.QS408M.ProcessData.GetDescriptor(string.Empty);
descriptor = ProcessData.GetDescriptor(string.Empty);
Assert.IsTrue(string.IsNullOrEmpty(descriptor.Reactor));
Assert.IsTrue(string.IsNullOrEmpty(descriptor.RDS));
Assert.IsTrue(string.IsNullOrEmpty(descriptor.PSN));
Assert.IsTrue(string.IsNullOrEmpty(descriptor.Layer));
Assert.IsTrue(string.IsNullOrEmpty(descriptor.Zone));
Assert.IsTrue(string.IsNullOrEmpty(descriptor.Employee));
descriptor = FileHandlers.QS408M.ProcessData.GetDescriptor("12-123456-1234");
descriptor = ProcessData.GetDescriptor("12-123456-1234");
Assert.IsTrue(descriptor.Reactor is "12");
Assert.IsTrue(descriptor.RDS is "123456");
Assert.IsTrue(descriptor.PSN is "1234");
Assert.IsTrue(string.IsNullOrEmpty(descriptor.Layer));
Assert.IsTrue(string.IsNullOrEmpty(descriptor.Zone));
Assert.IsTrue(string.IsNullOrEmpty(descriptor.Employee));
descriptor = FileHandlers.QS408M.ProcessData.GetDescriptor("123456");
descriptor = ProcessData.GetDescriptor("123456");
Assert.IsTrue(string.IsNullOrEmpty(descriptor.Reactor));
Assert.IsTrue(descriptor.RDS is "123456");
Assert.IsTrue(string.IsNullOrEmpty(descriptor.PSN));
Assert.IsTrue(string.IsNullOrEmpty(descriptor.Layer));
Assert.IsTrue(string.IsNullOrEmpty(descriptor.Zone));
Assert.IsTrue(string.IsNullOrEmpty(descriptor.Employee));
descriptor = FileHandlers.QS408M.ProcessData.GetDescriptor("1T123456");
descriptor = ProcessData.GetDescriptor("1T123456");
Assert.IsTrue(string.IsNullOrEmpty(descriptor.Reactor));
Assert.IsTrue(descriptor.RDS is "123456");
Assert.IsTrue(string.IsNullOrEmpty(descriptor.PSN));
descriptor = FileHandlers.QS408M.ProcessData.GetDescriptor("MP");
Assert.IsTrue(string.IsNullOrEmpty(descriptor.Layer));
Assert.IsTrue(string.IsNullOrEmpty(descriptor.Zone));
Assert.IsTrue(string.IsNullOrEmpty(descriptor.Employee));
descriptor = ProcessData.GetDescriptor("MP");
Assert.IsTrue(string.IsNullOrEmpty(descriptor.Reactor));
Assert.IsTrue(string.IsNullOrEmpty(descriptor.RDS));
Assert.IsTrue(string.IsNullOrEmpty(descriptor.PSN));
Assert.IsTrue(descriptor.Employee is "MP");
Assert.IsTrue(string.IsNullOrEmpty(descriptor.Layer));
Assert.IsTrue(string.IsNullOrEmpty(descriptor.Zone));
descriptor = FileHandlers.QS408M.ProcessData.GetDescriptor("12-123456-1234.2-1");
descriptor = ProcessData.GetDescriptor("12-123456-1234.2-1");
Assert.IsTrue(descriptor.Reactor is "12");
Assert.IsTrue(descriptor.RDS is "123456");
Assert.IsTrue(descriptor.PSN is "1234");
Assert.IsTrue(descriptor.Layer is "2");
Assert.IsTrue(descriptor.Zone is "1");
Assert.IsTrue(string.IsNullOrEmpty(descriptor.Employee));
descriptor = FileHandlers.QS408M.ProcessData.GetDescriptor("12-123456-1234.02-1");
descriptor = ProcessData.GetDescriptor("12-123456-1234.02-1");
Assert.IsTrue(descriptor.Reactor is "12");
Assert.IsTrue(descriptor.RDS is "123456");
Assert.IsTrue(descriptor.PSN is "1234");
Assert.IsTrue(descriptor.Layer is "2");
Assert.IsTrue(descriptor.Zone is "1");
Assert.IsTrue(string.IsNullOrEmpty(descriptor.Employee));
descriptor = FileHandlers.QS408M.ProcessData.GetDescriptor("20");
descriptor = ProcessData.GetDescriptor("20");
Assert.IsTrue(descriptor.Reactor is "20");
Assert.IsTrue(string.IsNullOrEmpty(descriptor.RDS));
Assert.IsTrue(string.IsNullOrEmpty(descriptor.PSN));
Assert.IsTrue(string.IsNullOrEmpty(descriptor.Layer));
Assert.IsTrue(string.IsNullOrEmpty(descriptor.Zone));
Assert.IsTrue(string.IsNullOrEmpty(descriptor.Employee));
descriptor = FileHandlers.QS408M.ProcessData.GetDescriptor("20.2");
descriptor = ProcessData.GetDescriptor("20.2");
Assert.IsTrue(descriptor.Reactor is "20");
Assert.IsTrue(string.IsNullOrEmpty(descriptor.RDS));
Assert.IsTrue(string.IsNullOrEmpty(descriptor.PSN));
Assert.IsTrue(descriptor.Layer is "2");
Assert.IsTrue(string.IsNullOrEmpty(descriptor.Zone));
Assert.IsTrue(string.IsNullOrEmpty(descriptor.Employee));
descriptor = FileHandlers.QS408M.ProcessData.GetDescriptor("20.2.1");
descriptor = ProcessData.GetDescriptor("20.2.1");
Assert.IsTrue(descriptor.Layer is "2");
Assert.IsTrue(string.IsNullOrEmpty(descriptor.PSN));
Assert.IsTrue(string.IsNullOrEmpty(descriptor.RDS));
Assert.IsTrue(descriptor.Reactor is "20");
Assert.IsTrue(descriptor.Zone is "1");
Assert.IsTrue(string.IsNullOrEmpty(descriptor.Employee));
descriptor = FileHandlers.QS408M.ProcessData.GetDescriptor("20.1.1");
descriptor = ProcessData.GetDescriptor("20.1.1");
Assert.IsTrue(descriptor.Layer is "1");
Assert.IsTrue(string.IsNullOrEmpty(descriptor.PSN));
Assert.IsTrue(string.IsNullOrEmpty(descriptor.RDS));
Assert.IsTrue(descriptor.Reactor is "20");
Assert.IsTrue(descriptor.Zone is "1");
Assert.IsTrue(string.IsNullOrEmpty(descriptor.Employee));
descriptor = FileHandlers.QS408M.ProcessData.GetDescriptor("P2-LOW-RR");
descriptor = ProcessData.GetDescriptor("P2-LOW-RR");
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));
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.QS408M.ProcessData.GetDescriptor("i171308.1.51");
descriptor = 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.QS408M.ProcessData.GetDescriptor("o171308.1.51");
descriptor = 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.QS408M.ProcessData.GetDescriptor("O171308.1.51");
descriptor = 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.QS408M.ProcessData.GetDescriptor("171308.1.51");
descriptor = 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.QS408M.ProcessData.GetDescriptor("75-QP1414-SPLIT4");
Assert.IsTrue(!string.IsNullOrEmpty(descriptor.Wafer));
descriptor = ProcessData.GetDescriptor("75-QP1414-SPLIT4");
// Assert.IsTrue(!string.IsNullOrEmpty(descriptor.Lot));
Assert.IsTrue(string.IsNullOrEmpty(descriptor.Layer));
Assert.IsTrue(descriptor.PSN is "SPLIT4");
Assert.IsTrue(string.IsNullOrEmpty(descriptor.RDS));
Assert.IsTrue(descriptor.Reactor is "75");
Assert.IsTrue(string.IsNullOrEmpty(descriptor.Zone));
Assert.IsTrue(string.IsNullOrEmpty(descriptor.Employee));
descriptor = FileHandlers.QS408M.ProcessData.GetDescriptor("B48");
Assert.IsTrue(descriptor.Wafer == "B48");
descriptor = FileHandlers.QS408M.ProcessData.GetDescriptor("B48");
Assert.IsTrue(descriptor.Wafer == "B48");
descriptor = ProcessData.GetDescriptor("B48");
// Assert.IsTrue(descriptor.Lot == "B48");
Assert.IsTrue(string.IsNullOrEmpty(descriptor.Layer));
Assert.IsTrue(string.IsNullOrEmpty(descriptor.PSN));
Assert.IsTrue(string.IsNullOrEmpty(descriptor.PSN));