From 05b7f32605cb565d93fa88fc465b190c711dd982 Mon Sep 17 00:00:00 2001 From: Mike Phares Date: Tue, 23 May 2023 12:53:37 -0700 Subject: [PATCH] v2.49.2 30 Tests Passed SRP and nuget server name Date consistency Delay for RAMS --- .../FileHandlers/OpenInsight/FromIQS.cs | 42 +++- .../FileHandlers/TIBCO/Transport/Job.cs | 30 +-- Adaptation/FileHandlers/txt/FileRead.cs | 4 +- Adaptation/FileHandlers/txt/ProcessData.cs | 7 +- Adaptation/MET08DDUPSP1TBI-Development.yml | 2 +- Adaptation/Shared/Test.cs | 3 +- .../Staging/v2.49.0/MET08DDUPSP1TBI.cs | 20 -- .../Staging/v2.49.0/SP101.cs | 2 - .../Staging/v2.49.2/MET08DDUPSP1TBI.cs | 180 ++++++++++++++++++ .../Staging/v2.49.2/SP101.cs | 63 ++++++ .../Staging/v2.49.0/MET08DDUPSP1TBI.cs | 24 --- .../_Tests/Extract/Staging/v2.49.0/SP101.cs | 4 - .../Staging/v2.49.2/MET08DDUPSP1TBI.cs | 116 +++++++++++ .../_Tests/Extract/Staging/v2.49.2/SP101.cs | 47 +++++ Adaptation/_Tests/Static/Job.cs | 21 +- Adaptation/_Tests/Static/MET08DDUPSP1TBI.cs | 4 +- Adaptation/_Tests/Static/txt.cs | 22 ++- FileHandlers/FileRead.cs | 2 +- MET08DDUPSP1TBI.csproj | 2 +- Properties/AssemblyInfo.cs | 4 +- 20 files changed, 502 insertions(+), 97 deletions(-) create mode 100644 Adaptation/_Tests/CreateSelfDescription/Staging/v2.49.2/MET08DDUPSP1TBI.cs create mode 100644 Adaptation/_Tests/CreateSelfDescription/Staging/v2.49.2/SP101.cs create mode 100644 Adaptation/_Tests/Extract/Staging/v2.49.2/MET08DDUPSP1TBI.cs create mode 100644 Adaptation/_Tests/Extract/Staging/v2.49.2/SP101.cs diff --git a/Adaptation/FileHandlers/OpenInsight/FromIQS.cs b/Adaptation/FileHandlers/OpenInsight/FromIQS.cs index 9d7962f..26dfbdc 100644 --- a/Adaptation/FileHandlers/OpenInsight/FromIQS.cs +++ b/Adaptation/FileHandlers/OpenInsight/FromIQS.cs @@ -20,25 +20,38 @@ public class FromIQS { StringBuilder result = new(); _ = result + .AppendLine(" select iq.ev_count, iq.cl_count, iq.sl_count, iq.se_sgrp, iq.se_sgtm, iq.se_tsno, iq.td_test, iq.pr_name, iq.jd_name, iq.pl_name, iq.pd_name, iq.td_name, iq.se_val ") + .AppendLine(" from ( ") .AppendLine(" select ") .AppendLine(" se.f_sgrp se_sgrp, ") .AppendLine(" se.f_sgtm se_sgtm, ") .AppendLine(" se.f_tsno se_tsno, ") .AppendLine(" se.f_val se_val, ") - .AppendLine(" rd.f_name rd_name, ") + .AppendLine(" pr.f_name pr_name, ") .AppendLine(" jd.f_name jd_name, ") .AppendLine(" pl.f_name pl_name, ") .AppendLine(" pd.f_name pd_name, ") .AppendLine(" td.f_test td_test, ") .AppendLine(" td.f_name td_name, ") + .AppendLine(" (select count(cl.f_part) ") + .AppendLine(" from [spcepiworld].[dbo].[ctrl_lim] cl ") + .AppendLine(" where cl.f_part = pd.f_part ") + .AppendLine(" and cl.f_test = td.f_test ") + .AppendLine(" ) cl_count, ") + .AppendLine(" (select count(sl.f_part) ") + .AppendLine(" from [spcepiworld].[dbo].[spec_lim] sl ") + .AppendLine(" where sl.f_part = pd.f_part ") + .AppendLine(" and sl.f_test = td.f_test ") + .AppendLine(" ) sl_count, ") .AppendLine(" (select count(ev.f_evnt) ") .AppendLine(" from [spcepiworld].[dbo].[evnt_inf] ev ") - .AppendLine(" where ev.f_prcs = rd.f_prcs ") + .AppendLine(" where ev.f_prcs = pr.f_prcs ") .AppendLine(" and ev.f_part = pd.f_part ") - .AppendLine(" and ev.f_sgtm = se.f_sgtm) ev_count ") + .AppendLine(" and ev.f_sgtm = se.f_sgtm ") + .AppendLine(" ) ev_count ") .AppendLine(" from [spcepiworld].[dbo].[sgrp_ext] se ") - .AppendLine(" join [spcepiworld].[dbo].[prcs_dat] rd ") - .AppendLine(" on se.f_prcs = rd.f_prcs ") + .AppendLine(" join [spcepiworld].[dbo].[prcs_dat] pr ") + .AppendLine(" on se.f_prcs = pr.f_prcs ") .AppendLine(" join [spcepiworld].[dbo].[job_dat] jd ") .AppendLine(" on se.f_job = jd.f_job ") .AppendLine(" join [spcepiworld].[dbo].[part_lot] pl ") @@ -53,11 +66,13 @@ public class FromIQS if (!string.IsNullOrEmpty(description.RDS)) _ = result.Append(" and pl.f_name = '").Append(description.RDS).AppendLine("' "); _ = result - .Append(" and rd.f_name = '").Append(description.Reactor).AppendLine("' ") + .Append(" and pr.f_name = '").Append(description.Reactor).AppendLine("' ") .Append(" and pd.f_name = '").Append(description.PSN).AppendLine("' ") .AppendLine(" and jd.f_name in ('SP101') ") .Append(" and jd.f_name = '").Append(logistics.MesEntity).AppendLine("' ") .Append(" and dateadd(HH, -7, (dateadd(SS, convert(bigint, se.f_sgtm), '19700101'))) = '").Append(dateTime).AppendLine("' ") + .AppendLine(" ) as iq ") + .AppendLine(" order by iq.ev_count desc, iq.cl_count desc, iq.sl_count desc, iq.se_sgrp, iq.se_tsno, iq.td_test ") .AppendLine(" for json path "); return result.ToString(); } @@ -99,7 +114,17 @@ public class FromIQS { stringBuilder = GetForJsonPath(connectionString, commandText); if (stringBuilder.Length > 0) + { + long postBreakAfter = DateTime.Now.AddSeconds(5).Ticks; + for (short y = 0; y < short.MaxValue; y++) + { + if (DateTime.Now.Ticks > postBreakAfter) + break; + Thread.Sleep(250); + } + stringBuilder = GetForJsonPath(connectionString, commandText); break; + } if (DateTime.Now.Ticks > breakAfter) // throw new Exception($"After {breakAfterSeconds} seconds, didn't find sub group id!"); break; @@ -115,13 +140,12 @@ public class FromIQS else { JsonProperty[] jsonProperties = jsonElements[0].EnumerateObject().ToArray(); - if (!jsonProperties.Any() || jsonProperties[0].Name != "se_sgrp" || !long.TryParse(jsonProperties[0].Value.ToString(), out long subGroupId)) + if (!jsonProperties.Any() || jsonProperties[3].Name != "se_sgrp" || !long.TryParse(jsonProperties[3].Value.ToString(), out long subGroupId)) commandText = stringBuilder.ToString(); else { result = subGroupId; - commandText = GetCommandText(logistics, description, dateTime, subGroupId); - if (jsonProperties.Any() && jsonProperties[10].Name == "ev_count" && int.TryParse(jsonProperties[10].Value.ToString(), out int evCount)) + if (jsonProperties.Any() && jsonProperties[0].Name == "ev_count" && int.TryParse(jsonProperties[0].Value.ToString(), out int evCount)) count = evCount; } } diff --git a/Adaptation/FileHandlers/TIBCO/Transport/Job.cs b/Adaptation/FileHandlers/TIBCO/Transport/Job.cs index 43fb3ed..70fe548 100644 --- a/Adaptation/FileHandlers/TIBCO/Transport/Job.cs +++ b/Adaptation/FileHandlers/TIBCO/Transport/Job.cs @@ -62,10 +62,10 @@ public class Job (int? workOrderNumber, int? _, int? workOrderCassette, int? slotNumber, bool isWorkOrder) = GetWorkOrder(input); if (isWorkOrder || reactorNumber.HasValue) (layer, psn, rdsNumber, zone) = (string.Empty, string.Empty, null, string.Empty); - else if (!string.IsNullOrEmpty(input.MID) && input.MID.Length is not 2 and not 3 and not 5) - (layer, psn, rdsNumber, reactorNumber, zone) = Get(input); - else + else if (!string.IsNullOrEmpty(input.MID) && input.MID.Length is 2 or 3 && Regex.IsMatch(input.MID, "^[a-zA-z]{2,3}")) (layer, psn, rdsNumber, reactorNumber, zone) = Get(metrologyFileShare, input); + else + (layer, psn, rdsNumber, reactorNumber, zone) = Get(input); if (IsValid(rdsNumber)) (comment, layer, rdsNumber, psn, reactorNumber, zone) = GetWithValidRDS(lsl2SQLConnectionString, layer, psn, rdsNumber, reactorNumber, zone); else if (isWorkOrder || reactorNumber.HasValue) @@ -150,15 +150,15 @@ public class Job private static bool IsInvalid(int? rdsNumber) => rdsNumber is null or < 100000 or > 100000000; - private static (string, string) GetReactorAndRDS(string defaultReactor, string defaultRDS, string text, string formattedText, string[] segments, bool hasRDS) + private static (string, string) GetReactorAndRDS(string defaultReactor, string defaultRDS, string text, string formattedText, string[] segments) { string rds; string reactor; - if (string.IsNullOrEmpty(text) || segments.Length == 0 || string.IsNullOrEmpty(formattedText) || (segments.Length > 1 && !hasRDS)) + if (string.IsNullOrEmpty(text) || segments.Length == 0 || string.IsNullOrEmpty(formattedText)) reactor = defaultReactor; else reactor = segments[0]; - if (segments.Length <= 1 || !int.TryParse(segments[1].Replace("QP", string.Empty), out int rdsValue) || rdsValue < 99) + if (segments.Length <= 1 || !int.TryParse(segments[1], out int rdsValue) || rdsValue < 99) rds = defaultRDS; else rds = segments[1]; @@ -170,11 +170,11 @@ public class Job return new(reactor, rds); } - private static (string, string) GetLayerAndPSN(string defaultLayer, string defaultPSN, string[] segments, bool hasRDS) + private static (string, string) GetLayerAndPSN(string defaultLayer, string defaultPSN, string[] segments) { string psn; string layer; - if (segments.Length <= 2 || (segments.Length > 1 && !hasRDS)) + if (segments.Length <= 2) { psn = defaultPSN; layer = defaultLayer; @@ -223,10 +223,10 @@ public class Job string defaultLayer = string.Empty; string defaultReactor = string.Empty; string[] segments = input.MID.Split(new char[] { '-' }); - bool hasRDS = Regex.IsMatch(input.MID, "[-]?([QP][0-9]{4,}|[0-9]{5,})[-]?"); + // 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(defaultReactor, defaultRDS, input.MID, formattedText, segments, hasRDS); - if (string.IsNullOrEmpty(rds)) + (reactor, rds) = GetReactorAndRDS(defaultReactor, defaultRDS, input.MID, formattedText, segments); + if (string.IsNullOrEmpty(rds) || segments.Length < 2) rdsNumber = 0; else _ = int.TryParse(segments[1], out rdsNumber); @@ -240,7 +240,7 @@ public class Job else { reactorNumber = reactorCheck; - (layer, psn) = GetLayerAndPSN(defaultLayer, defaultPSN, segments, hasRDS); + (layer, psn) = GetLayerAndPSN(defaultLayer, defaultPSN, segments); zone = GetZone(segments); } return new(layer, psn, rdsNumber, reactorNumber, zone); @@ -265,6 +265,7 @@ public class Job private static (string, string, int?, int?, string) Get(string metrologyFileShare, Input input) { string lines; + const int zero = 0; int? reactor = null; int? rdsNumber = null; string psn = string.Empty; @@ -272,9 +273,9 @@ public class Job string zone = string.Empty; string layer = string.Empty; WorkMaterialOut? workMaterialOut; - if (!Directory.Exists(metrologyFileShare)) + if (string.IsNullOrEmpty(metrologyFileShare) || !Directory.Exists(metrologyFileShare)) throw new Exception($"Unable to access file-share <{metrologyFileShare}>"); - if (!string.IsNullOrEmpty(input.MID)) + if (!string.IsNullOrEmpty(input.MID) && input.MID.Length is 3) { string[] checkDirectories = GetDirectories(metrologyFileShare); foreach (string checkDirectory in checkDirectories) @@ -282,6 +283,7 @@ public class Job if (!Directory.Exists(checkDirectory)) _ = Directory.CreateDirectory(checkDirectory); files.AddRange(Directory.GetFiles(checkDirectory, $"WMO-{input.MID}.json", SearchOption.TopDirectoryOnly)); + files.AddRange(Directory.GetFiles(checkDirectory, $"WMO-{input.MID.Substring(1, 2)}{input.MID[zero]}.json", SearchOption.TopDirectoryOnly)); } } foreach (string file in files.OrderByDescending(l => new FileInfo(l).LastWriteTime)) diff --git a/Adaptation/FileHandlers/txt/FileRead.cs b/Adaptation/FileHandlers/txt/FileRead.cs index bf79b0e..42acc8c 100644 --- a/Adaptation/FileHandlers/txt/FileRead.cs +++ b/Adaptation/FileHandlers/txt/FileRead.cs @@ -109,7 +109,9 @@ public class FileRead : Shared.FileRead, IFileRead if (iProcessData is not ProcessData processData) throw new Exception(string.Concat("A) No Data - ", dateTime.Ticks)); string mid; - if (!string.IsNullOrEmpty(processData.Employee) && string.IsNullOrEmpty(processData.Reactor) && string.IsNullOrEmpty(processData.RDS) && string.IsNullOrEmpty(processData.PSN)) + if (!string.IsNullOrEmpty(processData.Lot) && string.IsNullOrEmpty(processData.Reactor) && string.IsNullOrEmpty(processData.RDS) && string.IsNullOrEmpty(processData.PSN)) + mid = processData.Lot; + else if (!string.IsNullOrEmpty(processData.Employee) && string.IsNullOrEmpty(processData.Reactor) && string.IsNullOrEmpty(processData.RDS) && string.IsNullOrEmpty(processData.PSN)) mid = processData.Employee; else { diff --git a/Adaptation/FileHandlers/txt/ProcessData.cs b/Adaptation/FileHandlers/txt/ProcessData.cs index 8d297af..9b102ff 100644 --- a/Adaptation/FileHandlers/txt/ProcessData.cs +++ b/Adaptation/FileHandlers/txt/ProcessData.cs @@ -282,12 +282,15 @@ public class ProcessData : IProcessData _I = 0; _Data = string.Empty; JobID = logistics.JobID; + Date = GetDateTime(logistics); MesEntity = logistics.MesEntity; - Date = DateTime.Now; _Log = LogManager.GetLogger(typeof(ProcessData)); Parse(fileRead, logistics, fileInfoCollection); } + private static DateTime GetDateTime(Logistics logistics) => + logistics.DateTimeFromSequence; + string IProcessData.GetCurrentReactor(IFileRead fileRead, Logistics logistics, Dictionary reactors) => throw new Exception(string.Concat("See ", nameof(Parse))); Tuple> IProcessData.GetResults(IFileRead fileRead, Logistics logistics, List fileInfoCollection) @@ -532,7 +535,7 @@ public class ProcessData : IProcessData string defaultLayer = string.Empty; string defaultReactor = string.Empty; string defaultEmployee = string.Empty; - if (Regex.IsMatch(text, @"^[a-zA-z][0-9]{4}$")) + if (Regex.IsMatch(text, @"^[a-zA-z][0-9]{2,4}$")) { lot = text.ToUpper(); psn = defaultPSN; diff --git a/Adaptation/MET08DDUPSP1TBI-Development.yml b/Adaptation/MET08DDUPSP1TBI-Development.yml index 071ff4e..5868631 100644 --- a/Adaptation/MET08DDUPSP1TBI-Development.yml +++ b/Adaptation/MET08DDUPSP1TBI-Development.yml @@ -26,7 +26,7 @@ steps: displayName: Configuration - script: | - set nugetSource=https://messa017.infineon.com/v3/index.json + set nugetSource=https://eaf-dev-reporting.mes.infineon.com/v3/index.json echo %nugetSource% echo ##vso[task.setvariable variable=NugetSource;]%nugetSource% echo $(NugetSource) diff --git a/Adaptation/Shared/Test.cs b/Adaptation/Shared/Test.cs index aeb4bea..3aa3552 100644 --- a/Adaptation/Shared/Test.cs +++ b/Adaptation/Shared/Test.cs @@ -21,7 +21,7 @@ public enum Test Denton = 9, DiffusionLength = 45, GRATXTCenter = 51, - GRATXTEdge = 52, //Largest + GRATXTEdge = 52, GrowthRateXML = 50, Hall = 10, HgCV = 23, @@ -38,6 +38,7 @@ public enum Test RPMPLRatio = 17, RPMXY = 15, SP1 = 8, + SRP2100 = 53, //Largest Tencor = 7, UV = 35, VerificationLehighton = 14, diff --git a/Adaptation/_Tests/CreateSelfDescription/Staging/v2.49.0/MET08DDUPSP1TBI.cs b/Adaptation/_Tests/CreateSelfDescription/Staging/v2.49.0/MET08DDUPSP1TBI.cs index fa5cca4..efd7653 100644 --- a/Adaptation/_Tests/CreateSelfDescription/Staging/v2.49.0/MET08DDUPSP1TBI.cs +++ b/Adaptation/_Tests/CreateSelfDescription/Staging/v2.49.0/MET08DDUPSP1TBI.cs @@ -47,9 +47,7 @@ public class MET08DDUPSP1TBI : EAFLoggingUnitTesting EAFLoggingUnitTesting?.Dispose(); } -#if DEBUG [Ignore] -#endif [TestMethod] public void Staging__v2_49_0__MET08DDUPSP1TBI__MoveMatchingFiles() { @@ -60,9 +58,7 @@ public class MET08DDUPSP1TBI : EAFLoggingUnitTesting EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit")); } -#if DEBUG [Ignore] -#endif [TestMethod] public void Staging__v2_49_0__MET08DDUPSP1TBI__OpenInsightMetrologyViewer() { @@ -73,9 +69,7 @@ public class MET08DDUPSP1TBI : EAFLoggingUnitTesting EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit")); } -#if DEBUG [Ignore] -#endif [TestMethod] public void Staging__v2_49_0__MET08DDUPSP1TBI__IQSSi() { @@ -86,9 +80,7 @@ public class MET08DDUPSP1TBI : EAFLoggingUnitTesting EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit")); } -#if DEBUG [Ignore] -#endif [TestMethod] public void Staging__v2_49_0__MET08DDUPSP1TBI__OpenInsight() { @@ -99,9 +91,7 @@ public class MET08DDUPSP1TBI : EAFLoggingUnitTesting EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit")); } -#if DEBUG [Ignore] -#endif [TestMethod] public void Staging__v2_49_0__MET08DDUPSP1TBI__OpenInsightMetrologyViewerAttachments() { @@ -112,9 +102,7 @@ public class MET08DDUPSP1TBI : EAFLoggingUnitTesting EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit")); } -#if DEBUG [Ignore] -#endif [TestMethod] public void Staging__v2_49_0__MET08DDUPSP1TBI__APC() { @@ -125,9 +113,7 @@ public class MET08DDUPSP1TBI : EAFLoggingUnitTesting EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit")); } -#if DEBUG [Ignore] -#endif [TestMethod] public void Staging__v2_49_0__MET08DDUPSP1TBI__SPaCe() { @@ -138,9 +124,7 @@ public class MET08DDUPSP1TBI : EAFLoggingUnitTesting EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit")); } -#if DEBUG [Ignore] -#endif [TestMethod] public void Staging__v2_49_0__MET08DDUPSP1TBI__Processed() { @@ -151,9 +135,7 @@ public class MET08DDUPSP1TBI : EAFLoggingUnitTesting EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit")); } -#if DEBUG [Ignore] -#endif [TestMethod] public void Staging__v2_49_0__MET08DDUPSP1TBI__Archive() { @@ -164,9 +146,7 @@ public class MET08DDUPSP1TBI : EAFLoggingUnitTesting EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit")); } -#if DEBUG [Ignore] -#endif [TestMethod] public void Staging__v2_49_0__MET08DDUPSP1TBI__Dummy() { diff --git a/Adaptation/_Tests/CreateSelfDescription/Staging/v2.49.0/SP101.cs b/Adaptation/_Tests/CreateSelfDescription/Staging/v2.49.0/SP101.cs index 0f6f8a9..ceea6dc 100644 --- a/Adaptation/_Tests/CreateSelfDescription/Staging/v2.49.0/SP101.cs +++ b/Adaptation/_Tests/CreateSelfDescription/Staging/v2.49.0/SP101.cs @@ -47,9 +47,7 @@ public class SP101 : EAFLoggingUnitTesting EAFLoggingUnitTesting?.Dispose(); } -#if DEBUG [Ignore] -#endif [TestMethod] public void Staging__v2_49_0__SP101__txt() { diff --git a/Adaptation/_Tests/CreateSelfDescription/Staging/v2.49.2/MET08DDUPSP1TBI.cs b/Adaptation/_Tests/CreateSelfDescription/Staging/v2.49.2/MET08DDUPSP1TBI.cs new file mode 100644 index 0000000..5caee04 --- /dev/null +++ b/Adaptation/_Tests/CreateSelfDescription/Staging/v2.49.2/MET08DDUPSP1TBI.cs @@ -0,0 +1,180 @@ +using Adaptation._Tests.Shared; +using Microsoft.Extensions.Logging; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using System; +using System.Diagnostics; +using System.IO; +using System.Reflection; + +namespace Adaptation._Tests.CreateSelfDescription.Staging.v2_49_2; + +[TestClass] +public class MET08DDUPSP1TBI : EAFLoggingUnitTesting +{ + +#pragma warning disable CA2254 +#pragma warning disable IDE0060 + + internal static string DummyRoot { get; private set; } + internal static MET08DDUPSP1TBI EAFLoggingUnitTesting { get; private set; } + + static MET08DDUPSP1TBI() => DummyRoot = @"\\messv02ecc1.ec.local\EC_Characterization_Si\Dummy"; + + public MET08DDUPSP1TBI() : base(DummyRoot, testContext: null, declaringType: null, skipEquipmentDictionary: false) + { + if (EAFLoggingUnitTesting is null) + throw new Exception(); + } + + public MET08DDUPSP1TBI(TestContext testContext) : base(DummyRoot, testContext, new StackFrame().GetMethod().DeclaringType, skipEquipmentDictionary: false) + { + } + + [ClassInitialize] + public static void ClassInitialize(TestContext testContext) + { + EAFLoggingUnitTesting ??= new MET08DDUPSP1TBI(testContext); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(testContext.TestName, " - ClassInitialize")); + string[] fileNameAndText = EAFLoggingUnitTesting.AdaptationTesting.GetCSharpText(testContext.TestName); + File.WriteAllText(fileNameAndText[0], fileNameAndText[1]); + File.WriteAllText(fileNameAndText[2], fileNameAndText[3]); + } + + [ClassCleanup()] + public static void ClassCleanup() + { + EAFLoggingUnitTesting?.Logger?.LogInformation("Cleanup"); + EAFLoggingUnitTesting?.Dispose(); + } + +#if DEBUG + [Ignore] +#endif + [TestMethod] + public void Staging__v2_49_2__MET08DDUPSP1TBI__MoveMatchingFiles() + { + string check = "*.pdsf"; + MethodBase methodBase = new StackFrame().GetMethod(); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration")); + _ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit")); + } + +#if DEBUG + [Ignore] +#endif + [TestMethod] + public void Staging__v2_49_2__MET08DDUPSP1TBI__OpenInsightMetrologyViewer() + { + string check = "*.pdsf"; + MethodBase methodBase = new StackFrame().GetMethod(); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration")); + _ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit")); + } + +#if DEBUG + [Ignore] +#endif + [TestMethod] + public void Staging__v2_49_2__MET08DDUPSP1TBI__IQSSi() + { + string check = "*.pdsf"; + MethodBase methodBase = new StackFrame().GetMethod(); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration")); + _ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit")); + } + +#if DEBUG + [Ignore] +#endif + [TestMethod] + public void Staging__v2_49_2__MET08DDUPSP1TBI__OpenInsight() + { + string check = "*.pdsf"; + MethodBase methodBase = new StackFrame().GetMethod(); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration")); + _ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit")); + } + +#if DEBUG + [Ignore] +#endif + [TestMethod] + public void Staging__v2_49_2__MET08DDUPSP1TBI__OpenInsightMetrologyViewerAttachments() + { + string check = "*.pdsf"; + MethodBase methodBase = new StackFrame().GetMethod(); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration")); + _ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit")); + } + +#if DEBUG + [Ignore] +#endif + [TestMethod] + public void Staging__v2_49_2__MET08DDUPSP1TBI__APC() + { + string check = "*.pdsf"; + MethodBase methodBase = new StackFrame().GetMethod(); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration")); + _ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit")); + } + +#if DEBUG + [Ignore] +#endif + [TestMethod] + public void Staging__v2_49_2__MET08DDUPSP1TBI__SPaCe() + { + string check = "*.pdsf"; + MethodBase methodBase = new StackFrame().GetMethod(); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration")); + _ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit")); + } + +#if DEBUG + [Ignore] +#endif + [TestMethod] + public void Staging__v2_49_2__MET08DDUPSP1TBI__Processed() + { + string check = "*.pdsf"; + MethodBase methodBase = new StackFrame().GetMethod(); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration")); + _ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit")); + } + +#if DEBUG + [Ignore] +#endif + [TestMethod] + public void Staging__v2_49_2__MET08DDUPSP1TBI__Archive() + { + string check = "*.pdsf"; + MethodBase methodBase = new StackFrame().GetMethod(); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration")); + _ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit")); + } + +#if DEBUG + [Ignore] +#endif + [TestMethod] + public void Staging__v2_49_2__MET08DDUPSP1TBI__Dummy() + { + string check = "637400748000000000.zip"; + MethodBase methodBase = new StackFrame().GetMethod(); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration")); + _ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit")); + } + +} \ No newline at end of file diff --git a/Adaptation/_Tests/CreateSelfDescription/Staging/v2.49.2/SP101.cs b/Adaptation/_Tests/CreateSelfDescription/Staging/v2.49.2/SP101.cs new file mode 100644 index 0000000..a543d80 --- /dev/null +++ b/Adaptation/_Tests/CreateSelfDescription/Staging/v2.49.2/SP101.cs @@ -0,0 +1,63 @@ +using Adaptation._Tests.Shared; +using Microsoft.Extensions.Logging; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using System; +using System.Diagnostics; +using System.IO; +using System.Reflection; + +namespace Adaptation._Tests.CreateSelfDescription.Staging.v2_49_2; + +[TestClass] +public class SP101 : EAFLoggingUnitTesting +{ + +#pragma warning disable CA2254 +#pragma warning disable IDE0060 + + internal static string DummyRoot { get; private set; } + internal static SP101 EAFLoggingUnitTesting { get; private set; } + + static SP101() => DummyRoot = @"\\messv02ecc1.ec.local\EC_Characterization_Si\Dummy"; + + public SP101() : base(DummyRoot, testContext: null, declaringType: null, skipEquipmentDictionary: false) + { + if (EAFLoggingUnitTesting is null) + throw new Exception(); + } + + public SP101(TestContext testContext) : base(DummyRoot, testContext, new StackFrame().GetMethod().DeclaringType, skipEquipmentDictionary: false) + { + } + + [ClassInitialize] + public static void ClassInitialize(TestContext testContext) + { + EAFLoggingUnitTesting ??= new SP101(testContext); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(testContext.TestName, " - ClassInitialize")); + string[] fileNameAndText = EAFLoggingUnitTesting.AdaptationTesting.GetCSharpText(testContext.TestName); + File.WriteAllText(fileNameAndText[0], fileNameAndText[1]); + File.WriteAllText(fileNameAndText[2], fileNameAndText[3]); + } + + [ClassCleanup()] + public static void ClassCleanup() + { + EAFLoggingUnitTesting?.Logger?.LogInformation("Cleanup"); + EAFLoggingUnitTesting?.Dispose(); + } + +#if DEBUG + [Ignore] +#endif + [TestMethod] + public void Staging__v2_49_2__SP101__txt() + { + string check = "*.txt"; + MethodBase methodBase = new StackFrame().GetMethod(); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration")); + _ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit")); + } + +} \ No newline at end of file diff --git a/Adaptation/_Tests/Extract/Staging/v2.49.0/MET08DDUPSP1TBI.cs b/Adaptation/_Tests/Extract/Staging/v2.49.0/MET08DDUPSP1TBI.cs index 5bd8f0c..bebd054 100644 --- a/Adaptation/_Tests/Extract/Staging/v2.49.0/MET08DDUPSP1TBI.cs +++ b/Adaptation/_Tests/Extract/Staging/v2.49.0/MET08DDUPSP1TBI.cs @@ -22,15 +22,11 @@ public class MET08DDUPSP1TBI _MET08DDUPSP1TBI = CreateSelfDescription.Staging.v2_49_0.MET08DDUPSP1TBI.EAFLoggingUnitTesting; } -#if DEBUG [Ignore] -#endif [TestMethod] public void Staging__v2_49_0__MET08DDUPSP1TBI__MoveMatchingFiles() => _MET08DDUPSP1TBI.Staging__v2_49_0__MET08DDUPSP1TBI__MoveMatchingFiles(); -#if DEBUG [Ignore] -#endif [TestMethod] public void Staging__v2_49_0__MET08DDUPSP1TBI__MoveMatchingFiles637955319879801344__Normal() { @@ -44,27 +40,19 @@ public class MET08DDUPSP1TBI _ = Shared.AdaptationTesting.ReExtractCompareUpdatePassDirectory(variables, fileRead, logistics, validatePDSF); } -#if DEBUG [Ignore] -#endif [TestMethod] public void Staging__v2_49_0__MET08DDUPSP1TBI__OpenInsightMetrologyViewer() => _MET08DDUPSP1TBI.Staging__v2_49_0__MET08DDUPSP1TBI__OpenInsightMetrologyViewer(); -#if DEBUG [Ignore] -#endif [TestMethod] public void Staging__v2_49_0__MET08DDUPSP1TBI__IQSSi() => _MET08DDUPSP1TBI.Staging__v2_49_0__MET08DDUPSP1TBI__IQSSi(); -#if DEBUG [Ignore] -#endif [TestMethod] public void Staging__v2_49_0__MET08DDUPSP1TBI__OpenInsight() => _MET08DDUPSP1TBI.Staging__v2_49_0__MET08DDUPSP1TBI__OpenInsight(); -#if DEBUG [Ignore] -#endif [TestMethod] public void Staging__v2_49_0__MET08DDUPSP1TBI__OpenInsight638052814829645888__IqsSql() { @@ -77,39 +65,27 @@ public class MET08DDUPSP1TBI _ = Shared.AdaptationTesting.ReExtractCompareUpdatePassDirectory(variables, fileRead, logistics); } -#if DEBUG [Ignore] -#endif [TestMethod] public void Staging__v2_49_0__MET08DDUPSP1TBI__OpenInsightMetrologyViewerAttachments() => _MET08DDUPSP1TBI.Staging__v2_49_0__MET08DDUPSP1TBI__OpenInsightMetrologyViewerAttachments(); -#if DEBUG [Ignore] -#endif [TestMethod] public void Staging__v2_49_0__MET08DDUPSP1TBI__APC() => _MET08DDUPSP1TBI.Staging__v2_49_0__MET08DDUPSP1TBI__APC(); -#if DEBUG [Ignore] -#endif [TestMethod] public void Staging__v2_49_0__MET08DDUPSP1TBI__SPaCe() => _MET08DDUPSP1TBI.Staging__v2_49_0__MET08DDUPSP1TBI__SPaCe(); -#if DEBUG [Ignore] -#endif [TestMethod] public void Staging__v2_49_0__MET08DDUPSP1TBI__Processed() => _MET08DDUPSP1TBI.Staging__v2_49_0__MET08DDUPSP1TBI__Processed(); -#if DEBUG [Ignore] -#endif [TestMethod] public void Staging__v2_49_0__MET08DDUPSP1TBI__Archive() => _MET08DDUPSP1TBI.Staging__v2_49_0__MET08DDUPSP1TBI__Archive(); -#if DEBUG [Ignore] -#endif [TestMethod] public void Staging__v2_49_0__MET08DDUPSP1TBI__Dummy() => _MET08DDUPSP1TBI.Staging__v2_49_0__MET08DDUPSP1TBI__Dummy(); diff --git a/Adaptation/_Tests/Extract/Staging/v2.49.0/SP101.cs b/Adaptation/_Tests/Extract/Staging/v2.49.0/SP101.cs index 1d58331..a525a08 100644 --- a/Adaptation/_Tests/Extract/Staging/v2.49.0/SP101.cs +++ b/Adaptation/_Tests/Extract/Staging/v2.49.0/SP101.cs @@ -22,15 +22,11 @@ public class SP101 _SP101 = CreateSelfDescription.Staging.v2_49_0.SP101.EAFLoggingUnitTesting; } -#if DEBUG [Ignore] -#endif [TestMethod] public void Staging__v2_49_0__SP101__txt() => _SP101.Staging__v2_49_0__SP101__txt(); -#if DEBUG [Ignore] -#endif [TestMethod] public void Staging__v2_49_0__SP101__txt637955319879801344__Normal() { diff --git a/Adaptation/_Tests/Extract/Staging/v2.49.2/MET08DDUPSP1TBI.cs b/Adaptation/_Tests/Extract/Staging/v2.49.2/MET08DDUPSP1TBI.cs new file mode 100644 index 0000000..63cf44a --- /dev/null +++ b/Adaptation/_Tests/Extract/Staging/v2.49.2/MET08DDUPSP1TBI.cs @@ -0,0 +1,116 @@ +using Adaptation.Shared; +using Adaptation.Shared.Methods; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using System.Diagnostics; +using System.Reflection; + +namespace Adaptation._Tests.Extract.Staging.v2_49_2; + +[TestClass] +public class MET08DDUPSP1TBI +{ + +#pragma warning disable CA2254 +#pragma warning disable IDE0060 + + private static CreateSelfDescription.Staging.v2_49_2.MET08DDUPSP1TBI _MET08DDUPSP1TBI; + + [ClassInitialize] + public static void ClassInitialize(TestContext testContext) + { + CreateSelfDescription.Staging.v2_49_2.MET08DDUPSP1TBI.ClassInitialize(testContext); + _MET08DDUPSP1TBI = CreateSelfDescription.Staging.v2_49_2.MET08DDUPSP1TBI.EAFLoggingUnitTesting; + } + +#if DEBUG + [Ignore] +#endif + [TestMethod] + public void Staging__v2_49_2__MET08DDUPSP1TBI__MoveMatchingFiles() => _MET08DDUPSP1TBI.Staging__v2_49_2__MET08DDUPSP1TBI__MoveMatchingFiles(); + +#if DEBUG + [Ignore] +#endif + [TestMethod] + public void Staging__v2_49_2__MET08DDUPSP1TBI__MoveMatchingFiles637955319879801344__Normal() + { + string check = "*.pdsf"; + bool validatePDSF = false; + MethodBase methodBase = new StackFrame().GetMethod(); + _MET08DDUPSP1TBI.Staging__v2_49_2__MET08DDUPSP1TBI__MoveMatchingFiles(); + string[] variables = _MET08DDUPSP1TBI.AdaptationTesting.GetVariables(methodBase, check, validatePDSF); + IFileRead fileRead = _MET08DDUPSP1TBI.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false); + Logistics logistics = new(fileRead); + _ = Shared.AdaptationTesting.ReExtractCompareUpdatePassDirectory(variables, fileRead, logistics, validatePDSF); + } + +#if DEBUG + [Ignore] +#endif + [TestMethod] + public void Staging__v2_49_2__MET08DDUPSP1TBI__OpenInsightMetrologyViewer() => _MET08DDUPSP1TBI.Staging__v2_49_2__MET08DDUPSP1TBI__OpenInsightMetrologyViewer(); + +#if DEBUG + [Ignore] +#endif + [TestMethod] + public void Staging__v2_49_2__MET08DDUPSP1TBI__IQSSi() => _MET08DDUPSP1TBI.Staging__v2_49_2__MET08DDUPSP1TBI__IQSSi(); + +#if DEBUG + [Ignore] +#endif + [TestMethod] + public void Staging__v2_49_2__MET08DDUPSP1TBI__OpenInsight() => _MET08DDUPSP1TBI.Staging__v2_49_2__MET08DDUPSP1TBI__OpenInsight(); + +#if DEBUG + [Ignore] +#endif + [TestMethod] + public void Staging__v2_49_2__MET08DDUPSP1TBI__OpenInsight638052814829645888__IqsSql() + { + string check = "*.pdsf"; + MethodBase methodBase = new StackFrame().GetMethod(); + _MET08DDUPSP1TBI.Staging__v2_49_2__MET08DDUPSP1TBI__OpenInsight(); + string[] variables = _MET08DDUPSP1TBI.AdaptationTesting.GetVariables(methodBase, check, validatePDSF: false); + IFileRead fileRead = _MET08DDUPSP1TBI.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false); + Logistics logistics = new(fileRead); + _ = Shared.AdaptationTesting.ReExtractCompareUpdatePassDirectory(variables, fileRead, logistics); + } + +#if DEBUG + [Ignore] +#endif + [TestMethod] + public void Staging__v2_49_2__MET08DDUPSP1TBI__OpenInsightMetrologyViewerAttachments() => _MET08DDUPSP1TBI.Staging__v2_49_2__MET08DDUPSP1TBI__OpenInsightMetrologyViewerAttachments(); + +#if DEBUG + [Ignore] +#endif + [TestMethod] + public void Staging__v2_49_2__MET08DDUPSP1TBI__APC() => _MET08DDUPSP1TBI.Staging__v2_49_2__MET08DDUPSP1TBI__APC(); + +#if DEBUG + [Ignore] +#endif + [TestMethod] + public void Staging__v2_49_2__MET08DDUPSP1TBI__SPaCe() => _MET08DDUPSP1TBI.Staging__v2_49_2__MET08DDUPSP1TBI__SPaCe(); + +#if DEBUG + [Ignore] +#endif + [TestMethod] + public void Staging__v2_49_2__MET08DDUPSP1TBI__Processed() => _MET08DDUPSP1TBI.Staging__v2_49_2__MET08DDUPSP1TBI__Processed(); + +#if DEBUG + [Ignore] +#endif + [TestMethod] + public void Staging__v2_49_2__MET08DDUPSP1TBI__Archive() => _MET08DDUPSP1TBI.Staging__v2_49_2__MET08DDUPSP1TBI__Archive(); + +#if DEBUG + [Ignore] +#endif + [TestMethod] + public void Staging__v2_49_2__MET08DDUPSP1TBI__Dummy() => _MET08DDUPSP1TBI.Staging__v2_49_2__MET08DDUPSP1TBI__Dummy(); + +} \ No newline at end of file diff --git a/Adaptation/_Tests/Extract/Staging/v2.49.2/SP101.cs b/Adaptation/_Tests/Extract/Staging/v2.49.2/SP101.cs new file mode 100644 index 0000000..a008e8d --- /dev/null +++ b/Adaptation/_Tests/Extract/Staging/v2.49.2/SP101.cs @@ -0,0 +1,47 @@ +using Adaptation.Shared; +using Adaptation.Shared.Methods; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using System.Diagnostics; +using System.Reflection; + +namespace Adaptation._Tests.Extract.Staging.v2_49_2; + +[TestClass] +public class SP101 +{ + +#pragma warning disable CA2254 +#pragma warning disable IDE0060 + + private static CreateSelfDescription.Staging.v2_49_2.SP101 _SP101; + + [ClassInitialize] + public static void ClassInitialize(TestContext testContext) + { + CreateSelfDescription.Staging.v2_49_2.SP101.ClassInitialize(testContext); + _SP101 = CreateSelfDescription.Staging.v2_49_2.SP101.EAFLoggingUnitTesting; + } + +#if DEBUG + [Ignore] +#endif + [TestMethod] + public void Staging__v2_49_2__SP101__txt() => _SP101.Staging__v2_49_2__SP101__txt(); + +#if DEBUG + [Ignore] +#endif + [TestMethod] + public void Staging__v2_49_2__SP101__txt637955319879801344__Normal() + { + string check = "*.txt"; + bool validatePDSF = false; + _SP101.Staging__v2_49_2__SP101__txt(); + MethodBase methodBase = new StackFrame().GetMethod(); + string[] variables = _SP101.AdaptationTesting.GetVariables(methodBase, check, validatePDSF); + IFileRead fileRead = _SP101.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false); + Logistics logistics = new(fileRead); + _ = Shared.AdaptationTesting.ReExtractCompareUpdatePassDirectory(variables, fileRead, logistics, validatePDSF); + } + +} \ No newline at end of file diff --git a/Adaptation/_Tests/Static/Job.cs b/Adaptation/_Tests/Static/Job.cs index d1c521c..e03ea03 100644 --- a/Adaptation/_Tests/Static/Job.cs +++ b/Adaptation/_Tests/Static/Job.cs @@ -43,30 +43,37 @@ public class Job : LoggingUnitTesting, IDisposable catch (Exception) { } } + [Ignore] [TestMethod] public void TestJobA() { FileHandlers.TIBCO.Transport.Job job; MethodBase methodBase = new StackFrame().GetMethod(); + string metrologyFileShare = @"\\messv02ecc1.ec.local\EC_Metrology_Si\WorkMaterialOut\API"; LoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration")); string lsl2SQLConnectionString = "Data Source=10.95.128.28\\PROD1,53959;Initial Catalog=LSL2SQL;Persist Security Info=True;User ID=srpadmin;Password=0okm9ijn;"; - job = new(lsl2SQLConnectionString, string.Empty, "{\"Area\": \"Si\", \"EquipmentType\": \"MET08RESIMAPCDE\", \"MesEntity\": \"CDE4\", \"Sequence\": \"123456789\", \"MID\": \"12-123456-1234\", \"Recipe\": \"Recipe\"}"); + job = new(lsl2SQLConnectionString, metrologyFileShare, "{\"Area\": \"Si\", \"EquipmentType\": \"MET08RESIMAPCDE\", \"MesEntity\": \"CDE4\", \"Sequence\": \"123456789\", \"MID\": \"12-123456-1234\", \"Recipe\": \"Recipe\"}"); Assert.IsTrue(!string.IsNullOrEmpty(job.ProcessType)); // == "21"); Assert.IsTrue(job.LotName == "123456"); Assert.IsTrue(!string.IsNullOrEmpty(job.ProductName)); // == "4609"); - job = new(lsl2SQLConnectionString, string.Empty, "{\"Area\": \"Si\", \"EquipmentType\": \"MET08RESIMAPCDE\", \"MesEntity\": \"CDE4\", \"Sequence\": \"123456789\", \"MID\": \"-544481-\", \"Recipe\": \"Recipe\"}"); + job = new(lsl2SQLConnectionString, metrologyFileShare, "{\"Area\": \"Si\", \"EquipmentType\": \"MET08RESIMAPCDE\", \"MesEntity\": \"CDE4\", \"Sequence\": \"123456789\", \"MID\": \"-544481-\", \"Recipe\": \"Recipe\"}"); Assert.IsTrue(!string.IsNullOrEmpty(job.ProcessType)); // == "51"); Assert.IsTrue(job.LotName == "544481"); Assert.IsTrue(!string.IsNullOrEmpty(job.ProductName)); // == "5158"); - job = new(lsl2SQLConnectionString, string.Empty, "{\"Area\": \"Si\", \"EquipmentType\": \"MET08RESIMAPCDE\", \"MesEntity\": \"CDE4\", \"Sequence\": \"123456789\", \"MID\": \"00-544481-0000\", \"Recipe\": \"Recipe\"}"); + job = new(lsl2SQLConnectionString, metrologyFileShare, "{\"Area\": \"Si\", \"EquipmentType\": \"MET08RESIMAPCDE\", \"MesEntity\": \"CDE4\", \"Sequence\": \"123456789\", \"MID\": \"00-544481-0000\", \"Recipe\": \"Recipe\"}"); Assert.IsTrue(!string.IsNullOrEmpty(job.ProcessType)); // == "51"); Assert.IsTrue(job.LotName == "544481"); Assert.IsTrue(!string.IsNullOrEmpty(job.ProductName)); // == "5158"); - job = new(lsl2SQLConnectionString, string.Empty, "{\"Area\": \"Si\", \"EquipmentType\": \"MET08RESIMAPCDE\", \"MesEntity\": \"CDE4\", \"Sequence\": \"123456789\", \"MID\": \"37\", \"Recipe\": \"Recipe\"}"); + job = new(lsl2SQLConnectionString, metrologyFileShare, "{\"Area\": \"Si\", \"EquipmentType\": \"MET08RESIMAPCDE\", \"MesEntity\": \"CDE4\", \"Sequence\": \"123456789\", \"MID\": \"37\", \"Recipe\": \"Recipe\"}"); Assert.IsTrue(job.ProcessType == "37"); Assert.IsTrue(!string.IsNullOrEmpty(job.LotName)); // == "549918"); Assert.IsTrue(!string.IsNullOrEmpty(job.ProductName)); // == "5101"); - job = new(lsl2SQLConnectionString, string.Empty, "{\"Area\": \"Si\", \"EquipmentType\": \"MET08RESIMAPCDE\", \"MesEntity\": \"CDE4\", \"Sequence\": \"123456789\", \"MID\": \"00-o171308.1.51-0000\", \"Recipe\": \"Recipe\", \"Slot\": \"11\"}"); + job = new(lsl2SQLConnectionString, metrologyFileShare, "{\"Area\": \"Si\", \"EquipmentType\": \"MET08RESIMAPCDE\", \"MesEntity\": \"CDE4\", \"Sequence\": \"123456789\", \"MID\": \"00-o171308.1.51-0000\", \"Recipe\": \"Recipe\", \"Slot\": \"11\"}"); + Assert.IsTrue(!string.IsNullOrEmpty(job.ProcessType)); // == "54"); + Assert.IsTrue(!string.IsNullOrEmpty(job.LotName)); // == "547000"); + Assert.IsTrue(!string.IsNullOrEmpty(job.ProductName)); // == "4445"); + LoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit")); + job = new(lsl2SQLConnectionString, metrologyFileShare, "{\"Area\": \"Si\", \"EquipmentType\": \"MET08RESIMAPCDE\", \"MesEntity\": \"CDE5\", \"Sequence\": \"638163023363575829\", \"MID\": \"B48\", \"Recipe\": \"lsl_6in \"}"); Assert.IsTrue(!string.IsNullOrEmpty(job.ProcessType)); // == "54"); Assert.IsTrue(!string.IsNullOrEmpty(job.LotName)); // == "547000"); Assert.IsTrue(!string.IsNullOrEmpty(job.ProductName)); // == "4445"); @@ -74,15 +81,13 @@ public class Job : LoggingUnitTesting, IDisposable NonThrowTryCatch(); } -#if DEBUG [Ignore] -#endif [TestMethod] public void TestJobB() { MethodBase methodBase = new StackFrame().GetMethod(); FileHandlers.TIBCO.Transport.Job job; - string metrologyFileShare = "\\\\messv02ecc1.ec.local\\EC_Metrology_Si"; + string metrologyFileShare = @"\\messv02ecc1.ec.local\EC_Metrology_Si\WorkMaterialOut\API"; LoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration")); string lsl2SQLConnectionString = "Data Source=10.95.128.28\\PROD1,53959;Initial Catalog=LSL2SQL;Persist Security Info=True;User ID=srpadmin;Password=0okm9ijn;"; job = new(lsl2SQLConnectionString, metrologyFileShare, "{\"Area\": \"Si\", \"EquipmentType\": \"MET08RESIMAPCDE\", \"MesEntity\": \"CDE4\", \"Sequence\": \"123456789\", \"MID\": \"P1234\", \"Recipe\": \"Recipe\"}"); diff --git a/Adaptation/_Tests/Static/MET08DDUPSP1TBI.cs b/Adaptation/_Tests/Static/MET08DDUPSP1TBI.cs index 588b7c1..1651cff 100644 --- a/Adaptation/_Tests/Static/MET08DDUPSP1TBI.cs +++ b/Adaptation/_Tests/Static/MET08DDUPSP1TBI.cs @@ -45,7 +45,9 @@ public class MET08DDUPSP1TBI : LoggingUnitTesting, IDisposable Assert.IsTrue(dateTime.ToString("M/d/yyyy h:mm:ss tt") == dateTime.ToString()); } +#if DEBUG [Ignore] +#endif [TestMethod] public void Staging() { @@ -53,7 +55,7 @@ public class MET08DDUPSP1TBI : LoggingUnitTesting, IDisposable StringBuilder results = new(); (string cellInstanceName, string cellInstanceVersionName)[] collection = new (string, string)[] { - new("MET08DDUPSP1TBI", "v2.49.0"), + new("MET08DDUPSP1TBI", "v2.49.2"), }; string staging = "http://mestsa07ec.ec.local:9003/CellInstanceServiceV2"; Shared.PasteSpecialXml.EAF.XML.API.CellInstance.CellInstanceVersion cellInstanceVersion; diff --git a/Adaptation/_Tests/Static/txt.cs b/Adaptation/_Tests/Static/txt.cs index 128c432..bbe13ce 100644 --- a/Adaptation/_Tests/Static/txt.cs +++ b/Adaptation/_Tests/Static/txt.cs @@ -38,6 +38,13 @@ public class TXT : LoggingUnitTesting, IDisposable LoggingUnitTesting?.Dispose(); } + private static void NonThrowTryCatch() + { + try + { throw new Exception(); } + catch (Exception) { } + } + [TestMethod] public void TestDateTime() { @@ -177,10 +184,10 @@ public class TXT : LoggingUnitTesting, IDisposable Assert.IsTrue(descriptor.Reactor is "75"); Assert.IsTrue(string.IsNullOrEmpty(descriptor.Zone)); Assert.IsTrue(string.IsNullOrEmpty(descriptor.Employee)); - descriptor = FileHandlers.txt.ProcessData.GetDescriptor("p5801"); - Assert.IsTrue(descriptor.Lot == "P5801"); - descriptor = FileHandlers.txt.ProcessData.GetDescriptor("P5801"); - Assert.IsTrue(descriptor.Lot == "P5801"); + descriptor = FileHandlers.txt.ProcessData.GetDescriptor("B48"); + Assert.IsTrue(descriptor.Lot == "B48"); + descriptor = FileHandlers.txt.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)); @@ -188,9 +195,12 @@ public class TXT : LoggingUnitTesting, IDisposable Assert.IsTrue(string.IsNullOrEmpty(descriptor.Zone)); Assert.IsTrue(string.IsNullOrEmpty(descriptor.Employee)); LoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit")); + NonThrowTryCatch(); } +#if DEBUG [Ignore] +#endif [TestMethod] public void Staging() { @@ -198,8 +208,8 @@ public class TXT : LoggingUnitTesting, IDisposable StringBuilder results = new(); (string cellInstanceName, string cellInstanceVersionName)[] collection = new (string, string)[] { - new("SP101", "v2.49.0"), - new("SP101-EQPT", "v2.49.0"), + new("SP101", "v2.49.2"), + new("SP101-EQPT", "v2.47.0"), }; string staging = "http://mestsa07ec.ec.local:9003/CellInstanceServiceV2"; Shared.PasteSpecialXml.EAF.XML.API.CellInstance.CellInstanceVersion cellInstanceVersion; diff --git a/FileHandlers/FileRead.cs b/FileHandlers/FileRead.cs index 7ab029c..cc24962 100644 --- a/FileHandlers/FileRead.cs +++ b/FileHandlers/FileRead.cs @@ -165,7 +165,7 @@ public partial class FileRead : FileReaderHandler, ISMTP Equipment.SelfDescriptionBuilder.AddParameterTypeDefinition(structuredType); } if (!parameterTypeDefinitions.ContainsKey(jsonProperty.Value.ValueKind)) - throw new Exception(string.Concat('{', jsonProperty.Value.ValueKind, "} is not mapped!")); + throw new Exception(string.Concat('<', jsonProperty.Name, "> {", jsonProperty.Value.ValueKind, "} is not mapped!")); } foreach (JsonProperty jsonProperty in jsonProperties) { diff --git a/MET08DDUPSP1TBI.csproj b/MET08DDUPSP1TBI.csproj index 08e6139..0cce3a4 100644 --- a/MET08DDUPSP1TBI.csproj +++ b/MET08DDUPSP1TBI.csproj @@ -172,7 +172,7 @@ - 2.49.0 + 2.49.2 6.0.3 diff --git a/Properties/AssemblyInfo.cs b/Properties/AssemblyInfo.cs index 3057844..503dda7 100644 --- a/Properties/AssemblyInfo.cs +++ b/Properties/AssemblyInfo.cs @@ -32,5 +32,5 @@ using System.Runtime.InteropServices; // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("2.49.0.0")] -[assembly: AssemblyFileVersion("2.49.0.0")] +[assembly: AssemblyVersion("2.49.2.0")] +[assembly: AssemblyFileVersion("2.49.2.0")]