diff --git a/Adaptation/FileHandlers/TIBCO/Transport/CommonB.cs b/Adaptation/FileHandlers/TIBCO/Transport/CommonB.cs index 58ad6af..65e103a 100644 --- a/Adaptation/FileHandlers/TIBCO/Transport/CommonB.cs +++ b/Adaptation/FileHandlers/TIBCO/Transport/CommonB.cs @@ -1,25 +1,74 @@ namespace Adaptation.FileHandlers.TIBCO.Transport; +#nullable enable + public class CommonB { - public string Layer { get; } - public string LoadLockSide { get; } + public string? Layer { get; } public int? RDSNumber { get; } - public string ReactorType { get; } - public string PSN { get; } + public string? PSN { get; } public int? ReactorNumber { get; } - public string Zone { get; } + public string? Zone { get; } - public CommonB(string layer, string loadLockSide, int? rdsNumber, string reactorType, string psn, int? reactorNumber, string zone) + public CommonB(string? layer, + int? rdsNumber, + string? psn, + int? reactorNumber, + string? zone) { Layer = layer; - LoadLockSide = loadLockSide; RDSNumber = rdsNumber; - ReactorType = reactorType; PSN = psn; ReactorNumber = reactorNumber; Zone = zone; } + internal static CommonB Get(Common common, RunDataSheetRoot? runDataSheetRoot, Run[]? runs) + { + CommonB result; + string? psn; + string? zone; + string? layer; + int? reactorNumber; + if (runs is null || runs.Length == 0) + { + zone = common.Zone; + layer = common.Layer; + if (runDataSheetRoot?.RunDataSheet is null) + { + psn = common.PSN; + reactorNumber = common.ReactorNumber; + } + else + { + psn = runDataSheetRoot?.RunDataSheet.PSN.ToString(); + reactorNumber = runDataSheetRoot?.RunDataSheet.Reactor; + } + } + else + { + const int zero = 0; + Run run = runs[zero]; + if (runDataSheetRoot?.RunDataSheet is not null) + { + psn = runDataSheetRoot?.RunDataSheet.PSN.ToString(); + reactorNumber = runDataSheetRoot?.RunDataSheet.Reactor; + } + else + { + psn = string.IsNullOrEmpty(common.PSN) ? run.PSN : common.PSN; + reactorNumber = common.ReactorNumber is null ? run.Reactor : common.ReactorNumber; + } + zone = string.IsNullOrEmpty(common.Zone) ? run.Zone : common.Zone; + layer = string.IsNullOrEmpty(common.Layer) ? run.EpiLayer : common.Layer; + } + result = new(layer: layer, + rdsNumber: common.RDSNumber, + psn: psn, + reactorNumber: reactorNumber, + zone: zone); + return result; + } + } \ No newline at end of file diff --git a/Adaptation/FileHandlers/TIBCO/Transport/Job.cs b/Adaptation/FileHandlers/TIBCO/Transport/Job.cs index 823462d..a1a1b17 100644 --- a/Adaptation/FileHandlers/TIBCO/Transport/Job.cs +++ b/Adaptation/FileHandlers/TIBCO/Transport/Job.cs @@ -49,8 +49,10 @@ public partial class Job IsAreaSi = false; else { + Run[]? runs; Common common; CommonB commonB; + string? basicType; int? reactorNumber; const string hyphen = "-"; const string bioRad2 = "BIORAD2"; @@ -63,6 +65,7 @@ public partial class Job DateTime = DateTime.Now; else DateTime = new DateTime(sequence); + string? jobNames = GetJobNames(input); const string dep08CEPIEPSILON = "DEP08CEPIEPSILON"; if (input.EquipmentType == dep08CEPIEPSILON) common = ReactorGet(input, httpClient); @@ -87,29 +90,22 @@ public partial class Job common = Get(input, httpClient); } bool isValid = IsValid(common.RDSNumber); - if (isValid) - commonB = GetWithValidRDS(lsl2SQLConnectionString, enteredDateTimeFilter, loadSignatureDateTimeFilter, common.Layer, common.PSN, common.RDSNumber, common.ReactorNumber, common.Zone); - else if (common.WorkOrder is null || common.WorkOrder.IsWorkOrder || common.RDSNumber.HasValue) - commonB = Get(lsl2SQLConnectionString, enteredDateTimeFilter, loadSignatureDateTimeFilter, common); - else - commonB = new(layer: hyphen, - loadLockSide: hyphen, - rdsNumber: common.RDSNumber, - reactorType: hyphen, - psn: common.PSN, - reactorNumber: common.ReactorNumber, - zone: hyphen); - if (commonB.RDSNumber is null || common.RunDataSheetRoot is not null) + if (common.RDSNumber is null || !isValid) runDataSheetRoot = common.RunDataSheetRoot; else { try - { runDataSheetRoot = GetRunDataSheetRoot(httpClient, commonB.RDSNumber.Value); } + { runDataSheetRoot = GetRunDataSheetRoot(httpClient, common.RDSNumber.Value); } catch (Exception) { runDataSheetRoot = null; } } - string? basicType; - string? jobNames = GetJobNames(input); + if (isValid) + runs = GetWithValidRDS(lsl2SQLConnectionString, enteredDateTimeFilter, loadSignatureDateTimeFilter, common); + else if (common.WorkOrder is null || common.WorkOrder.IsWorkOrder || common.RDSNumber.HasValue) + runs = Get(lsl2SQLConnectionString, enteredDateTimeFilter, loadSignatureDateTimeFilter, common); + else + runs = null; + commonB = CommonB.Get(common, runDataSheetRoot, runs); if (string.IsNullOrEmpty(jobNames) || commonB.RDSNumber is null || commonB.ReactorNumber is null || string.IsNullOrEmpty(commonB.PSN)) basicType = hyphen; else @@ -660,16 +656,9 @@ public partial class Job return string.Join(Environment.NewLine, results); } // cSpell:restore - private static CommonB Get(string lsl2SQLConnectionString, DateTime enteredDateTimeFilter, DateTime loadSignatureDateTimeFilter, Common common) + private static Run[]? Get(string lsl2SQLConnectionString, DateTime enteredDateTimeFilter, DateTime loadSignatureDateTimeFilter, Common common) { - int? rdsNumber; - string? psn; - string? zone; - string? layer; - const int zero = 0; - int? reactorNumber; - string? reactorType; - string? loadLockSide; + Run[]? results; string commandText = GetCommandText(enteredDateTimeFilter, loadSignatureDateTimeFilter, rds: null, @@ -679,106 +668,38 @@ public partial class Job reactor: common.ReactorNumber); string json = GetRunJson(lsl2SQLConnectionString, commandText); if (string.IsNullOrEmpty(json)) - { - psn = common.PSN; - rdsNumber = null; - reactorType = null; - zone = common.Zone; - loadLockSide = null; - layer = common.Layer; - reactorNumber = common.ReactorNumber; - } + results = null; else { - Run[]? runs; try - { runs = JsonSerializer.Deserialize(json); } + { results = JsonSerializer.Deserialize(json); } catch (Exception) - { runs = Array.Empty(); } - if (runs is null || runs.Length == 0) - { - psn = common.PSN; - rdsNumber = null; - reactorType = null; - zone = common.Zone; - loadLockSide = null; - layer = common.Layer; - reactorNumber = common.ReactorNumber; - } - else - { - reactorType = null; - Run run = runs[zero]; - rdsNumber = run.RdsNo; - reactorNumber = run.Reactor; - loadLockSide = run.LoadLockSide; - psn = string.IsNullOrEmpty(common.PSN) ? run.PSN : common.PSN; - zone = string.IsNullOrEmpty(common.Zone) ? run.Zone : common.Zone; - layer = string.IsNullOrEmpty(common.Layer) ? run.EpiLayer : common.Layer; - } + { results = Array.Empty(); } } - return new(layer: layer, - loadLockSide: loadLockSide, - rdsNumber: rdsNumber, - psn: psn, - reactorNumber: reactorNumber, - reactorType: reactorType, - zone: zone); + return results; } - private static CommonB GetWithValidRDS(string lsl2SQLConnectionString, DateTime enteredDateTimeFilter, DateTime loadSignatureDateTimeFilter, string? layer, string? psn, int? rdsNumber, int? reactorNumber, string? zone) + private static Run[]? GetWithValidRDS(string lsl2SQLConnectionString, DateTime enteredDateTimeFilter, DateTime loadSignatureDateTimeFilter, Common common) { - const int zero = 0; - string? reactorType; - string? loadLockSide; + Run[]? results; string commandText = GetCommandText(enteredDateTimeFilter, loadSignatureDateTimeFilter, - rds: rdsNumber, + rds: common.RDSNumber, workOrderNumber: null, workOrderCassette: null, slot: null, reactor: null); string json = GetRunJson(lsl2SQLConnectionString, commandText); if (string.IsNullOrEmpty(json)) - { - zone = null; - reactorType = null; - loadLockSide = null; - } + results = null; else { - Run[]? runs; try - { runs = JsonSerializer.Deserialize(json); } + { results = JsonSerializer.Deserialize(json); } catch (Exception) - { runs = Array.Empty(); } - if (runs is null || runs.Length == 0) - { - zone = null; - reactorType = null; - loadLockSide = null; - } - else - { - Run run = runs[zero]; - if (string.IsNullOrEmpty(psn)) - psn = run.PSN; - if (string.IsNullOrEmpty(zone)) - zone = run.Zone; - if (string.IsNullOrEmpty(layer)) - layer = run.EpiLayer; - reactorNumber = run.Reactor is null ? reactorNumber : run.Reactor.Value; - loadLockSide = run.LoadLockSide; - reactorType = run.ReactorType; - } + { results = Array.Empty(); } } - return new(layer: layer, - loadLockSide: loadLockSide, - rdsNumber: rdsNumber, - reactorType: reactorType, - psn: psn, - reactorNumber: reactorNumber, - zone: zone); + return results; } private static string? GetJobNames(Input input) => diff --git a/Adaptation/FileHandlers/TIBCO/Transport/Run.cs b/Adaptation/FileHandlers/TIBCO/Transport/Run.cs index 66fb1c2..d1278ad 100644 --- a/Adaptation/FileHandlers/TIBCO/Transport/Run.cs +++ b/Adaptation/FileHandlers/TIBCO/Transport/Run.cs @@ -29,12 +29,6 @@ public class Run [JsonPropertyName("ps_no")] public string PSN { get; set; } - [JsonPropertyName("load_lock_side")] - public string LoadLockSide { get; set; } - - [JsonPropertyName("reactor_type")] - public string ReactorType { get; set; } - [JsonPropertyName("recipe_name")] public string RecipeName { get; set; } diff --git a/Adaptation/FileHandlers/TIBCO/Transport/RunDataSheet.cs b/Adaptation/FileHandlers/TIBCO/Transport/RunDataSheet.cs index 98ced06..ef77f04 100644 --- a/Adaptation/FileHandlers/TIBCO/Transport/RunDataSheet.cs +++ b/Adaptation/FileHandlers/TIBCO/Transport/RunDataSheet.cs @@ -6,14 +6,20 @@ public class RunDataSheet { [JsonConstructor] - public RunDataSheet(string loadLockSide, int psn, int reactor, string reactorType) + public RunDataSheet(string loadLockSide, + int number, + int psn, + int reactor, + string reactorType) { PSN = psn; + Number = number; LoadLockSide = loadLockSide; Reactor = reactor; ReactorType = reactorType; } + [JsonPropertyName("keyId")] public int Number { get; } // { init; get; } [JsonPropertyName("loadLockSide")] public string LoadLockSide { get; } // { init; get; } [JsonPropertyName("PSN")] public int PSN { get; } // { init; get; } [JsonPropertyName("reactor")] public int Reactor { get; } // { init; get; } diff --git a/Adaptation/_Tests/Static/Job.cs b/Adaptation/_Tests/Static/Job.cs index ad58288..6b73abe 100644 --- a/Adaptation/_Tests/Static/Job.cs +++ b/Adaptation/_Tests/Static/Job.cs @@ -44,7 +44,7 @@ public class Job : LoggingUnitTesting, IDisposable catch (Exception) { } } -#if !Always +#if Always [Ignore] #endif [TestMethod] @@ -57,41 +57,42 @@ public class Job : LoggingUnitTesting, IDisposable DateTime loadSignatureDateTimeFilter = new(2023, 05, 01); string metrologyFileShare = FileHandlers.TIBCO.FileRead.MetrologyFileShare; string barcodeHostFileShare = FileHandlers.TIBCO.FileRead.BarcodeHostFileShare; + string iqsSQLConnectionString = FileHandlers.TIBCO.FileRead.IQSConnectionString; string lsl2SQLConnectionString = FileHandlers.TIBCO.FileRead.LSL2SQLConnectionString; + HttpClient httpClient = new() { BaseAddress = new("http://messa020ec.infineon.com/api/oiWizard") }; LoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration")); - 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, enteredDateTimeFilter, loadSignatureDateTimeFilter); + job = new(iqsSQLConnectionString, lsl2SQLConnectionString, metrologyFileShare, barcodeHostFileShare, httpClient, mid, enteredDateTimeFilter, loadSignatureDateTimeFilter); 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, enteredDateTimeFilter, loadSignatureDateTimeFilter); + job = new(iqsSQLConnectionString, lsl2SQLConnectionString, metrologyFileShare, barcodeHostFileShare, httpClient, mid, enteredDateTimeFilter, loadSignatureDateTimeFilter); 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, enteredDateTimeFilter, loadSignatureDateTimeFilter); + job = new(iqsSQLConnectionString, lsl2SQLConnectionString, metrologyFileShare, barcodeHostFileShare, httpClient, mid, enteredDateTimeFilter, loadSignatureDateTimeFilter); 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, enteredDateTimeFilter, loadSignatureDateTimeFilter); + job = new(iqsSQLConnectionString, lsl2SQLConnectionString, metrologyFileShare, barcodeHostFileShare, httpClient, mid, enteredDateTimeFilter, loadSignatureDateTimeFilter); 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, enteredDateTimeFilter, loadSignatureDateTimeFilter); + job = new(iqsSQLConnectionString, lsl2SQLConnectionString, metrologyFileShare, barcodeHostFileShare, httpClient, mid, enteredDateTimeFilter, loadSignatureDateTimeFilter); Assert.IsFalse(string.IsNullOrEmpty(job.ProcessType)); // == "54"); Assert.IsFalse(string.IsNullOrEmpty(job.LotName)); // == "547000"); Assert.IsFalse(string.IsNullOrEmpty(job.ProductName)); // == "4445"); @@ -99,7 +100,7 @@ public class Job : LoggingUnitTesting, IDisposable mid = """ {"Area": "Si", "EquipmentType": "MET08RESIMAPCDE", "MesEntity": "CDE5", "Sequence": "638163023363575829", "MID": "B48", "Recipe": "lsl_6in "} """; - job = new(lsl2SQLConnectionString, metrologyFileShare, barcodeHostFileShare, httpClient, mid, enteredDateTimeFilter, loadSignatureDateTimeFilter); + job = new(iqsSQLConnectionString, lsl2SQLConnectionString, metrologyFileShare, barcodeHostFileShare, httpClient, mid, enteredDateTimeFilter, loadSignatureDateTimeFilter); Assert.IsFalse(string.IsNullOrEmpty(job.ProcessType)); // == "54"); Assert.IsFalse(string.IsNullOrEmpty(job.LotName)); // == "547000"); Assert.IsFalse(string.IsNullOrEmpty(job.ProductName)); // == "4445"); @@ -118,13 +119,14 @@ public class Job : LoggingUnitTesting, IDisposable DateTime loadSignatureDateTimeFilter = new(2023, 05, 01); string metrologyFileShare = FileHandlers.TIBCO.FileRead.MetrologyFileShare; string barcodeHostFileShare = FileHandlers.TIBCO.FileRead.BarcodeHostFileShare; + string iqsSQLConnectionString = FileHandlers.TIBCO.FileRead.IQSConnectionString; string lsl2SQLConnectionString = FileHandlers.TIBCO.FileRead.LSL2SQLConnectionString; + HttpClient httpClient = new() { BaseAddress = new("http://messa020ec.infineon.com/api/oiWizard") }; 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": "123456789", "MID": "37--", "Recipe": "Recipe"} """; - job = new(lsl2SQLConnectionString, metrologyFileShare, barcodeHostFileShare, httpClient, mid, enteredDateTimeFilter, loadSignatureDateTimeFilter); + job = new(iqsSQLConnectionString, lsl2SQLConnectionString, metrologyFileShare, barcodeHostFileShare, httpClient, mid, enteredDateTimeFilter, loadSignatureDateTimeFilter); Assert.AreEqual("37", job.ProcessType); Assert.IsFalse(string.IsNullOrEmpty(job.LotName)); // == "549918"); Assert.IsFalse(string.IsNullOrEmpty(job.ProductName)); // == "5101"); @@ -132,7 +134,7 @@ public class Job : LoggingUnitTesting, IDisposable NonThrowTryCatch(); } -#if !Always +#if Always [Ignore] #endif [TestMethod] @@ -144,13 +146,14 @@ public class Job : LoggingUnitTesting, IDisposable DateTime loadSignatureDateTimeFilter = new(2023, 05, 01); string metrologyFileShare = FileHandlers.TIBCO.FileRead.MetrologyFileShare; string barcodeHostFileShare = FileHandlers.TIBCO.FileRead.BarcodeHostFileShare; + string iqsSQLConnectionString = FileHandlers.TIBCO.FileRead.IQSConnectionString; string lsl2SQLConnectionString = FileHandlers.TIBCO.FileRead.LSL2SQLConnectionString; + HttpClient httpClient = new() { BaseAddress = new("http://messa020ec.infineon.com/api/oiWizard") }; LoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration")); - 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, enteredDateTimeFilter, loadSignatureDateTimeFilter); + job = new(iqsSQLConnectionString, lsl2SQLConnectionString, metrologyFileShare, barcodeHostFileShare, httpClient, mid, enteredDateTimeFilter, loadSignatureDateTimeFilter); Assert.IsFalse(string.IsNullOrEmpty(job.ProcessType)); Assert.IsFalse(string.IsNullOrEmpty(job.LotName)); Assert.IsFalse(string.IsNullOrEmpty(job.ProductName)); @@ -170,13 +173,14 @@ public class Job : LoggingUnitTesting, IDisposable DateTime loadSignatureDateTimeFilter = new(2023, 05, 01); string metrologyFileShare = FileHandlers.TIBCO.FileRead.MetrologyFileShare; string barcodeHostFileShare = FileHandlers.TIBCO.FileRead.BarcodeHostFileShare; + string iqsSQLConnectionString = FileHandlers.TIBCO.FileRead.IQSConnectionString; string lsl2SQLConnectionString = FileHandlers.TIBCO.FileRead.LSL2SQLConnectionString; + HttpClient httpClient = new() { BaseAddress = new("http://messa020ec.infineon.com/api/oiWizard") }; LoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration")); - 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, enteredDateTimeFilter, loadSignatureDateTimeFilter); + job = new(iqsSQLConnectionString, lsl2SQLConnectionString, metrologyFileShare, barcodeHostFileShare, httpClient, mid, enteredDateTimeFilter, loadSignatureDateTimeFilter); Assert.IsFalse(string.IsNullOrEmpty(job.ProcessType)); Assert.IsFalse(string.IsNullOrEmpty(job.LotName)); Assert.IsFalse(string.IsNullOrEmpty(job.ProductName)); @@ -184,7 +188,7 @@ public class Job : LoggingUnitTesting, IDisposable NonThrowTryCatch(); } -#if !Always +#if Always [Ignore] #endif [TestMethod] @@ -196,13 +200,14 @@ public class Job : LoggingUnitTesting, IDisposable DateTime loadSignatureDateTimeFilter = new(2023, 05, 01); string metrologyFileShare = FileHandlers.TIBCO.FileRead.MetrologyFileShare; string barcodeHostFileShare = FileHandlers.TIBCO.FileRead.BarcodeHostFileShare; + string iqsSQLConnectionString = FileHandlers.TIBCO.FileRead.IQSConnectionString; string lsl2SQLConnectionString = FileHandlers.TIBCO.FileRead.LSL2SQLConnectionString; + HttpClient httpClient = new() { BaseAddress = new("http://messa020ec.infineon.com/api/oiWizard") }; 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, enteredDateTimeFilter, loadSignatureDateTimeFilter); + job = new(iqsSQLConnectionString, lsl2SQLConnectionString, metrologyFileShare, barcodeHostFileShare, httpClient, mid, enteredDateTimeFilter, loadSignatureDateTimeFilter); Assert.IsFalse(string.IsNullOrEmpty(job.ProcessType)); Assert.IsFalse(string.IsNullOrEmpty(job.LotName)); Assert.IsFalse(string.IsNullOrEmpty(job.ProductName)); @@ -211,7 +216,7 @@ public class Job : LoggingUnitTesting, IDisposable NonThrowTryCatch(); } -#if !Always +#if Always [Ignore] #endif [TestMethod] @@ -223,13 +228,14 @@ public class Job : LoggingUnitTesting, IDisposable DateTime loadSignatureDateTimeFilter = new(2023, 05, 01); string metrologyFileShare = FileHandlers.TIBCO.FileRead.MetrologyFileShare; string barcodeHostFileShare = FileHandlers.TIBCO.FileRead.BarcodeHostFileShare; + string iqsSQLConnectionString = FileHandlers.TIBCO.FileRead.IQSConnectionString; string lsl2SQLConnectionString = FileHandlers.TIBCO.FileRead.LSL2SQLConnectionString; + HttpClient httpClient = new() { BaseAddress = new("http://messa020ec.infineon.com/api/oiWizard") }; LoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration")); - HttpClient httpClient = new() { BaseAddress = new(FileHandlers.TIBCO.FileRead.OpenInsightApplicationProgrammingInterface) }; string mid = """ {"Area": "Si", "EquipmentType": "MET08RESIMAPCDE", "MesEntity": "CDE5", "Sequence": "638756365880000000", "MID": "38-660275-5095.1", "Recipe": "IRC6mm"} """; - job = new(lsl2SQLConnectionString, metrologyFileShare, barcodeHostFileShare, httpClient, mid, enteredDateTimeFilter, loadSignatureDateTimeFilter); + job = new(iqsSQLConnectionString, lsl2SQLConnectionString, metrologyFileShare, barcodeHostFileShare, httpClient, mid, enteredDateTimeFilter, loadSignatureDateTimeFilter); Assert.IsFalse(string.IsNullOrEmpty(job.ProcessType)); Assert.IsFalse(string.IsNullOrEmpty(job.LotName)); Assert.IsFalse(string.IsNullOrEmpty(job.ProductName)); @@ -238,7 +244,7 @@ public class Job : LoggingUnitTesting, IDisposable NonThrowTryCatch(); } -#if !Always +#if Always [Ignore] #endif [TestMethod] @@ -250,13 +256,14 @@ public class Job : LoggingUnitTesting, IDisposable DateTime loadSignatureDateTimeFilter = new(2023, 05, 01); string metrologyFileShare = FileHandlers.TIBCO.FileRead.MetrologyFileShare; string barcodeHostFileShare = FileHandlers.TIBCO.FileRead.BarcodeHostFileShare; + string iqsSQLConnectionString = FileHandlers.TIBCO.FileRead.IQSConnectionString; string lsl2SQLConnectionString = FileHandlers.TIBCO.FileRead.LSL2SQLConnectionString; + HttpClient httpClient = new() { BaseAddress = new("http://messa020ec.infineon.com/api/oiWizard") }; 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, enteredDateTimeFilter, loadSignatureDateTimeFilter); + job = new(iqsSQLConnectionString, lsl2SQLConnectionString, metrologyFileShare, barcodeHostFileShare, httpClient, mid, enteredDateTimeFilter, loadSignatureDateTimeFilter); Assert.IsFalse(string.IsNullOrEmpty(job.ProcessType)); Assert.IsFalse(string.IsNullOrEmpty(job.LotName)); Assert.IsFalse(string.IsNullOrEmpty(job.ProductName)); @@ -265,7 +272,7 @@ public class Job : LoggingUnitTesting, IDisposable NonThrowTryCatch(); } -#if !Always +#if Always [Ignore] #endif [TestMethod] @@ -277,13 +284,14 @@ public class Job : LoggingUnitTesting, IDisposable DateTime loadSignatureDateTimeFilter = new(2023, 05, 01); string metrologyFileShare = FileHandlers.TIBCO.FileRead.MetrologyFileShare; string barcodeHostFileShare = FileHandlers.TIBCO.FileRead.BarcodeHostFileShare; + string iqsSQLConnectionString = FileHandlers.TIBCO.FileRead.IQSConnectionString; string lsl2SQLConnectionString = FileHandlers.TIBCO.FileRead.LSL2SQLConnectionString; + HttpClient httpClient = new() { BaseAddress = new("http://messa020ec.infineon.com/api/oiWizard") }; 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, enteredDateTimeFilter, loadSignatureDateTimeFilter); + job = new(iqsSQLConnectionString, lsl2SQLConnectionString, metrologyFileShare, barcodeHostFileShare, httpClient, mid, enteredDateTimeFilter, loadSignatureDateTimeFilter); Assert.IsFalse(string.IsNullOrEmpty(job.ProcessType)); Assert.IsFalse(string.IsNullOrEmpty(job.LotName)); Assert.IsFalse(string.IsNullOrEmpty(job.ProductName)); @@ -292,7 +300,7 @@ public class Job : LoggingUnitTesting, IDisposable NonThrowTryCatch(); } -#if !Always +#if Always [Ignore] #endif [TestMethod] @@ -304,13 +312,14 @@ public class Job : LoggingUnitTesting, IDisposable DateTime loadSignatureDateTimeFilter = new(2023, 05, 01); string metrologyFileShare = FileHandlers.TIBCO.FileRead.MetrologyFileShare; string barcodeHostFileShare = FileHandlers.TIBCO.FileRead.BarcodeHostFileShare; + string iqsSQLConnectionString = FileHandlers.TIBCO.FileRead.IQSConnectionString; string lsl2SQLConnectionString = FileHandlers.TIBCO.FileRead.LSL2SQLConnectionString; + HttpClient httpClient = new() { BaseAddress = new("http://messa020ec.infineon.com/api/oiWizard") }; 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": "AK1PL2", "Recipe": "8INCLEAN"} """; - job = new(lsl2SQLConnectionString, metrologyFileShare, barcodeHostFileShare, httpClient, mid, enteredDateTimeFilter, loadSignatureDateTimeFilter); + job = new(iqsSQLConnectionString, lsl2SQLConnectionString, metrologyFileShare, barcodeHostFileShare, httpClient, mid, enteredDateTimeFilter, loadSignatureDateTimeFilter); Assert.IsFalse(string.IsNullOrEmpty(job.ProcessType)); Assert.IsFalse(string.IsNullOrEmpty(job.LotName)); Assert.IsFalse(string.IsNullOrEmpty(job.ProductName)); @@ -328,13 +337,14 @@ public class Job : LoggingUnitTesting, IDisposable DateTime loadSignatureDateTimeFilter = new(2023, 05, 01); string metrologyFileShare = FileHandlers.TIBCO.FileRead.MetrologyFileShare; string barcodeHostFileShare = FileHandlers.TIBCO.FileRead.BarcodeHostFileShare; + string iqsSQLConnectionString = FileHandlers.TIBCO.FileRead.IQSConnectionString; string lsl2SQLConnectionString = FileHandlers.TIBCO.FileRead.LSL2SQLConnectionString; + HttpClient httpClient = new() { BaseAddress = new("http://messa020ec.infineon.com/api/oiWizard") }; LoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration")); - HttpClient httpClient = new() { BaseAddress = new(FileHandlers.TIBCO.FileRead.OpenInsightApplicationProgrammingInterface) }; string mid = """ - {"Area": "Si", "EquipmentType": "MET08RESIMAPCDE", "MesEntity": "CDE5", "Sequence": "638163023363575829", "MID": "23-111111-5053", "Recipe": "lsl_6in "} + {"Area": "Si", "EquipmentType": "MET08RESIMAPCDE", "MesEntity": "CDE5", "Sequence": "638163023363575829", "MID": "1T1014894", "Recipe": "lsl_6in "} """; - job = new(lsl2SQLConnectionString, metrologyFileShare, barcodeHostFileShare, httpClient, mid, enteredDateTimeFilter, loadSignatureDateTimeFilter); + job = new(iqsSQLConnectionString, lsl2SQLConnectionString, metrologyFileShare, barcodeHostFileShare, httpClient, mid, enteredDateTimeFilter, loadSignatureDateTimeFilter); Assert.IsFalse(string.IsNullOrEmpty(job.ProcessType)); // == "23"); Assert.IsFalse(string.IsNullOrEmpty(job.LotName)); // == "111111"); Assert.IsFalse(string.IsNullOrEmpty(job.ProductName)); // == "5053");