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/QS408M/Run.cs b/Adaptation/FileHandlers/QS408M/Run.cs index 9dc79ae..ca6f51e 100644 --- a/Adaptation/FileHandlers/QS408M/Run.cs +++ b/Adaptation/FileHandlers/QS408M/Run.cs @@ -68,9 +68,9 @@ internal class Run return result; } - private static void WriteJson(Logistics logistics, List fileInfoCollection, Run? result) + 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); diff --git a/Adaptation/MET08THFTIRQS408M.Tests.csproj b/Adaptation/MET08THFTIRQS408M.Tests.csproj index 09dab5f..02a3e3d 100644 --- a/Adaptation/MET08THFTIRQS408M.Tests.csproj +++ b/Adaptation/MET08THFTIRQS408M.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/Extract/Production/v2.59.0/BIORAD2.cs b/Adaptation/_Tests/Extract/Production/v2.59.0/BIORAD2.cs index ec673fd..7d8cc34 100644 --- a/Adaptation/_Tests/Extract/Production/v2.59.0/BIORAD2.cs +++ b/Adaptation/_Tests/Extract/Production/v2.59.0/BIORAD2.cs @@ -52,9 +52,9 @@ public class BIORAD2 IFileRead fileRead = _BIORAD2.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false); Logistics logistics = new(fileRead); dateTime = FileHandlers.QS408M.ProcessData.GetDateTime(logistics, tickOffset: 0, dateTimeText: string.Empty); - Assert.IsTrue(dateTime == logistics.DateTimeFromSequence); + Assert.AreEqual(logistics.DateTimeFromSequence, dateTime); dateTime = FileHandlers.QS408M.ProcessData.GetDateTime(logistics, tickOffset: 0, dateTimeText: "Tue Nov 10 12:03:56 1970"); - Assert.IsTrue(dateTime == logistics.DateTimeFromSequence); + Assert.AreEqual(logistics.DateTimeFromSequence, dateTime); _ = Shared.AdaptationTesting.ReExtractCompareUpdatePassDirectory(variables, fileRead, logistics, validatePDSF); NonThrowTryCatch(); } @@ -74,9 +74,9 @@ public class BIORAD2 IFileRead fileRead = _BIORAD2.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false); Logistics logistics = new(fileRead); dateTime = FileHandlers.QS408M.ProcessData.GetDateTime(logistics, tickOffset: 0, dateTimeText: string.Empty); - Assert.IsTrue(dateTime == logistics.DateTimeFromSequence); + Assert.AreEqual(logistics.DateTimeFromSequence, dateTime); dateTime = FileHandlers.QS408M.ProcessData.GetDateTime(logistics, tickOffset: 0, dateTimeText: "Tue Nov 10 12:03:56 1970"); - Assert.IsTrue(dateTime == logistics.DateTimeFromSequence); + Assert.AreEqual(logistics.DateTimeFromSequence, dateTime); _ = Shared.AdaptationTesting.ReExtractCompareUpdatePassDirectory(variables, fileRead, logistics, validatePDSF); NonThrowTryCatch(); } @@ -96,9 +96,9 @@ public class BIORAD2 IFileRead fileRead = _BIORAD2.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false); Logistics logistics = new(fileRead); dateTime = FileHandlers.QS408M.ProcessData.GetDateTime(logistics, tickOffset: 0, dateTimeText: string.Empty); - Assert.IsTrue(dateTime == logistics.DateTimeFromSequence); + Assert.AreEqual(logistics.DateTimeFromSequence, dateTime); dateTime = FileHandlers.QS408M.ProcessData.GetDateTime(logistics, tickOffset: 0, dateTimeText: "Tue Nov 10 12:03:56 1970"); - Assert.IsTrue(dateTime == logistics.DateTimeFromSequence); + Assert.AreEqual(logistics.DateTimeFromSequence, dateTime); _ = Shared.AdaptationTesting.ReExtractCompareUpdatePassDirectory(variables, fileRead, logistics, validatePDSF); NonThrowTryCatch(); } @@ -118,9 +118,9 @@ public class BIORAD2 IFileRead fileRead = _BIORAD2.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false); Logistics logistics = new(fileRead); dateTime = FileHandlers.QS408M.ProcessData.GetDateTime(logistics, tickOffset: 0, dateTimeText: string.Empty); - Assert.IsTrue(dateTime == logistics.DateTimeFromSequence); + Assert.AreEqual(logistics.DateTimeFromSequence, dateTime); dateTime = FileHandlers.QS408M.ProcessData.GetDateTime(logistics, tickOffset: 0, dateTimeText: "Tue Nov 10 12:03:56 1970"); - Assert.IsTrue(dateTime == logistics.DateTimeFromSequence); + Assert.AreEqual(logistics.DateTimeFromSequence, dateTime); _ = Shared.AdaptationTesting.ReExtractCompareUpdatePassDirectory(variables, fileRead, logistics, validatePDSF); NonThrowTryCatch(); } @@ -140,9 +140,9 @@ public class BIORAD2 IFileRead fileRead = _BIORAD2.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false); Logistics logistics = new(fileRead); dateTime = FileHandlers.QS408M.ProcessData.GetDateTime(logistics, tickOffset: 0, dateTimeText: string.Empty); - Assert.IsTrue(dateTime == logistics.DateTimeFromSequence); + Assert.AreEqual(logistics.DateTimeFromSequence, dateTime); dateTime = FileHandlers.QS408M.ProcessData.GetDateTime(logistics, tickOffset: 0, dateTimeText: "Tue Nov 10 12:03:56 1970"); - Assert.IsTrue(dateTime == logistics.DateTimeFromSequence); + Assert.AreEqual(logistics.DateTimeFromSequence, dateTime); _ = Shared.AdaptationTesting.ReExtractCompareUpdatePassDirectory(variables, fileRead, logistics, validatePDSF); NonThrowTryCatch(); } diff --git a/Adaptation/_Tests/Extract/Production/v2.59.0/BIORAD3.cs b/Adaptation/_Tests/Extract/Production/v2.59.0/BIORAD3.cs index bbec8f4..a07b923 100644 --- a/Adaptation/_Tests/Extract/Production/v2.59.0/BIORAD3.cs +++ b/Adaptation/_Tests/Extract/Production/v2.59.0/BIORAD3.cs @@ -52,9 +52,9 @@ public class BIORAD3 IFileRead fileRead = _BIORAD3.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false); Logistics logistics = new(fileRead); dateTime = FileHandlers.QS408M.ProcessData.GetDateTime(logistics, tickOffset: 0, dateTimeText: string.Empty); - Assert.IsTrue(dateTime == logistics.DateTimeFromSequence); + Assert.AreEqual(logistics.DateTimeFromSequence, dateTime); dateTime = FileHandlers.QS408M.ProcessData.GetDateTime(logistics, tickOffset: 0, dateTimeText: "Tue Nov 10 12:03:56 1970"); - Assert.IsTrue(dateTime == logistics.DateTimeFromSequence); + Assert.AreEqual(logistics.DateTimeFromSequence, dateTime); _ = Shared.AdaptationTesting.ReExtractCompareUpdatePassDirectory(variables, fileRead, logistics, validatePDSF); NonThrowTryCatch(); } @@ -74,9 +74,9 @@ public class BIORAD3 IFileRead fileRead = _BIORAD3.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false); Logistics logistics = new(fileRead); dateTime = FileHandlers.QS408M.ProcessData.GetDateTime(logistics, tickOffset: 0, dateTimeText: string.Empty); - Assert.IsTrue(dateTime == logistics.DateTimeFromSequence); + Assert.AreEqual(logistics.DateTimeFromSequence, dateTime); dateTime = FileHandlers.QS408M.ProcessData.GetDateTime(logistics, tickOffset: 0, dateTimeText: "Tue Nov 10 12:03:56 1970"); - Assert.IsTrue(dateTime == logistics.DateTimeFromSequence); + Assert.AreEqual(logistics.DateTimeFromSequence, dateTime); _ = Shared.AdaptationTesting.ReExtractCompareUpdatePassDirectory(variables, fileRead, logistics, validatePDSF); NonThrowTryCatch(); } diff --git a/Adaptation/_Tests/Extract/Production/v2.59.0/MET08THFTIRQS408M.cs b/Adaptation/_Tests/Extract/Production/v2.59.0/MET08THFTIRQS408M.cs index 3068ee2..cbceb15 100644 --- a/Adaptation/_Tests/Extract/Production/v2.59.0/MET08THFTIRQS408M.cs +++ b/Adaptation/_Tests/Extract/Production/v2.59.0/MET08THFTIRQS408M.cs @@ -63,9 +63,9 @@ public class MET08THFTIRQS408M IFileRead fileRead = _MET08THFTIRQS408M.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false); Logistics logistics = new(fileRead); dateTime = FileHandlers.QS408M.ProcessData.GetDateTime(logistics, tickOffset: 0, dateTimeText: string.Empty); - Assert.IsTrue(dateTime == logistics.DateTimeFromSequence); + Assert.AreEqual(logistics.DateTimeFromSequence, dateTime); dateTime = FileHandlers.QS408M.ProcessData.GetDateTime(logistics, tickOffset: 0, dateTimeText: "Tue Nov 10 12:03:56 1970"); - Assert.IsTrue(dateTime == logistics.DateTimeFromSequence); + Assert.AreEqual(logistics.DateTimeFromSequence, dateTime); _ = Shared.AdaptationTesting.ReExtractCompareUpdatePassDirectory(variables, fileRead, logistics); NonThrowTryCatch(); } @@ -90,9 +90,9 @@ public class MET08THFTIRQS408M IFileRead fileRead = _MET08THFTIRQS408M.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false); Logistics logistics = new(fileRead); dateTime = FileHandlers.QS408M.ProcessData.GetDateTime(logistics, tickOffset: 0, dateTimeText: string.Empty); - Assert.IsTrue(dateTime == logistics.DateTimeFromSequence); + Assert.AreEqual(logistics.DateTimeFromSequence, dateTime); dateTime = FileHandlers.QS408M.ProcessData.GetDateTime(logistics, tickOffset: 0, dateTimeText: "Tue Nov 10 12:03:56 1970"); - Assert.IsTrue(dateTime == logistics.DateTimeFromSequence); + Assert.AreEqual(logistics.DateTimeFromSequence, dateTime); _ = Shared.AdaptationTesting.ReExtractCompareUpdatePassDirectory(variables, fileRead, logistics); NonThrowTryCatch(); } @@ -111,9 +111,9 @@ public class MET08THFTIRQS408M IFileRead fileRead = _MET08THFTIRQS408M.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false); Logistics logistics = new(fileRead); dateTime = FileHandlers.QS408M.ProcessData.GetDateTime(logistics, tickOffset: 0, dateTimeText: string.Empty); - Assert.IsTrue(dateTime == logistics.DateTimeFromSequence); + Assert.AreEqual(logistics.DateTimeFromSequence, dateTime); dateTime = FileHandlers.QS408M.ProcessData.GetDateTime(logistics, tickOffset: 0, dateTimeText: "Tue Nov 10 12:03:56 1970"); - Assert.IsTrue(dateTime == logistics.DateTimeFromSequence); + Assert.AreEqual(logistics.DateTimeFromSequence, dateTime); _ = Shared.AdaptationTesting.ReExtractCompareUpdatePassDirectory(variables, fileRead, logistics); NonThrowTryCatch(); } 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/MET08THFTIRQS408M.cs b/Adaptation/_Tests/Static/MET08THFTIRQS408M.cs index 6a140cf..d788141 100644 --- a/Adaptation/_Tests/Static/MET08THFTIRQS408M.cs +++ b/Adaptation/_Tests/Static/MET08THFTIRQS408M.cs @@ -51,7 +51,7 @@ public class MET08THFTIRQS408M : 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/QS408M.cs b/Adaptation/_Tests/Static/QS408M.cs index 1c95103..4d12997 100644 --- a/Adaptation/_Tests/Static/QS408M.cs +++ b/Adaptation/_Tests/Static/QS408M.cs @@ -52,7 +52,7 @@ public class QS408M : 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 QS408M : 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,92 +93,92 @@ public class QS408M : 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");