From 4d41e545b31cd6030e14b50896e843a0cae09fb5 Mon Sep 17 00:00:00 2001 From: Mike Phares Date: Mon, 3 Mar 2025 11:42:17 -0700 Subject: [PATCH] ProcessDataStandardFormat run.json descriptions.json Infineon.Mesa.PDF.Text.Stripper 4.8.0.2 MSTEST0037 --- Adaptation/.editorconfig | 1 + .../FileHandlers/TIBCO/Transport/Input.cs | 32 ++-- .../FileHandlers/TIBCO/Transport/Job.cs | 172 +++++++++--------- Adaptation/FileHandlers/txt/ProcessData.cs | 6 +- Adaptation/FileHandlers/txt/Run.cs | 4 +- Adaptation/FileHandlers/txt/Wafer.cs | 2 +- Adaptation/MET08DDUPSP1TBI.Tests.csproj | 2 +- .../Shared/ProcessDataStandardFormat.cs | 9 +- Adaptation/_Tests/Shared/AdaptationTesting.cs | 8 +- Adaptation/_Tests/Static/Job.cs | 150 +++++++++++---- Adaptation/_Tests/Static/MET08DDUPSP1TBI.cs | 2 +- Adaptation/_Tests/Static/txt.cs | 72 ++++---- 12 files changed, 283 insertions(+), 177 deletions(-) diff --git a/Adaptation/.editorconfig b/Adaptation/.editorconfig index d6755a0..b22ed15 100644 --- a/Adaptation/.editorconfig +++ b/Adaptation/.editorconfig @@ -122,6 +122,7 @@ dotnet_diagnostic.IDE0290.severity = none # Use primary constructor [Distance]cs dotnet_diagnostic.IDE0300.severity = none # IDE0300: Collection initialization can be simplified dotnet_diagnostic.IDE0301.severity = none #IDE0301: Collection initialization can be simplified dotnet_diagnostic.IDE0305.severity = none # IDE0305: Collection initialization can be simplified +dotnet_diagnostic.MSTEST0037.severity = error # MSTEST0037: Use proper 'Assert' methods dotnet_diagnostic.SYSLIB1045.severity = none # SYSLIB1045: diagnostics for regex source generation dotnet_naming_rule.abstract_method_should_be_pascal_case.severity = warning dotnet_naming_rule.abstract_method_should_be_pascal_case.style = pascal_case diff --git a/Adaptation/FileHandlers/TIBCO/Transport/Input.cs b/Adaptation/FileHandlers/TIBCO/Transport/Input.cs index b0edbcd..c9ec9f6 100644 --- a/Adaptation/FileHandlers/TIBCO/Transport/Input.cs +++ b/Adaptation/FileHandlers/TIBCO/Transport/Input.cs @@ -1,24 +1,26 @@ namespace Adaptation.FileHandlers.TIBCO.Transport; +#nullable enable + public class Input { - public string Area { get; } - public string EquipmentType { get; } - public string MID { get; } - public string Slot { get; } - public string MesEntity { get; } - public string Recipe { get; } - public string Sequence { get; } + public string? Area { get; } + public string? EquipmentType { get; } + public string? MID { get; } + public string? Slot { get; } + public string? MesEntity { get; } + public string? Recipe { get; } + public string? Sequence { get; } [System.Text.Json.Serialization.JsonConstructor] - public Input(string area, - string equipmentType, - string mid, - string slot, - string mesEntity, - string recipe, - string sequence) + public Input(string? area, + string? equipmentType, + string? mid, + string? slot, + string? mesEntity, + string? recipe, + string? sequence) { Area = area; @@ -30,7 +32,7 @@ public class Input Sequence = sequence; } - internal Input(Input input, string mid) + internal Input(Input input, string? mid) { Area = input.Area; EquipmentType = input.EquipmentType; diff --git a/Adaptation/FileHandlers/TIBCO/Transport/Job.cs b/Adaptation/FileHandlers/TIBCO/Transport/Job.cs index 95dcf0e..ea7587b 100644 --- a/Adaptation/FileHandlers/TIBCO/Transport/Job.cs +++ b/Adaptation/FileHandlers/TIBCO/Transport/Job.cs @@ -174,7 +174,7 @@ public partial class Job private static bool IsInvalid(int? rdsNumber) => rdsNumber is null or < 100000 or > 100000000; - private static (string?, string?) GetReactorAndRDS(string text, string formattedText, string[] segments) + private static (string?, string?) GetReactorAndRDS(string? text, string formattedText, string[] segments) { string? rds; string? reactor; @@ -243,10 +243,13 @@ public partial class Job string? reactor; string? employee; int? reactorNumber; - string[] segments = input.MID.Split(new char[] { '-' }); - // bool hasRDS = Regex.IsMatch(input.MID, "[-]?([QP][0-9]{4,}|[0-9]{5,})[-]?"); - string formattedText = Regex.Replace(input.MID, @"[\\,\/,\:,\*,\?,\"",\<,\>,\|]", "_").Split('\r')[0].Split('\n')[0]; - (reactor, rds) = GetReactorAndRDS(input.MID, formattedText, segments); + string mid = string.IsNullOrEmpty(input.MID) ? string.Empty : input.MID; + if (mid.Length > 2 && mid[0] == '1' && (mid[1] == 'T' || mid[1] == 't')) + mid = mid.Substring(2); + mid = Regex.Replace(mid, @"[\\,\/,\:,\*,\?,\"",\<,\>,\|]", "_").Split('\r')[0].Split('\n')[0]; + string[] segments = mid.Split(new char[] { '-' }); + // bool hasRDS = Regex.IsMatch(mid, "[-]?([QP][0-9]{4,}|[0-9]{5,})[-]?"); + (reactor, rds) = GetReactorAndRDS(input.MID, mid, segments); if (string.IsNullOrEmpty(rds)) rdsNumber = 0; else @@ -381,8 +384,9 @@ public partial class Job WorkOrder workOrder; Task streamTask; Task httpResponseMessageTask; + string mid = string.IsNullOrEmpty(input.MID) ? string.Empty : input.MID; JsonSerializerOptions jsonSerializerOptions = new() { PropertyNameCaseInsensitive = true }; - int? reactor = !int.TryParse(input.MID.Substring(0, 2), out int reactorNumber) ? null : reactorNumber; + int? reactor = mid.Length < 2 || !int.TryParse(mid.Substring(0, 2), out int reactorNumber) ? null : reactorNumber; httpResponseMessageTask = httpClient.GetAsync($"{httpClient.BaseAddress}/reactors/{reactor}"); httpResponseMessageTask.Wait(); if (httpResponseMessageTask.Result.StatusCode != System.Net.HttpStatusCode.OK) @@ -450,7 +454,8 @@ public partial class Job int? rds; long sequence = 0; WorkOrder workOrder; - int? reactor = !int.TryParse(input.MID.Substring(0, 2), out int reactorNumber) ? null : reactorNumber; + string mid = string.IsNullOrEmpty(input.MID) ? string.Empty : input.MID; + int? reactor = mid.Length < 2 || !int.TryParse(mid.Substring(0, 2), out int reactorNumber) ? null : reactorNumber; bool parsed = !string.IsNullOrEmpty(input.Sequence) && long.TryParse(input.Sequence, out sequence); List files; if (!parsed || string.IsNullOrEmpty(input.MID)) @@ -505,80 +510,85 @@ public partial class Job private static string GetCommandText(int? rds, int? workOrderNumber, int? workOrderCassette, int? slot, int? reactor) { // cSpell:disable - StringBuilder result = new(); - _ = result.Append(" select "). - Append(" rr.rds_no "). - Append(" , rr.reactor "). - Append(" , rr.ps_no "). - Append(" , rr.load_lock_side "). - Append(" , rr.reactor_type "). - Append(" , rr.recipe_name "). - Append(" , rr.recipe_no "). - Append(" , rr.spec_type "). - Append(" , ( "). - Append(" select max(wm.zone) "). - Append(" from lsl2sql.dbo.wm_out_slot wm "). - Append(" where wm.wo_no = rr.wo_no "). - Append(" and wm.rds = rr.rds_no "). - Append(" and wm.in_cass_no = ").Append(workOrderCassette is null ? -1 : workOrderCassette.Value).Append(' '). - Append(" and wm.slot_no = ").Append(slot is null ? -1 : slot.Value).Append(' '). - Append(" ) zone "). - Append(" from lsl2sql.dbo.react_run rr "). - Append(" where rr.rds_no = ").Append(rds is null ? -1 : rds.Value).Append(' '). - Append(" union all "). - Append(" select "). - Append(" rr.rds_no "). - Append(" , rr.reactor "). - Append(" , rr.ps_no "). - Append(" , rr.load_lock_side "). - Append(" , rr.reactor_type "). - Append(" , rr.recipe_name "). - Append(" , rr.recipe_no "). - Append(" , rr.spec_type "). - Append(" , ( "). - Append(" select max(wm.zone) "). - Append(" from lsl2sql.dbo.wm_out_slot wm "). - Append(" where wm.wo_no = rr.wo_no "). - Append(" and wm.rds = rr.rds_no "). - Append(" and wm.in_cass_no = ").Append(workOrderCassette is null ? -1 : workOrderCassette.Value).Append(' '). - Append(" and wm.slot_no = ").Append(slot is null ? -1 : slot.Value).Append(' '). - Append(" ) zone "). - Append(" from lsl2sql.dbo.react_run rr "). - Append(" where rr.rds_no = ( "). - Append(" select max(wm.rds) "). - Append(" from lsl2sql.dbo.wm_out_slot wm "). - Append(" where wm.wo_no = ").Append(workOrderNumber is null ? -1 : workOrderNumber.Value).Append(' '). - Append(" and wm.in_cass_no = ").Append(workOrderCassette is null ? -1 : workOrderCassette.Value).Append(' '). - Append(" and wm.slot_no = ").Append(slot is null ? -1 : slot.Value).Append(' '). - Append(" ) "). - Append(" union all "). - Append(" select "). - Append(" rr.rds_no "). - Append(" , rr.reactor "). - Append(" , rr.ps_no "). - Append(" , rr.load_lock_side "). - Append(" , rr.reactor_type "). - Append(" , rr.recipe_name "). - Append(" , rr.recipe_no "). - Append(" , rr.spec_type "). - Append(" , ( "). - Append(" select max(wm.zone) "). - Append(" from lsl2sql.dbo.wm_out_slot wm "). - Append(" where wm.wo_no = rr.wo_no "). - Append(" and wm.rds = rr.rds_no "). - Append(" and wm.in_cass_no = ").Append(workOrderCassette is null ? -1 : workOrderCassette.Value).Append(' '). - Append(" and wm.slot_no = ").Append(slot is null ? -1 : slot.Value).Append(' '). - Append(" ) zone "). - Append(" from lsl2sql.dbo.react_run rr "). - Append(" where rr.rds_no = ( "). - Append(" select max(qa.rds_no) "). - Append(" from lsl2sql.dbo.react_run qa "). - Append(" where qa.load_sig != '' "). - Append(" and qa.load_sig_dtm > '2023-05-01 00:00:00.000' "). - Append(" and qa.reactor = ").Append(reactor is null ? -1 : reactor.Value).Append(' '). - Append(" ) "). - Append(" for json path "); - return result.ToString(); + List results = new(); + int rdsValue = rds is null ? -1 : rds.Value; + int slotValue = slot is null ? -1 : slot.Value; + int reactorValue = reactor is null ? -1 : reactor.Value; + int workOrderNumberValue = workOrderNumber is null ? -1 : workOrderNumber.Value; + int workOrderCassetteValue = workOrderCassette is null ? -1 : workOrderCassette.Value; + results.Add(" select "); + results.Add(" rr.rds_no "); + results.Add(" , rr.reactor "); + results.Add(" , rr.ps_no "); + results.Add(" , rr.load_lock_side "); + results.Add(" , rr.reactor_type "); + results.Add(" , rr.recipe_name "); + results.Add(" , rr.recipe_no "); + results.Add(" , rr.spec_type "); + results.Add(" , ( "); + results.Add(" select max(wm.zone) "); + results.Add(" from lsl2sql.dbo.wm_out_slot wm "); + results.Add(" where wm.wo_no = rr.wo_no "); + results.Add(" and wm.rds = rr.rds_no "); + results.Add($" and wm.in_cass_no = {workOrderCassetteValue}"); + results.Add($" and wm.slot_no = {slotValue}"); + results.Add(" ) zone "); + results.Add(" from lsl2sql.dbo.react_run rr "); + results.Add($" where rr.rds_no = {rdsValue}"); + results.Add(" union all "); + results.Add(" select "); + results.Add(" rr.rds_no "); + results.Add(" , rr.reactor "); + results.Add(" , rr.ps_no "); + results.Add(" , rr.load_lock_side "); + results.Add(" , rr.reactor_type "); + results.Add(" , rr.recipe_name "); + results.Add(" , rr.recipe_no "); + results.Add(" , rr.spec_type "); + results.Add(" , ( "); + results.Add(" select max(wm.zone) "); + results.Add(" from lsl2sql.dbo.wm_out_slot wm "); + results.Add(" where wm.wo_no = rr.wo_no "); + results.Add(" and wm.rds = rr.rds_no "); + results.Add($" and wm.in_cass_no = {workOrderCassetteValue}"); + results.Add($" and wm.slot_no = {slotValue}"); + results.Add(" ) zone "); + results.Add(" from lsl2sql.dbo.react_run rr "); + results.Add(" where rr.rds_no = ( "); + results.Add(" select max(wm.rds) "); + results.Add(" from lsl2sql.dbo.wm_out_slot wm "); + results.Add($" where wm.wo_no = {workOrderNumberValue}"); + results.Add($" and wm.in_cass_no = {workOrderCassetteValue}"); + results.Add($" and wm.slot_no = {slotValue}"); + results.Add(" ) "); + results.Add(" union all "); + results.Add(" select "); + results.Add(" rr.rds_no "); + results.Add(" , rr.reactor "); + results.Add(" , rr.ps_no "); + results.Add(" , rr.load_lock_side "); + results.Add(" , rr.reactor_type "); + results.Add(" , rr.recipe_name "); + results.Add(" , rr.recipe_no "); + results.Add(" , rr.spec_type "); + results.Add(" , ( "); + results.Add(" select max(wm.zone) "); + results.Add(" from lsl2sql.dbo.wm_out_slot wm "); + results.Add(" where wm.wo_no = rr.wo_no "); + results.Add(" and wm.rds = rr.rds_no "); + results.Add($" and wm.in_cass_no = {workOrderCassetteValue}"); + results.Add($" and wm.slot_no = {slotValue}"); + results.Add(" ) zone "); + results.Add(" from lsl2sql.dbo.react_run rr "); + results.Add(" where rr.rds_no = ( "); + results.Add(" select max(qa.rds_no) "); + results.Add(" from lsl2sql.dbo.react_run qa "); + results.Add(" where qa.load_sig != '' "); + results.Add(" and qa.load_sig_dtm > '2023-05-01 00:00:00.000' "); + results.Add($" and qa.reactor = {reactorValue}"); + results.Add(" ) "); + results.Add(" for json path "); + return string.Join(Environment.NewLine, results); } // cSpell:restore private static CommonB Get(string lsl2SQLConnectionString, string layer, string psn, int? reactorNumber, int? slotNumber, int? workOrderNumber, int? workOrderCassette, string zone) diff --git a/Adaptation/FileHandlers/txt/ProcessData.cs b/Adaptation/FileHandlers/txt/ProcessData.cs index 8b1bdd4..8d67665 100644 --- a/Adaptation/FileHandlers/txt/ProcessData.cs +++ b/Adaptation/FileHandlers/txt/ProcessData.cs @@ -308,9 +308,13 @@ public class ProcessData : IProcessData if (description.Test != (int)tests[i]) throw new Exception(); } + FileInfo fileInfo = new($"{logistics.ReportFullPath}.descriptions.json"); List fileReadDescriptions = (from l in descriptions select (Description)l).ToList(); string json = JsonSerializer.Serialize(fileReadDescriptions, fileReadDescriptions.GetType()); - JsonElement[] jsonElements = JsonSerializer.Deserialize(json); + File.WriteAllText(fileInfo.FullName, json); + File.SetLastWriteTime(fileInfo.FullName, logistics.DateTimeFromSequence); + fileInfoCollection.Add(fileInfo); + JsonElement[] jsonElements = JsonSerializer.Deserialize(json) ?? throw new Exception(); results = new Tuple>(logistics.Logistics1[0], tests.ToArray(), jsonElements, fileInfoCollection); return results; } diff --git a/Adaptation/FileHandlers/txt/Run.cs b/Adaptation/FileHandlers/txt/Run.cs index 9eb2ea7..5762d21 100644 --- a/Adaptation/FileHandlers/txt/Run.cs +++ b/Adaptation/FileHandlers/txt/Run.cs @@ -27,7 +27,7 @@ internal class Run private static void WriteJson(Logistics logistics, List fileInfoCollection, Run result) { - FileInfo fileInfo = new($"{logistics.ReportFullPath}.json"); + FileInfo fileInfo = new($"{logistics.ReportFullPath}.run.json"); string json = JsonSerializer.Serialize(result, RunSourceGenerationContext.Default.Run); File.WriteAllText(fileInfo.FullName, json); File.SetLastWriteTime(fileInfo.FullName, logistics.DateTimeFromSequence); @@ -105,7 +105,7 @@ internal class Run List dnnTotals = new(); Header header = Header.Get(constant, i, text); Summary summary = Summary.Get(constant, i, text, dcnTotals, dwnTotals, dnnTotals); - ReadOnlyCollection wafers = Wafer.Get(constant, dcnTotals, dwnTotals, dnnTotals); + ReadOnlyCollection wafers = Wafer.Get(dcnTotals, dwnTotals, dnnTotals); if (wafers.Count == 0) result = null; else diff --git a/Adaptation/FileHandlers/txt/Wafer.cs b/Adaptation/FileHandlers/txt/Wafer.cs index 605b6e1..95df24e 100644 --- a/Adaptation/FileHandlers/txt/Wafer.cs +++ b/Adaptation/FileHandlers/txt/Wafer.cs @@ -203,7 +203,7 @@ public class Wafer public string DnnBin7 { get; } public string DnnBin8 { get; } - internal static ReadOnlyCollection Get(Constant constant, List dcnTotals, List dwnTotals, List dnnTotals) + internal static ReadOnlyCollection Get(List dcnTotals, List dwnTotals, List dnnTotals) { List results = new(); Wafer wafer; diff --git a/Adaptation/MET08DDUPSP1TBI.Tests.csproj b/Adaptation/MET08DDUPSP1TBI.Tests.csproj index dba5740..88f8d5a 100644 --- a/Adaptation/MET08DDUPSP1TBI.Tests.csproj +++ b/Adaptation/MET08DDUPSP1TBI.Tests.csproj @@ -69,7 +69,7 @@ - NU1701 + NU1701 diff --git a/Adaptation/Shared/ProcessDataStandardFormat.cs b/Adaptation/Shared/ProcessDataStandardFormat.cs index 136ccae..b2ca7b6 100644 --- a/Adaptation/Shared/ProcessDataStandardFormat.cs +++ b/Adaptation/Shared/ProcessDataStandardFormat.cs @@ -152,9 +152,11 @@ public class ProcessDataStandardFormat { string value; string[] segments; + List lines = new(); StringBuilder stringBuilder = new(); foreach (string bodyLine in bodyLines) { + _ = stringBuilder.Clear(); _ = stringBuilder.Append('{'); segments = bodyLine.Trim().Split('\t'); if (!lookForNumbers) @@ -179,10 +181,11 @@ public class ProcessDataStandardFormat } } _ = stringBuilder.Remove(stringBuilder.Length - 1, 1); - _ = stringBuilder.AppendLine("},"); + _ = stringBuilder.AppendLine("}"); + lines.Add(stringBuilder.ToString()); } - _ = stringBuilder.Remove(stringBuilder.Length - 3, 3); - results = JsonSerializer.Deserialize(string.Concat("[", stringBuilder, "]")); + string json = $"[{string.Join(",", lines)}]"; + results = JsonSerializer.Deserialize(json); } return results; } diff --git a/Adaptation/_Tests/Shared/AdaptationTesting.cs b/Adaptation/_Tests/Shared/AdaptationTesting.cs index 8a341d4..66cf18e 100644 --- a/Adaptation/_Tests/Shared/AdaptationTesting.cs +++ b/Adaptation/_Tests/Shared/AdaptationTesting.cs @@ -1111,7 +1111,7 @@ public class AdaptationTesting : ISMTP pdsfFiles = Directory.GetFiles(searchDirectory, searchPattern, SearchOption.TopDirectoryOnly); if (pdsfFiles.Length == 0) _ = Process.Start("explorer.exe", searchDirectory); - Assert.IsTrue(pdsfFiles.Length != 0, "GetFiles check"); + Assert.AreNotEqual(0, pdsfFiles.Length, "GetFiles check"); results = GetLogisticsColumnsAndBody(pdsfFiles[0]); } Assert.IsFalse(string.IsNullOrEmpty(results.Item1)); @@ -1259,13 +1259,13 @@ public class AdaptationTesting : ISMTP Tuple pdsf = GetLogisticsColumnsAndBody(variables[2], variables[4]); Tuple pdsfNew = GetLogisticsColumnsAndBody(fileRead, logistics, extractResult, pdsf); CompareSave(variables[5], pdsf, pdsfNew); - Assert.IsTrue(pdsf.Item1 == pdsfNew.Item1, "Item1 check!"); + Assert.AreEqual(pdsfNew.Item1, pdsf.Item1, "Item1 check!"); string[] json = GetItem2(pdsf, pdsfNew); CompareSaveJSON(variables[5], json); - Assert.IsTrue(json[0] == json[1], "Item2 check!"); + Assert.AreEqual(json[1], json[0], "Item2 check!"); string[] join = GetItem3(pdsf, pdsfNew); CompareSaveTSV(variables[5], join); - Assert.IsTrue(join[0] == join[1], "Item3 (Join) check!"); + Assert.AreEqual(join[1], join[0], "Item3 (Join) check!"); } UpdatePassDirectory(variables[2]); } diff --git a/Adaptation/_Tests/Static/Job.cs b/Adaptation/_Tests/Static/Job.cs index 29f6090..a9b552a 100644 --- a/Adaptation/_Tests/Static/Job.cs +++ b/Adaptation/_Tests/Static/Job.cs @@ -44,7 +44,9 @@ public class Job : LoggingUnitTesting, IDisposable catch (Exception) { } } +#if !Always [Ignore] +#endif [TestMethod] public void TestJobA() { @@ -58,40 +60,42 @@ public class Job : LoggingUnitTesting, IDisposable HttpClient httpClient = new() { BaseAddress = new(FileHandlers.TIBCO.FileRead.OpenInsightApplicationProgrammingInterface) }; mid = "{\"Area\": \"Si\", \"EquipmentType\": \"MET08RESIMAPCDE\", \"MesEntity\": \"CDE4\", \"Sequence\": \"123456789\", \"MID\": \"12-123456-1234\", \"Recipe\": \"Recipe\"}"; job = new(lsl2SQLConnectionString, metrologyFileShare, barcodeHostFileShare, httpClient, mid); - Assert.IsTrue(!string.IsNullOrEmpty(job.ProcessType)); // == "21"); - Assert.IsTrue(job.LotName == "123456"); - Assert.IsTrue(!string.IsNullOrEmpty(job.ProductName)); // == "4609"); + Assert.IsFalse(string.IsNullOrEmpty(job.ProcessType)); // == "21"); + Assert.AreEqual("123456", job.LotName); + Assert.IsFalse(string.IsNullOrEmpty(job.ProductName)); // == "4609"); mid = "{\"Area\": \"Si\", \"EquipmentType\": \"MET08RESIMAPCDE\", \"MesEntity\": \"CDE4\", \"Sequence\": \"123456789\", \"MID\": \"12-1234567-1234\", \"Recipe\": \"Recipe\"}"; job = new(lsl2SQLConnectionString, metrologyFileShare, barcodeHostFileShare, httpClient, mid); - Assert.IsTrue(!string.IsNullOrEmpty(job.ProcessType)); // == "21"); - Assert.IsTrue(job.LotName == "1234567"); - Assert.IsTrue(!string.IsNullOrEmpty(job.ProductName)); // == "4609"); + Assert.IsFalse(string.IsNullOrEmpty(job.ProcessType)); // == "21"); + Assert.AreEqual("1234567", job.LotName); + Assert.IsFalse(string.IsNullOrEmpty(job.ProductName)); // == "4609"); mid = "{\"Area\": \"Si\", \"EquipmentType\": \"MET08RESIMAPCDE\", \"MesEntity\": \"CDE4\", \"Sequence\": \"123456789\", \"MID\": \"-544481-\", \"Recipe\": \"Recipe\"}"; job = new(lsl2SQLConnectionString, metrologyFileShare, barcodeHostFileShare, httpClient, mid); - Assert.IsTrue(!string.IsNullOrEmpty(job.ProcessType)); // == "51"); - Assert.IsTrue(job.LotName == "544481"); - Assert.IsTrue(!string.IsNullOrEmpty(job.ProductName)); // == "5158"); + Assert.IsFalse(string.IsNullOrEmpty(job.ProcessType)); // == "51"); + Assert.AreEqual("544481", job.LotName); + Assert.IsFalse(string.IsNullOrEmpty(job.ProductName)); // == "5158"); mid = "{\"Area\": \"Si\", \"EquipmentType\": \"MET08RESIMAPCDE\", \"MesEntity\": \"CDE4\", \"Sequence\": \"123456789\", \"MID\": \"00-544481-0000\", \"Recipe\": \"Recipe\"}"; job = new(lsl2SQLConnectionString, metrologyFileShare, barcodeHostFileShare, httpClient, mid); - Assert.IsTrue(!string.IsNullOrEmpty(job.ProcessType)); // == "51"); - Assert.IsTrue(job.LotName == "544481"); - Assert.IsTrue(!string.IsNullOrEmpty(job.ProductName)); // == "5158"); + Assert.IsFalse(string.IsNullOrEmpty(job.ProcessType)); // == "51"); + Assert.AreEqual("544481", job.LotName); + Assert.IsFalse(string.IsNullOrEmpty(job.ProductName)); // == "5158"); mid = "{\"Area\": \"Si\", \"EquipmentType\": \"MET08RESIMAPCDE\", \"MesEntity\": \"CDE4\", \"Sequence\": \"123456789\", \"MID\": \"00-o171308.1.51-0000\", \"Recipe\": \"Recipe\", \"Slot\": \"11\"}"; job = new(lsl2SQLConnectionString, metrologyFileShare, barcodeHostFileShare, httpClient, mid); - Assert.IsTrue(!string.IsNullOrEmpty(job.ProcessType)); // == "54"); - Assert.IsTrue(!string.IsNullOrEmpty(job.LotName)); // == "547000"); - Assert.IsTrue(!string.IsNullOrEmpty(job.ProductName)); // == "4445"); + Assert.IsFalse(string.IsNullOrEmpty(job.ProcessType)); // == "54"); + Assert.IsFalse(string.IsNullOrEmpty(job.LotName)); // == "547000"); + Assert.IsFalse(string.IsNullOrEmpty(job.ProductName)); // == "4445"); LoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit")); mid = "{\"Area\": \"Si\", \"EquipmentType\": \"MET08RESIMAPCDE\", \"MesEntity\": \"CDE5\", \"Sequence\": \"638163023363575829\", \"MID\": \"B48\", \"Recipe\": \"lsl_6in \"}"; job = new(lsl2SQLConnectionString, metrologyFileShare, barcodeHostFileShare, httpClient, mid); - Assert.IsTrue(!string.IsNullOrEmpty(job.ProcessType)); // == "54"); - Assert.IsTrue(!string.IsNullOrEmpty(job.LotName)); // == "547000"); - Assert.IsTrue(!string.IsNullOrEmpty(job.ProductName)); // == "4445"); + Assert.IsFalse(string.IsNullOrEmpty(job.ProcessType)); // == "54"); + Assert.IsFalse(string.IsNullOrEmpty(job.LotName)); // == "547000"); + Assert.IsFalse(string.IsNullOrEmpty(job.ProductName)); // == "4445"); LoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit")); NonThrowTryCatch(); } +#if !Always [Ignore] +#endif [TestMethod] public void TestJobAA() { @@ -105,14 +109,16 @@ public class Job : LoggingUnitTesting, IDisposable HttpClient httpClient = new() { BaseAddress = new(FileHandlers.TIBCO.FileRead.OpenInsightApplicationProgrammingInterface) }; mid = "{\"Area\": \"Si\", \"EquipmentType\": \"MET08THFTIRQS408M\", \"MesEntity\": \"BIORAD2\", \"Sequence\": \"123456789\", \"MID\": \"37--\", \"Recipe\": \"Recipe\"}"; job = new(lsl2SQLConnectionString, metrologyFileShare, barcodeHostFileShare, httpClient, mid); - Assert.IsTrue(job.ProcessType == "37"); - Assert.IsTrue(!string.IsNullOrEmpty(job.LotName)); // == "549918"); - Assert.IsTrue(!string.IsNullOrEmpty(job.ProductName)); // == "5101"); + Assert.AreEqual("37", job.ProcessType); + Assert.IsFalse(string.IsNullOrEmpty(job.LotName)); // == "549918"); + Assert.IsFalse(string.IsNullOrEmpty(job.ProductName)); // == "5101"); LoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit")); NonThrowTryCatch(); } +#if !Always [Ignore] +#endif [TestMethod] public void TestJobB() { @@ -125,14 +131,16 @@ public class Job : LoggingUnitTesting, IDisposable HttpClient httpClient = new() { BaseAddress = new(FileHandlers.TIBCO.FileRead.OpenInsightApplicationProgrammingInterface) }; string mid = "{\"Area\": \"Si\", \"EquipmentType\": \"MET08RESIMAPCDE\", \"MesEntity\": \"CDE4\", \"Sequence\": \"123456789\", \"MID\": \"P1234\", \"Recipe\": \"Recipe\"}"; job = new(lsl2SQLConnectionString, metrologyFileShare, barcodeHostFileShare, httpClient, mid); - Assert.IsTrue(!string.IsNullOrEmpty(job.ProcessType)); - Assert.IsTrue(!string.IsNullOrEmpty(job.LotName)); - Assert.IsTrue(!string.IsNullOrEmpty(job.ProductName)); + Assert.IsFalse(string.IsNullOrEmpty(job.ProcessType)); + Assert.IsFalse(string.IsNullOrEmpty(job.LotName)); + Assert.IsFalse(string.IsNullOrEmpty(job.ProductName)); LoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit")); NonThrowTryCatch(); } +#if !Always [Ignore] +#endif [TestMethod] public void TestJobC() { @@ -145,16 +153,42 @@ public class Job : LoggingUnitTesting, IDisposable HttpClient httpClient = new() { BaseAddress = new(FileHandlers.TIBCO.FileRead.OpenInsightApplicationProgrammingInterface) }; string mid = "{\"Area\": \"Si\", \"EquipmentType\": \"MET08RESIMAPCDE\", \"MesEntity\": \"BIORAD3\", \"Sequence\": \"638234699589174855\", \"MID\": \"33--\", \"Recipe\": \"Recipe\"}"; job = new(lsl2SQLConnectionString, metrologyFileShare, barcodeHostFileShare, httpClient, mid); - Assert.IsTrue(!string.IsNullOrEmpty(job.ProcessType)); - Assert.IsTrue(!string.IsNullOrEmpty(job.LotName)); - Assert.IsTrue(!string.IsNullOrEmpty(job.ProductName)); + Assert.IsFalse(string.IsNullOrEmpty(job.ProcessType)); + Assert.IsFalse(string.IsNullOrEmpty(job.LotName)); + Assert.IsFalse(string.IsNullOrEmpty(job.ProductName)); LoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit")); NonThrowTryCatch(); } +#if !Always [Ignore] +#endif [TestMethod] public void TestJobD() + { + FileHandlers.TIBCO.Transport.Job job; + MethodBase methodBase = new StackFrame().GetMethod(); + string metrologyFileShare = + FileHandlers.TIBCO.FileRead.MetrologyFileShare; + string barcodeHostFileShare = FileHandlers.TIBCO.FileRead.BarcodeHostFileShare; + string lsl2SQLConnectionString = FileHandlers.TIBCO.FileRead.LSL2SQLConnectionString; + LoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration")); + HttpClient httpClient = new() { BaseAddress = new(FileHandlers.TIBCO.FileRead.OpenInsightApplicationProgrammingInterface) }; + string mid = "{\"Area\": \"Si\", \"EquipmentType\": \"DEP08CEPIEPSILON\", \"MesEntity\": \"R32\", \"Sequence\": \"\", \"MID\": \"32--\", \"Recipe\": \"Recipe\"}"; + job = new(lsl2SQLConnectionString, metrologyFileShare, barcodeHostFileShare, httpClient, mid); + Assert.IsFalse(string.IsNullOrEmpty(job.ProcessType)); + Assert.IsFalse(string.IsNullOrEmpty(job.LotName)); + Assert.IsFalse(string.IsNullOrEmpty(job.ProductName)); + Assert.IsFalse(string.IsNullOrEmpty(job.Equipment)); + LoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit")); + NonThrowTryCatch(); + } + +#if !Always + [Ignore] +#endif + [TestMethod] + public void TestJobE() { FileHandlers.TIBCO.Transport.Job job; MethodBase methodBase = new StackFrame().GetMethod(); @@ -163,12 +197,64 @@ public class Job : LoggingUnitTesting, IDisposable string lsl2SQLConnectionString = FileHandlers.TIBCO.FileRead.LSL2SQLConnectionString; LoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration")); HttpClient httpClient = new() { BaseAddress = new(FileHandlers.TIBCO.FileRead.OpenInsightApplicationProgrammingInterface) }; - string mid = "{\"Area\": \"Si\", \"EquipmentType\": \"DEP08CEPIEPSILON\", \"MesEntity\": \"R32\", \"Sequence\": \"\", \"MID\": \"32--\", \"Recipe\": \"Recipe\"}"; + string mid = """ + {"Area": "Si", "EquipmentType": "MET08RESIMAPCDE", "MesEntity": "CDE5", "Sequence": "638756365880000000", "MID": "38-660275-5095.1", "Recipe": "IRC6mm"} + """; job = new(lsl2SQLConnectionString, metrologyFileShare, barcodeHostFileShare, httpClient, mid); - Assert.IsTrue(!string.IsNullOrEmpty(job.ProcessType)); - Assert.IsTrue(!string.IsNullOrEmpty(job.LotName)); - Assert.IsTrue(!string.IsNullOrEmpty(job.ProductName)); - Assert.IsTrue(!string.IsNullOrEmpty(job.Equipment)); + Assert.IsFalse(string.IsNullOrEmpty(job.ProcessType)); + Assert.IsFalse(string.IsNullOrEmpty(job.LotName)); + Assert.IsFalse(string.IsNullOrEmpty(job.ProductName)); + Assert.IsFalse(string.IsNullOrEmpty(job.Equipment)); + LoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit")); + NonThrowTryCatch(); + } + +#if !Always + [Ignore] +#endif + [TestMethod] + public void TestJobF() + { + FileHandlers.TIBCO.Transport.Job job; + MethodBase methodBase = new StackFrame().GetMethod(); + string metrologyFileShare = FileHandlers.TIBCO.FileRead.MetrologyFileShare; + string barcodeHostFileShare = FileHandlers.TIBCO.FileRead.BarcodeHostFileShare; + string lsl2SQLConnectionString = FileHandlers.TIBCO.FileRead.LSL2SQLConnectionString; + LoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration")); + HttpClient httpClient = new() { BaseAddress = new(FileHandlers.TIBCO.FileRead.OpenInsightApplicationProgrammingInterface) }; + string mid = """ + {"Area": "Si", "EquipmentType": "MET08THFTIRQS408M", "MesEntity": "BIORAD2", "Sequence": "638757112479659597", "MID": "173308.1.5", "Recipe": "6inTHICK"} + """; + job = new(lsl2SQLConnectionString, metrologyFileShare, barcodeHostFileShare, httpClient, mid); + Assert.IsFalse(string.IsNullOrEmpty(job.ProcessType)); + Assert.IsFalse(string.IsNullOrEmpty(job.LotName)); + Assert.IsFalse(string.IsNullOrEmpty(job.ProductName)); + Assert.IsFalse(string.IsNullOrEmpty(job.Equipment)); + LoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit")); + NonThrowTryCatch(); + } + +#if !Always + [Ignore] +#endif + [TestMethod] + public void TestJobG() + { + FileHandlers.TIBCO.Transport.Job job; + MethodBase methodBase = new StackFrame().GetMethod(); + string metrologyFileShare = FileHandlers.TIBCO.FileRead.MetrologyFileShare; + string barcodeHostFileShare = FileHandlers.TIBCO.FileRead.BarcodeHostFileShare; + string lsl2SQLConnectionString = FileHandlers.TIBCO.FileRead.LSL2SQLConnectionString; + LoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration")); + HttpClient httpClient = new() { BaseAddress = new(FileHandlers.TIBCO.FileRead.OpenInsightApplicationProgrammingInterface) }; + string mid = """ + {"Area": "Si", "EquipmentType": "MET08DDUPSFS6420", "MesEntity": "TENCOR1", "Sequence": "638765945581765554", "MID": "1T661282", "Recipe": "8IN_THIN ROTR"} + """; + job = new(lsl2SQLConnectionString, metrologyFileShare, barcodeHostFileShare, httpClient, mid); + Assert.IsFalse(string.IsNullOrEmpty(job.ProcessType)); + Assert.IsFalse(string.IsNullOrEmpty(job.LotName)); + Assert.IsFalse(string.IsNullOrEmpty(job.ProductName)); + Assert.IsFalse(string.IsNullOrEmpty(job.Equipment)); LoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit")); NonThrowTryCatch(); } diff --git a/Adaptation/_Tests/Static/MET08DDUPSP1TBI.cs b/Adaptation/_Tests/Static/MET08DDUPSP1TBI.cs index cf5217c..5f82216 100644 --- a/Adaptation/_Tests/Static/MET08DDUPSP1TBI.cs +++ b/Adaptation/_Tests/Static/MET08DDUPSP1TBI.cs @@ -51,7 +51,7 @@ public class MET08DDUPSP1TBI : LoggingUnitTesting, IDisposable public void TestDateTime() { DateTime dateTime = DateTime.Now; - Assert.IsTrue(dateTime.ToString("M/d/yyyy h:mm:ss tt") == dateTime.ToString()); + Assert.AreEqual(dateTime.ToString(), dateTime.ToString("M/d/yyyy h:mm:ss tt")); } #if DEBUG diff --git a/Adaptation/_Tests/Static/txt.cs b/Adaptation/_Tests/Static/txt.cs index e7ad3ce..f413cca 100644 --- a/Adaptation/_Tests/Static/txt.cs +++ b/Adaptation/_Tests/Static/txt.cs @@ -52,7 +52,7 @@ public class TXT : LoggingUnitTesting, IDisposable public void TestDateTime() { DateTime dateTime = DateTime.Now; - Assert.IsTrue(dateTime.ToString("M/d/yyyy h:mm:ss tt") == dateTime.ToString()); + Assert.AreEqual(dateTime.ToString(), dateTime.ToString("M/d/yyyy h:mm:ss tt")); } [TestMethod] @@ -69,22 +69,22 @@ public class TXT : LoggingUnitTesting, IDisposable Assert.IsTrue(string.IsNullOrEmpty(descriptor.Zone)); Assert.IsTrue(string.IsNullOrEmpty(descriptor.Employee)); 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.AreEqual("12", descriptor.Reactor); + Assert.AreEqual("123456", descriptor.RDS); + Assert.AreEqual("1234", descriptor.PSN); Assert.IsTrue(string.IsNullOrEmpty(descriptor.Layer)); Assert.IsTrue(string.IsNullOrEmpty(descriptor.Zone)); Assert.IsTrue(string.IsNullOrEmpty(descriptor.Employee)); descriptor = ProcessData.GetDescriptor("123456"); Assert.IsTrue(string.IsNullOrEmpty(descriptor.Reactor)); - Assert.IsTrue(descriptor.RDS is "123456"); + Assert.AreEqual("123456", 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 = ProcessData.GetDescriptor("1T123456"); Assert.IsTrue(string.IsNullOrEmpty(descriptor.Reactor)); - Assert.IsTrue(descriptor.RDS is "123456"); + Assert.AreEqual("123456", descriptor.RDS); Assert.IsTrue(string.IsNullOrEmpty(descriptor.PSN)); Assert.IsTrue(string.IsNullOrEmpty(descriptor.Layer)); Assert.IsTrue(string.IsNullOrEmpty(descriptor.Zone)); @@ -93,96 +93,96 @@ public class TXT : LoggingUnitTesting, IDisposable 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.AreEqual("MP", descriptor.Employee); Assert.IsTrue(string.IsNullOrEmpty(descriptor.Layer)); Assert.IsTrue(string.IsNullOrEmpty(descriptor.Zone)); 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.AreEqual("12", descriptor.Reactor); + Assert.AreEqual("123456", descriptor.RDS); + Assert.AreEqual("1234", descriptor.PSN); + Assert.AreEqual("2", descriptor.Layer); + Assert.AreEqual("1", descriptor.Zone); Assert.IsTrue(string.IsNullOrEmpty(descriptor.Employee)); 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.AreEqual("12", descriptor.Reactor); + Assert.AreEqual("123456", descriptor.RDS); + Assert.AreEqual("1234", descriptor.PSN); + Assert.AreEqual("2", descriptor.Layer); + Assert.AreEqual("1", descriptor.Zone); Assert.IsTrue(string.IsNullOrEmpty(descriptor.Employee)); descriptor = ProcessData.GetDescriptor("20"); - Assert.IsTrue(descriptor.Reactor is "20"); + Assert.AreEqual("20", 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 = ProcessData.GetDescriptor("20.2"); - Assert.IsTrue(descriptor.Reactor is "20"); + Assert.AreEqual("20", descriptor.Reactor); Assert.IsTrue(string.IsNullOrEmpty(descriptor.RDS)); Assert.IsTrue(string.IsNullOrEmpty(descriptor.PSN)); - Assert.IsTrue(descriptor.Layer is "2"); + Assert.AreEqual("2", descriptor.Layer); Assert.IsTrue(string.IsNullOrEmpty(descriptor.Zone)); Assert.IsTrue(string.IsNullOrEmpty(descriptor.Employee)); descriptor = ProcessData.GetDescriptor("20.2.1"); - Assert.IsTrue(descriptor.Layer is "2"); + Assert.AreEqual("2", descriptor.Layer); 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.AreEqual("20", descriptor.Reactor); + Assert.AreEqual("1", descriptor.Zone); Assert.IsTrue(string.IsNullOrEmpty(descriptor.Employee)); descriptor = ProcessData.GetDescriptor("20.1.1"); - Assert.IsTrue(descriptor.Layer is "1"); + Assert.AreEqual("1", descriptor.Layer); 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.AreEqual("20", descriptor.Reactor); + Assert.AreEqual("1", descriptor.Zone); Assert.IsTrue(string.IsNullOrEmpty(descriptor.Employee)); descriptor = ProcessData.GetDescriptor("P2-LOW-RR"); Assert.IsTrue(string.IsNullOrEmpty(descriptor.Layer)); - Assert.IsTrue(descriptor.PSN is "RR"); + Assert.AreEqual("RR", descriptor.PSN); Assert.IsTrue(string.IsNullOrEmpty(descriptor.RDS)); - Assert.IsTrue(descriptor.Reactor is "P2"); + Assert.AreEqual("P2", descriptor.Reactor); Assert.IsTrue(string.IsNullOrEmpty(descriptor.Zone)); Assert.IsTrue(string.IsNullOrEmpty(descriptor.Employee)); 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.AreEqual("i171308.1.51", descriptor.RDS); Assert.IsTrue(string.IsNullOrEmpty(descriptor.Reactor)); Assert.IsTrue(string.IsNullOrEmpty(descriptor.Zone)); Assert.IsTrue(string.IsNullOrEmpty(descriptor.Employee)); 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.AreEqual("o171308.1.51", descriptor.RDS); Assert.IsTrue(string.IsNullOrEmpty(descriptor.Reactor)); Assert.IsTrue(string.IsNullOrEmpty(descriptor.Zone)); Assert.IsTrue(string.IsNullOrEmpty(descriptor.Employee)); 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.AreEqual("O171308.1.51", descriptor.RDS); Assert.IsTrue(string.IsNullOrEmpty(descriptor.Reactor)); Assert.IsTrue(string.IsNullOrEmpty(descriptor.Zone)); Assert.IsTrue(string.IsNullOrEmpty(descriptor.Employee)); 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.AreEqual("171308.1.51", descriptor.RDS); Assert.IsTrue(string.IsNullOrEmpty(descriptor.Reactor)); Assert.IsTrue(string.IsNullOrEmpty(descriptor.Zone)); Assert.IsTrue(string.IsNullOrEmpty(descriptor.Employee)); descriptor = ProcessData.GetDescriptor("75-QP1414-SPLIT4"); - Assert.IsTrue(!string.IsNullOrEmpty(descriptor.Lot)); + Assert.IsFalse(string.IsNullOrEmpty(descriptor.Lot)); Assert.IsTrue(string.IsNullOrEmpty(descriptor.Layer)); - Assert.IsTrue(descriptor.PSN is "SPLIT4"); + Assert.AreEqual("SPLIT4", descriptor.PSN); Assert.IsTrue(string.IsNullOrEmpty(descriptor.RDS)); - Assert.IsTrue(descriptor.Reactor is "75"); + Assert.AreEqual("75", descriptor.Reactor); Assert.IsTrue(string.IsNullOrEmpty(descriptor.Zone)); Assert.IsTrue(string.IsNullOrEmpty(descriptor.Employee)); descriptor = ProcessData.GetDescriptor("B48"); - Assert.IsTrue(descriptor.Lot == "B48"); + Assert.AreEqual("B48", descriptor.Lot); Assert.IsTrue(string.IsNullOrEmpty(descriptor.Layer)); Assert.IsTrue(string.IsNullOrEmpty(descriptor.PSN)); Assert.IsTrue(string.IsNullOrEmpty(descriptor.PSN));