From 6b6ccb6a42e3720a5cec0c967acf54846e33ee50 Mon Sep 17 00:00:00 2001 From: Mike Phares Date: Thu, 8 Aug 2024 12:45:35 -0700 Subject: [PATCH] Artifactory Switching to nginx download Bug fix - GetHeaderId --- Adaptation/.vscode/tasks.json | 6 - .../CellInstanceConnectionName.cs | 1 + .../FileHandlers/DownloadTXTFile/FileRead.cs | 292 ++++++++++++++++++ .../DownloadTXTFile/NginxFileSystem.cs | 23 ++ .../OpenInsightMetrologyViewer/WSRequest.cs | 4 +- .../FileRead.cs | 16 +- Adaptation/MET08THFTIRSTRATUS-Development.yml | 4 +- Adaptation/MET08THFTIRSTRATUS.Tests.csproj | 16 +- Adaptation/MET08THFTIRSTRATUS.yml | 4 +- Adaptation/Shared/Metrology/WS.cs | 24 +- .../Production/v2.56.0/BIORAD4-EQPT.cs | 63 ++++ .../Production/v2.56.0/BIORAD4.cs | 93 ++++++ .../Production/v2.56.0/BIORAD5-EQPT.cs | 63 ++++ .../Production/v2.56.0/BIORAD5.cs | 93 ++++++ .../Production/v2.56.0/MET08THFTIRSTRATUS.cs | 182 +++++++++++ .../Production/v2.56.0/BIORAD4-EQPT.cs | 44 +++ .../Extract/Production/v2.56.0/BIORAD4.cs | 195 ++++++++++++ .../Production/v2.56.0/BIORAD5-EQPT.cs | 27 ++ .../Extract/Production/v2.56.0/BIORAD5.cs | 114 +++++++ .../Production/v2.56.0/MET08THFTIRSTRATUS.cs | 148 +++++++++ MET08THFTIRSTRATUS.csproj | 8 +- Properties/AssemblyInfo.cs | 4 +- 22 files changed, 1386 insertions(+), 38 deletions(-) create mode 100644 Adaptation/FileHandlers/DownloadTXTFile/FileRead.cs create mode 100644 Adaptation/FileHandlers/DownloadTXTFile/NginxFileSystem.cs create mode 100644 Adaptation/_Tests/CreateSelfDescription/Production/v2.56.0/BIORAD4-EQPT.cs create mode 100644 Adaptation/_Tests/CreateSelfDescription/Production/v2.56.0/BIORAD4.cs create mode 100644 Adaptation/_Tests/CreateSelfDescription/Production/v2.56.0/BIORAD5-EQPT.cs create mode 100644 Adaptation/_Tests/CreateSelfDescription/Production/v2.56.0/BIORAD5.cs create mode 100644 Adaptation/_Tests/CreateSelfDescription/Production/v2.56.0/MET08THFTIRSTRATUS.cs create mode 100644 Adaptation/_Tests/Extract/Production/v2.56.0/BIORAD4-EQPT.cs create mode 100644 Adaptation/_Tests/Extract/Production/v2.56.0/BIORAD4.cs create mode 100644 Adaptation/_Tests/Extract/Production/v2.56.0/BIORAD5-EQPT.cs create mode 100644 Adaptation/_Tests/Extract/Production/v2.56.0/BIORAD5.cs create mode 100644 Adaptation/_Tests/Extract/Production/v2.56.0/MET08THFTIRSTRATUS.cs diff --git a/Adaptation/.vscode/tasks.json b/Adaptation/.vscode/tasks.json index 78155de..2f3375f 100644 --- a/Adaptation/.vscode/tasks.json +++ b/Adaptation/.vscode/tasks.json @@ -76,12 +76,6 @@ ], "problemMatcher": "$msCompile" }, - { - "label": "File-Folder-Helper AOT s M .Kanbn Tasks", - "type": "shell", - "command": "L:/DevOps/Mesa_FI/File-Folder-Helper/bin/Release/net8.0/win-x64/publish/File-Folder-Helper.exe s M T:/MET08THFTIRSTRATUS/06_SourceCode/MET08THFTIRSTRATUS/Adaptation -s T:/MET08THFTIRSTRATUS/06_SourceCode/MET08THFTIRSTRATUS/Adaptation/.kanbn/tasks", - "problemMatcher": [] - }, { "label": "Kanbn Console", "type": "npm", diff --git a/Adaptation/FileHandlers/CellInstanceConnectionName.cs b/Adaptation/FileHandlers/CellInstanceConnectionName.cs index 43d36b0..761a90f 100644 --- a/Adaptation/FileHandlers/CellInstanceConnectionName.cs +++ b/Adaptation/FileHandlers/CellInstanceConnectionName.cs @@ -15,6 +15,7 @@ public class CellInstanceConnectionName { nameof(APC) => new APC.FileRead(smtp, fileParameter, cellInstanceName, connectionCount, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted: connectionCount is null), nameof(Archive) => new Archive.FileRead(smtp, fileParameter, cellInstanceName, connectionCount, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted: connectionCount is null), + nameof(DownloadTXTFile) => new DownloadTXTFile.FileRead(smtp, fileParameter, cellInstanceName, connectionCount, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted: connectionCount is null), nameof(Dummy) => new Dummy.FileRead(smtp, fileParameter, cellInstanceName, connectionCount, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted: connectionCount is null), nameof(IQSSi) => new IQSSi.FileRead(smtp, fileParameter, cellInstanceName, connectionCount, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted: connectionCount is null), nameof(MoveMatchingFiles) => new MoveMatchingFiles.FileRead(smtp, fileParameter, cellInstanceName, connectionCount, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted: connectionCount is null), diff --git a/Adaptation/FileHandlers/DownloadTXTFile/FileRead.cs b/Adaptation/FileHandlers/DownloadTXTFile/FileRead.cs new file mode 100644 index 0000000..223d927 --- /dev/null +++ b/Adaptation/FileHandlers/DownloadTXTFile/FileRead.cs @@ -0,0 +1,292 @@ +using Adaptation.Eaf.Management.ConfigurationData.CellAutomation; +using Adaptation.Ifx.Eaf.EquipmentConnector.File.Configuration; +using Adaptation.Shared; +using Adaptation.Shared.Duplicator; +using Adaptation.Shared.Methods; +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Diagnostics; +using System.Globalization; +using System.IO; +using System.Linq; +using System.Net.Http; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; + +namespace Adaptation.FileHandlers.DownloadTXTFile; + +public class FileRead : Shared.FileRead, IFileRead +{ + + private readonly Timer _Timer; + private readonly HttpClient _HttpClient; + private readonly string _StaticFileServer; + + public FileRead(ISMTP smtp, Dictionary fileParameter, string cellInstanceName, int? connectionCount, string cellInstanceConnectionName, FileConnectorConfiguration fileConnectorConfiguration, string equipmentTypeName, string parameterizedModelObjectDefinitionType, IList modelObjectParameters, string equipmentDictionaryName, Dictionary> dummyRuns, Dictionary> staticRuns, bool useCyclicalForDescription, bool isEAFHosted) : + base(new Description(), false, smtp, fileParameter, cellInstanceName, connectionCount, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted: connectionCount is null) + { + _MinFileLength = 10; + _NullData = string.Empty; + _Logistics = new(this); + if (_FileParameter is null) + throw new Exception(cellInstanceConnectionName); + if (_ModelObjectParameterDefinitions is null) + throw new Exception(cellInstanceConnectionName); + if (_IsDuplicator) + throw new Exception(cellInstanceConnectionName); + _HttpClient = new(); + _StaticFileServer = GetPropertyValue(cellInstanceConnectionName, modelObjectParameters, string.Concat("CellInstance.", cellInstanceName, ".StaticFileServer")); + if (!Debugger.IsAttached && fileConnectorConfiguration.PreProcessingMode != FileConnectorConfiguration.PreProcessingModeEnum.Process) + _Timer = new Timer(Callback, null, (int)(fileConnectorConfiguration.FileScanningIntervalInSeconds * 1000), Timeout.Infinite); + else + { + _Timer = new Timer(Callback, null, Timeout.Infinite, Timeout.Infinite); + Callback(null); + } + } + + void IFileRead.Move(Tuple> extractResults, Exception exception) => Move(extractResults); + + void IFileRead.WaitForThread() => WaitForThread(thread: null, threadExceptions: null); + + string IFileRead.GetEventDescription() + { + string result = _Description.GetEventDescription(); + return result; + } + + List IFileRead.GetHeaderNames() + { + List results = _Description.GetHeaderNames(); + return results; + } + + string[] IFileRead.Move(Tuple> extractResults, string to, string from, string resolvedFileLocation, Exception exception) + { + string[] results = Move(extractResults, to, from, resolvedFileLocation, exception); + return results; + } + + JsonProperty[] IFileRead.GetDefault() + { + JsonProperty[] results = _Description.GetDefault(this, _Logistics); + return results; + } + + Dictionary IFileRead.GetDisplayNamesJsonElement() + { + Dictionary results = _Description.GetDisplayNamesJsonElement(this); + return results; + } + + List IFileRead.GetDescriptions(IFileRead fileRead, List tests, IProcessData processData) + { + List results = _Description.GetDescriptions(fileRead, _Logistics, tests, processData); + return results; + } + + Tuple> IFileRead.GetExtractResult(string reportFullPath, string eventName) + { + Tuple> results; + if (string.IsNullOrEmpty(eventName)) + throw new Exception(); + _ReportFullPath = reportFullPath; + DateTime dateTime = DateTime.Now; + results = GetExtractResult(reportFullPath, dateTime); + if (results.Item3 is null) + results = new Tuple>(results.Item1, Array.Empty(), JsonSerializer.Deserialize("[]"), results.Item4); + if (results.Item3.Length > 0 && _IsEAFHosted) + WritePDSF(this, results.Item3); + UpdateLastTicksDuration(DateTime.Now.Ticks - dateTime.Ticks); + return results; + } + + Tuple> IFileRead.ReExtract() + { + Tuple> results; + List headerNames = _Description.GetHeaderNames(); + Dictionary keyValuePairs = _Description.GetDisplayNamesJsonElement(this); + results = ReExtract(this, headerNames, keyValuePairs); + return results; + } + + private Tuple> GetExtractResult(string reportFullPath, DateTime dateTime) => throw new Exception(string.Concat("See ", nameof(Callback))); + + private static DateTime GetFileAgeThresholdDateTime(string fileAgeThreshold) + { + DateTime result = DateTime.Now; + string[] segments = fileAgeThreshold.Split(':'); + for (int i = 0; i < segments.Length; i++) + { + result = i switch + { + 0 => result.AddDays(double.Parse(segments[i]) * -1), + 1 => result.AddHours(double.Parse(segments[i]) * -1), + 2 => result.AddMinutes(double.Parse(segments[i]) * -1), + 3 => result.AddSeconds(double.Parse(segments[i]) * -1), + _ => throw new Exception(), + }; + } + return result; + } + + private static string[] GetValidWeeks(DateTime fileAgeThresholdDateTime) + { + DateTime dateTime = DateTime.Now; + Calendar calendar = new CultureInfo("en-US").Calendar; + string weekOfYear = $"{dateTime:yyyy}_Week_{calendar.GetWeekOfYear(dateTime, CalendarWeekRule.FirstDay, DayOfWeek.Sunday):00}"; + string lastWeekOfYear = $"{fileAgeThresholdDateTime:yyyy}_Week_{calendar.GetWeekOfYear(fileAgeThresholdDateTime, CalendarWeekRule.FirstDay, DayOfWeek.Sunday):00}"; + return new string[] { weekOfYear, lastWeekOfYear }.Distinct().ToArray(); + } + + private static string[] GetValidDays(DateTime fileAgeThresholdDateTime) + { + DateTime dateTime = DateTime.Now; + return new string[] { dateTime.ToString("yyyy-MM-dd"), fileAgeThresholdDateTime.ToString("yyyy-MM-dd") }.Distinct().ToArray(); + } + + private ReadOnlyCollection GetDayNginxFileSystemCollection(DateTime fileAgeThresholdDateTime, string week, string day, string dayUrl, NginxFileSystem[] dayNginxFileSystemCollection) + { + List results = new(); + DateTime dateTime; + string nginxFormat = "ddd, dd MMM yyyy HH:mm:ss zzz"; + foreach (NginxFileSystem dayNginxFileSystem in dayNginxFileSystemCollection) + { + if (!DateTime.TryParseExact(dayNginxFileSystem.MTime.Replace("GMT", "+00:00"), nginxFormat, CultureInfo.InvariantCulture, DateTimeStyles.None, out dateTime)) + continue; + if (dateTime < fileAgeThresholdDateTime) + continue; + results.Add(new( + Path.GetFullPath(Path.Combine(_FileConnectorConfiguration.TargetFileLocation, week, day, dayNginxFileSystem.Name)), + string.Concat(dayUrl, '/', dayNginxFileSystem.Name), + dateTime.ToString(), + dayNginxFileSystem.Size)); + } + return results.AsReadOnly(); + } + + private ReadOnlyCollection GetDayNginxFileSystemCollection(DateTime fileAgeThresholdDateTime) + { +#nullable enable + List results = new(); + string dayUrl; + string dayJson; + string weekJson; + string checkWeek; + Task task; + NginxFileSystem[]? dayNginxFileSystemCollection; + NginxFileSystem[]? weekNginxFileSystemCollection; + string[] days = GetValidDays(fileAgeThresholdDateTime); + string[] weeks = GetValidWeeks(fileAgeThresholdDateTime); + JsonSerializerOptions propertyNameCaseInsensitiveJsonSerializerOptions = new() { PropertyNameCaseInsensitive = true }; + foreach (string week in weeks) + { + checkWeek = string.Concat("http://", _StaticFileServer, '/', week); + task = _HttpClient.GetAsync(checkWeek); + task.Wait(); + if (!task.Result.IsSuccessStatusCode) + continue; + weekJson = _HttpClient.GetStringAsync(checkWeek).Result; + weekNginxFileSystemCollection = JsonSerializer.Deserialize(weekJson, propertyNameCaseInsensitiveJsonSerializerOptions); + if (weekNginxFileSystemCollection is null) + continue; + foreach (NginxFileSystem weekNginxFileSystem in weekNginxFileSystemCollection) + { + if (!(from l in days where weekNginxFileSystem.Name == l select false).Any()) + continue; + dayUrl = string.Concat(checkWeek, '/', weekNginxFileSystem.Name); + dayJson = _HttpClient.GetStringAsync(dayUrl).Result; + dayNginxFileSystemCollection = JsonSerializer.Deserialize(dayJson, propertyNameCaseInsensitiveJsonSerializerOptions); + if (dayNginxFileSystemCollection is null) + continue; + results.AddRange(GetDayNginxFileSystemCollection(fileAgeThresholdDateTime, week, weekNginxFileSystem.Name, dayUrl, dayNginxFileSystemCollection)); + } + } + return results.AsReadOnly(); +#nullable disable + } + + private ReadOnlyCollection> GetPossible() + { + List> results = new(); + string fileName; + DateTime dateTime; + FileInfo targetFileInfo; + FileInfo alternateFileInfo; + DateTime fileAgeThresholdDateTime = GetFileAgeThresholdDateTime(_FileConnectorConfiguration.FileAgeThreshold); + ReadOnlyCollection dayNginxFileSystemCollection = GetDayNginxFileSystemCollection(fileAgeThresholdDateTime); + foreach (NginxFileSystem nginxFileSystem in dayNginxFileSystemCollection) + { + targetFileInfo = new FileInfo(nginxFileSystem.Name); + if (targetFileInfo.Directory is null) + continue; + if (!Directory.Exists(targetFileInfo.Directory.FullName)) + _ = Directory.CreateDirectory(targetFileInfo.Directory.FullName); + if (!DateTime.TryParse(nginxFileSystem.MTime, out dateTime)) + continue; + if (targetFileInfo.Exists && targetFileInfo.LastWriteTime == dateTime) + continue; + fileName = Path.GetFileName(targetFileInfo.Name); + alternateFileInfo = new(Path.Combine(_FileConnectorConfiguration.AlternateTargetFolder, fileName.Split(new string[] { "~" }, StringSplitOptions.None).Last())); + results.Add(new(dateTime, targetFileInfo, alternateFileInfo, nginxFileSystem.Type)); + } + return results.AsReadOnly(); + } + + private void DownloadTXTFileAsync() + { +#nullable enable + if (_HttpClient is null) + throw new Exception(); + if (string.IsNullOrEmpty(_StaticFileServer)) + throw new Exception(); + ReadOnlyCollection> possibleDownload = GetPossible(); + if (possibleDownload.Count > 0) + { + string targetFileName = possibleDownload[0].Item4; + FileInfo targetFileInfo = possibleDownload[0].Item2; + FileInfo alternateFileInfo = possibleDownload[0].Item3; + DateTime matchNginxFileSystemDateTime = possibleDownload[0].Item1; + if (targetFileInfo.Exists) + File.Delete(targetFileInfo.FullName); + string targetJson = _HttpClient.GetStringAsync(targetFileName).Result; + File.WriteAllText(targetFileInfo.FullName, targetJson); + targetFileInfo.LastWriteTime = matchNginxFileSystemDateTime; + File.AppendAllText(alternateFileInfo.FullName, targetJson); + } +#nullable disable + } + + private void Callback(object state) + { + try + { + if (_IsEAFHosted) + DownloadTXTFileAsync(); + } + catch (Exception exception) + { + string subject = string.Concat("Exception:", _CellInstanceConnectionName); + string body = string.Concat(exception.Message, Environment.NewLine, Environment.NewLine, exception.StackTrace); + try + { _SMTP.SendHighPriorityEmailMessage(subject, body); } + catch (Exception) { } + } + try + { + TimeSpan timeSpan = new(DateTime.Now.AddSeconds(_FileConnectorConfiguration.FileScanningIntervalInSeconds.Value).Ticks - DateTime.Now.Ticks); + _ = _Timer.Change((long)timeSpan.TotalMilliseconds, Timeout.Infinite); + } + catch (Exception exception) + { + string subject = string.Concat("Exception:", _CellInstanceConnectionName); + string body = string.Concat(exception.Message, Environment.NewLine, Environment.NewLine, exception.StackTrace); + try + { _SMTP.SendHighPriorityEmailMessage(subject, body); } + catch (Exception) { } + } + } + +} \ No newline at end of file diff --git a/Adaptation/FileHandlers/DownloadTXTFile/NginxFileSystem.cs b/Adaptation/FileHandlers/DownloadTXTFile/NginxFileSystem.cs new file mode 100644 index 0000000..e83de06 --- /dev/null +++ b/Adaptation/FileHandlers/DownloadTXTFile/NginxFileSystem.cs @@ -0,0 +1,23 @@ +namespace Adaptation.FileHandlers.DownloadTXTFile; + +internal class NginxFileSystem +{ + protected readonly string _Name; + protected readonly string _Type; + protected readonly string _MTime; + protected readonly float _Size; + + public string Name => _Name; + public string Type => _Type; + public string MTime => _MTime; + public float Size => _Size; + + public NginxFileSystem(string name, string type, string mTime, float size) + { + _Name = name; + _Type = type; + _MTime = mTime; + _Size = size; + } + +} \ No newline at end of file diff --git a/Adaptation/FileHandlers/OpenInsightMetrologyViewer/WSRequest.cs b/Adaptation/FileHandlers/OpenInsightMetrologyViewer/WSRequest.cs index f011ebb..17391f4 100644 --- a/Adaptation/FileHandlers/OpenInsightMetrologyViewer/WSRequest.cs +++ b/Adaptation/FileHandlers/OpenInsightMetrologyViewer/WSRequest.cs @@ -89,13 +89,13 @@ public class WSRequest UniqueId = Details[0].HeaderUniqueId; } - internal static long GetHeaderId(IFileRead fileRead, Logistics logistics, string openInsightMetrologyViewerAPI, DateTime dateTime, int weekOfYear, string json, List descriptions) + internal static long GetHeaderId(IFileRead fileRead, Logistics logistics, string openInsightMetrologyViewerAPI, string openInsightMetrologyViewerFileShare, int weekOfYear, string json, List descriptions) { long result; if (string.IsNullOrEmpty(json)) { WSRequest wsRequest = new(fileRead, logistics, descriptions); - string directory = Path.Combine(openInsightMetrologyViewerAPI, dateTime.Year.ToString(), $"WW{weekOfYear:00}"); + string directory = Path.Combine(openInsightMetrologyViewerFileShare, logistics.DateTimeFromSequence.Year.ToString(), $"WW{weekOfYear:00}"); (json, WS.Results wsResults) = WS.SendData(openInsightMetrologyViewerAPI, logistics.Sequence, directory, wsRequest); if (!wsResults.Success) throw new Exception(wsResults.ToString()); diff --git a/Adaptation/FileHandlers/OpenInsightMetrologyViewerAttachments/FileRead.cs b/Adaptation/FileHandlers/OpenInsightMetrologyViewerAttachments/FileRead.cs index 29905ec..6f3df00 100644 --- a/Adaptation/FileHandlers/OpenInsightMetrologyViewerAttachments/FileRead.cs +++ b/Adaptation/FileHandlers/OpenInsightMetrologyViewerAttachments/FileRead.cs @@ -113,13 +113,14 @@ public class FileRead : Shared.FileRead, IFileRead #nullable enable - private string? GetHeaderIdDirectory(DateTime[] dateTimes, long headerId) + private string? GetHeaderIdDirectory(long headerId) { string? result = null; int weekNum; string year; string weekDirectory; string checkDirectory; + DateTime[] dateTimes = new DateTime[] { _Logistics.DateTimeFromSequence, _Logistics.DateTimeFromSequence.AddDays(-6.66) }; foreach (DateTime dateTime in dateTimes) { year = dateTime.Year.ToString(); @@ -136,7 +137,7 @@ public class FileRead : Shared.FileRead, IFileRead return result; } - private void PostOpenInsightMetrologyViewerAttachments(DateTime dateTime, List descriptions) + private void PostOpenInsightMetrologyViewerAttachments(List descriptions) { string? json; string? subGroupId; @@ -156,16 +157,17 @@ public class FileRead : Shared.FileRead, IFileRead lock (_StaticRuns) _ = _StaticRuns.Remove(_Logistics.Sequence); } - DateTime[] dateTimes = new DateTime[] { dateTime, dateTime.AddDays(-6.66) }; - int weekOfYear = _Calendar.GetWeekOfYear(dateTime, CalendarWeekRule.FirstDay, DayOfWeek.Sunday); - long headerId = OpenInsightMetrologyViewer.WSRequest.GetHeaderId(this, _Logistics, _OpenInsightMetrologyViewerAPI, dateTime, weekOfYear, json, descriptions); - string? headerIdDirectory = GetHeaderIdDirectory(dateTimes, headerId); + int weekOfYear = _Calendar.GetWeekOfYear(_Logistics.DateTimeFromSequence, CalendarWeekRule.FirstDay, DayOfWeek.Sunday); + long headerId = !_IsEAFHosted ? -1 : OpenInsightMetrologyViewer.WSRequest.GetHeaderId(this, _Logistics, _OpenInsightMetrologyViewerAPI, _OpenInsightMetrologyViewerFileShare, weekOfYear, json, descriptions); + string? headerIdDirectory = GetHeaderIdDirectory(headerId); if (string.IsNullOrEmpty(headerIdDirectory)) throw new Exception($"Didn't find header id directory <{headerId}>"); OpenInsightMetrologyViewer.WSRequest.PostOpenInsightMetrologyViewerAttachments(this, _Logistics, _OpenInsightMetrologyViewerAPI, _OriginalDataBioRad, descriptions, matchDirectories[0], subGroupId, headerId, headerIdDirectory); } +#pragma warning disable IDE0060 private Tuple> GetExtractResult(string reportFullPath, DateTime dateTime) +#pragma warning restore IDE0060 { Tuple> results; Tuple pdsf = ProcessDataStandardFormat.GetLogisticsColumnsAndBody(reportFullPath); @@ -175,7 +177,7 @@ public class FileRead : Shared.FileRead, IFileRead List descriptions = Stratus.ProcessData.GetDescriptions(jsonElements); Test[] tests = (from l in descriptions select (Test)l.Test).ToArray(); if (_IsEAFHosted && _FileConnectorConfiguration.FileScanningIntervalInSeconds > 0) - PostOpenInsightMetrologyViewerAttachments(dateTime, descriptions); + PostOpenInsightMetrologyViewerAttachments(descriptions); results = new Tuple>(pdsf.Item1, tests, jsonElements, new List()); return results; } diff --git a/Adaptation/MET08THFTIRSTRATUS-Development.yml b/Adaptation/MET08THFTIRSTRATUS-Development.yml index 43434bd..97ce412 100644 --- a/Adaptation/MET08THFTIRSTRATUS-Development.yml +++ b/Adaptation/MET08THFTIRSTRATUS-Development.yml @@ -26,7 +26,7 @@ steps: displayName: Configuration - script: | - set nugetSource=https://eaf-dev-reporting.mes.infineon.com/v3/index.json + set nugetSource=https://artifactory.intra.infineon.com/artifactory/api/nuget/ngt-fi-package-main-vir/;D:/vsts-agent-win-x64-2.210.1-eaf/nuget echo %nugetSource% echo ##vso[task.setvariable variable=NugetSource;]%nugetSource% echo $(NugetSource) @@ -148,7 +148,7 @@ steps: displayName: "Core Publish" enabled: false - - script: '"C:/Program Files (x86)/Microsoft Visual Studio/2022/BuildTools/MSBuild/Current/Bin/MSBuild.exe" /target:Restore /detailedsummary /consoleloggerparameters:PerformanceSummary;ErrorsOnly; /property:Configuration=$(Configuration);TargetFrameworkVersion=v4.8 /p:RestoreSources=$(NugetSource)' + - script: '"C:/Program Files (x86)/Microsoft Visual Studio/2022/BuildTools/MSBuild/Current/Bin/MSBuild.exe" /target:Restore /detailedsummary /consoleloggerparameters:PerformanceSummary;ErrorsOnly; /property:Configuration=$(Configuration);TargetFrameworkVersion=v4.8 /p:RestoreSources="$(NugetSource)"' displayName: "MSBuild Restore" - script: '"C:/Program Files (x86)/Microsoft Visual Studio/2022/BuildTools/MSBuild/Current/Bin/MSBuild.exe" /target:Build /detailedsummary /consoleloggerparameters:PerformanceSummary;ErrorsOnly; /property:Configuration=$(Configuration);TargetFrameworkVersion=v4.8' diff --git a/Adaptation/MET08THFTIRSTRATUS.Tests.csproj b/Adaptation/MET08THFTIRSTRATUS.Tests.csproj index 7b7c8bc..0a33dc2 100644 --- a/Adaptation/MET08THFTIRSTRATUS.Tests.csproj +++ b/Adaptation/MET08THFTIRSTRATUS.Tests.csproj @@ -45,27 +45,27 @@ NU1701 NU1701 - + - + - + - - + + NU1701 - + - - + + diff --git a/Adaptation/MET08THFTIRSTRATUS.yml b/Adaptation/MET08THFTIRSTRATUS.yml index ced21bd..19b604e 100644 --- a/Adaptation/MET08THFTIRSTRATUS.yml +++ b/Adaptation/MET08THFTIRSTRATUS.yml @@ -26,7 +26,7 @@ steps: displayName: Configuration - script: | - set nugetSource=https://eaf-prod.mes.infineon.com/v3/index.json + set nugetSource=https://artifactory.intra.infineon.com/artifactory/api/nuget/ngt-fi-package-main-vir/;D:/vsts-agent-win-x64-2.210.1-eaf/nuget echo %nugetSource% echo ##vso[task.setvariable variable=NugetSource;]%nugetSource% echo $(NugetSource) @@ -145,7 +145,7 @@ steps: displayName: "Core Publish" enabled: false - - script: '"C:/Program Files (x86)/Microsoft Visual Studio/2022/BuildTools/MSBuild/Current/Bin/MSBuild.exe" /target:Restore /detailedsummary /consoleloggerparameters:PerformanceSummary;ErrorsOnly; /property:Configuration=$(Configuration);TargetFrameworkVersion=v4.8 /p:RestoreSources=$(NugetSource)' + - script: '"C:/Program Files (x86)/Microsoft Visual Studio/2022/BuildTools/MSBuild/Current/Bin/MSBuild.exe" /target:Restore /detailedsummary /consoleloggerparameters:PerformanceSummary;ErrorsOnly; /property:Configuration=$(Configuration);TargetFrameworkVersion=v4.8 /p:RestoreSources="$(NugetSource)"' displayName: "MSBuild Restore" - script: '"C:/Program Files (x86)/Microsoft Visual Studio/2022/BuildTools/MSBuild/Current/Bin/MSBuild.exe" /target:Build /detailedsummary /consoleloggerparameters:PerformanceSummary;ErrorsOnly; /property:Configuration=$(Configuration);TargetFrameworkVersion=v4.8' diff --git a/Adaptation/Shared/Metrology/WS.cs b/Adaptation/Shared/Metrology/WS.cs index 4e43fa3..c49e61d 100644 --- a/Adaptation/Shared/Metrology/WS.cs +++ b/Adaptation/Shared/Metrology/WS.cs @@ -78,20 +78,32 @@ public partial class WS { foreach (Attachment attachment in headerAttachments) { - directory = Path.GetDirectoryName(attachment.HeaderIdDirectory) ?? throw new Exception(); - File.Copy(attachment.SourceFileName, Path.Combine(directory, attachment.AttachmentId, attachment.DestinationFileName), overwrite: true); - AttachFile(url, attachment); + directory = Path.Combine(Path.GetDirectoryName(attachment.HeaderIdDirectory), attachment.AttachmentId) ?? throw new Exception(); + if (!Directory.Exists(directory)) + _ = Directory.CreateDirectory(directory); + File.Copy(attachment.SourceFileName, Path.Combine(directory, attachment.DestinationFileName), overwrite: true); } } if (dataAttachments is not null) { foreach (Attachment attachment in dataAttachments) { - directory = Path.GetDirectoryName(attachment.HeaderIdDirectory) ?? throw new Exception(); - File.Copy(attachment.SourceFileName, Path.Combine(directory, attachment.AttachmentId, attachment.DestinationFileName), overwrite: true); - AttachFile(url, attachment); + directory = Path.Combine(Path.GetDirectoryName(attachment.HeaderIdDirectory.Replace("Header", "Data")), attachment.AttachmentId) ?? throw new Exception(); + if (!Directory.Exists(directory)) + _ = Directory.CreateDirectory(directory); + File.Copy(attachment.SourceFileName, Path.Combine(directory, attachment.DestinationFileName), overwrite: true); } } + if (headerAttachments is not null) + { + foreach (Attachment attachment in headerAttachments) + AttachFile(url, attachment); + } + if (dataAttachments is not null) + { + foreach (Attachment attachment in dataAttachments) + AttachFile(url, attachment); + } //MessageBox.Show(r.ToString()); } catch (Exception e) diff --git a/Adaptation/_Tests/CreateSelfDescription/Production/v2.56.0/BIORAD4-EQPT.cs b/Adaptation/_Tests/CreateSelfDescription/Production/v2.56.0/BIORAD4-EQPT.cs new file mode 100644 index 0000000..da14de5 --- /dev/null +++ b/Adaptation/_Tests/CreateSelfDescription/Production/v2.56.0/BIORAD4-EQPT.cs @@ -0,0 +1,63 @@ +#if true +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.Production.v2_56_0; + +[TestClass] +public class BIORAD4_EQPT : EAFLoggingUnitTesting +{ + +#pragma warning disable CA2254 +#pragma warning disable IDE0060 + + internal static string DummyRoot { get; private set; } + internal static BIORAD4_EQPT EAFLoggingUnitTesting { get; private set; } + + static BIORAD4_EQPT() => DummyRoot = @"\\mesfs.infineon.com\EC_Characterization_Si\Dummy"; + + public BIORAD4_EQPT() : base(DummyRoot, testContext: null, declaringType: null, skipEquipmentDictionary: false) + { + if (EAFLoggingUnitTesting is null) + throw new Exception(); + } + + public BIORAD4_EQPT(TestContext testContext) : base(DummyRoot, testContext, new StackFrame().GetMethod().DeclaringType, skipEquipmentDictionary: false) + { + } + + [ClassInitialize] + public static void ClassInitialize(TestContext testContext) + { + EAFLoggingUnitTesting ??= new BIORAD4_EQPT(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(); + } + + [Ignore] + [TestMethod] + public void Production__v2_56_0__BIORAD4_EQPT__DownloadTXTFile() + { + string check = "DataBioRad.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")); + } + +} +#endif \ No newline at end of file diff --git a/Adaptation/_Tests/CreateSelfDescription/Production/v2.56.0/BIORAD4.cs b/Adaptation/_Tests/CreateSelfDescription/Production/v2.56.0/BIORAD4.cs new file mode 100644 index 0000000..04559bf --- /dev/null +++ b/Adaptation/_Tests/CreateSelfDescription/Production/v2.56.0/BIORAD4.cs @@ -0,0 +1,93 @@ +#if true +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.Production.v2_56_0; + +[TestClass] +public class BIORAD4 : EAFLoggingUnitTesting +{ + +#pragma warning disable CA2254 +#pragma warning disable IDE0060 + + internal static string DummyRoot { get; private set; } + internal static BIORAD4 EAFLoggingUnitTesting { get; private set; } + + static BIORAD4() => DummyRoot = @"\\mesfs.infineon.com\EC_Characterization_Si\Dummy"; + + public BIORAD4() : base(DummyRoot, testContext: null, declaringType: null, skipEquipmentDictionary: false) + { + if (EAFLoggingUnitTesting is null) + throw new Exception(); + } + + public BIORAD4(TestContext testContext) : base(DummyRoot, testContext, new StackFrame().GetMethod().DeclaringType, skipEquipmentDictionary: false) + { + } + + [ClassInitialize] + public static void ClassInitialize(TestContext testContext) + { + EAFLoggingUnitTesting ??= new BIORAD4(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 Production__v2_56_0__BIORAD4__txt() + { + string check = "*DataBioRad.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")); + } + +#if DEBUG + [Ignore] +#endif + [TestMethod] + public void Production__v2_56_0__BIORAD4__Stratus() + { + string check = "CassetteDataBioRad_*.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")); + } + +#if DEBUG + [Ignore] +#endif + [TestMethod] + public void Production__v2_56_0__BIORAD4__QS408M() + { + string check = "DetailDataBioRad_*.txt"; + MethodBase methodBase = new StackFrame().GetMethod(); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration")); + string[] fileNameAndJson = EAFLoggingUnitTesting.AdaptationTesting.GetConfiguration(methodBase); + Assert.IsTrue(fileNameAndJson[1].Contains(check)); + File.WriteAllText(fileNameAndJson[0], fileNameAndJson[1]); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit")); + } + +} +#endif \ No newline at end of file diff --git a/Adaptation/_Tests/CreateSelfDescription/Production/v2.56.0/BIORAD5-EQPT.cs b/Adaptation/_Tests/CreateSelfDescription/Production/v2.56.0/BIORAD5-EQPT.cs new file mode 100644 index 0000000..8e48a4a --- /dev/null +++ b/Adaptation/_Tests/CreateSelfDescription/Production/v2.56.0/BIORAD5-EQPT.cs @@ -0,0 +1,63 @@ +#if true +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.Production.v2_56_0; + +[TestClass] +public class BIORAD5_EQPT : EAFLoggingUnitTesting +{ + +#pragma warning disable CA2254 +#pragma warning disable IDE0060 + + internal static string DummyRoot { get; private set; } + internal static BIORAD5_EQPT EAFLoggingUnitTesting { get; private set; } + + static BIORAD5_EQPT() => DummyRoot = @"\\mesfs.infineon.com\EC_Characterization_Si\Dummy"; + + public BIORAD5_EQPT() : base(DummyRoot, testContext: null, declaringType: null, skipEquipmentDictionary: false) + { + if (EAFLoggingUnitTesting is null) + throw new Exception(); + } + + public BIORAD5_EQPT(TestContext testContext) : base(DummyRoot, testContext, new StackFrame().GetMethod().DeclaringType, skipEquipmentDictionary: false) + { + } + + [ClassInitialize] + public static void ClassInitialize(TestContext testContext) + { + EAFLoggingUnitTesting ??= new BIORAD5_EQPT(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(); + } + + [Ignore] + [TestMethod] + public void Production__v2_56_0__BIORAD5_EQPT__DownloadTXTFile() + { + string check = "DataBioRad.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")); + } + +} +#endif \ No newline at end of file diff --git a/Adaptation/_Tests/CreateSelfDescription/Production/v2.56.0/BIORAD5.cs b/Adaptation/_Tests/CreateSelfDescription/Production/v2.56.0/BIORAD5.cs new file mode 100644 index 0000000..1c0da51 --- /dev/null +++ b/Adaptation/_Tests/CreateSelfDescription/Production/v2.56.0/BIORAD5.cs @@ -0,0 +1,93 @@ +#if true +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.Production.v2_56_0; + +[TestClass] +public class BIORAD5 : EAFLoggingUnitTesting +{ + +#pragma warning disable CA2254 +#pragma warning disable IDE0060 + + internal static string DummyRoot { get; private set; } + internal static BIORAD5 EAFLoggingUnitTesting { get; private set; } + + static BIORAD5() => DummyRoot = @"\\mesfs.infineon.com\EC_Characterization_Si\Dummy"; + + public BIORAD5() : base(DummyRoot, testContext: null, declaringType: null, skipEquipmentDictionary: false) + { + if (EAFLoggingUnitTesting is null) + throw new Exception(); + } + + public BIORAD5(TestContext testContext) : base(DummyRoot, testContext, new StackFrame().GetMethod().DeclaringType, skipEquipmentDictionary: false) + { + } + + [ClassInitialize] + public static void ClassInitialize(TestContext testContext) + { + EAFLoggingUnitTesting ??= new BIORAD5(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 Production__v2_56_0__BIORAD5__txt() + { + string check = "*DataBioRad.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")); + } + +#if DEBUG + [Ignore] +#endif + [TestMethod] + public void Production__v2_56_0__BIORAD5__Stratus() + { + string check = "CassetteDataBioRad_*.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")); + } + +#if DEBUG + [Ignore] +#endif + [TestMethod] + public void Production__v2_56_0__BIORAD5__QS408M() + { + string check = "DetailDataBioRad_*.txt"; + MethodBase methodBase = new StackFrame().GetMethod(); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration")); + string[] fileNameAndJson = EAFLoggingUnitTesting.AdaptationTesting.GetConfiguration(methodBase); + Assert.IsTrue(fileNameAndJson[1].Contains(check)); + File.WriteAllText(fileNameAndJson[0], fileNameAndJson[1]); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit")); + } + +} +#endif \ No newline at end of file diff --git a/Adaptation/_Tests/CreateSelfDescription/Production/v2.56.0/MET08THFTIRSTRATUS.cs b/Adaptation/_Tests/CreateSelfDescription/Production/v2.56.0/MET08THFTIRSTRATUS.cs new file mode 100644 index 0000000..2ca2dfb --- /dev/null +++ b/Adaptation/_Tests/CreateSelfDescription/Production/v2.56.0/MET08THFTIRSTRATUS.cs @@ -0,0 +1,182 @@ +#if true +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.Production.v2_56_0; + +[TestClass] +public class MET08THFTIRSTRATUS : EAFLoggingUnitTesting +{ + +#pragma warning disable CA2254 +#pragma warning disable IDE0060 + + internal static string DummyRoot { get; private set; } + internal static MET08THFTIRSTRATUS EAFLoggingUnitTesting { get; private set; } + + static MET08THFTIRSTRATUS() => DummyRoot = @"\\mesfs.infineon.com\EC_Characterization_Si\Dummy"; + + public MET08THFTIRSTRATUS() : base(DummyRoot, testContext: null, declaringType: null, skipEquipmentDictionary: false) + { + if (EAFLoggingUnitTesting is null) + throw new Exception(); + } + + public MET08THFTIRSTRATUS(TestContext testContext) : base(DummyRoot, testContext, new StackFrame().GetMethod().DeclaringType, skipEquipmentDictionary: false) + { + } + + [ClassInitialize] + public static void ClassInitialize(TestContext testContext) + { + EAFLoggingUnitTesting ??= new MET08THFTIRSTRATUS(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 Production__v2_56_0__MET08THFTIRSTRATUS__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 Production__v2_56_0__MET08THFTIRSTRATUS__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 Production__v2_56_0__MET08THFTIRSTRATUS__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 Production__v2_56_0__MET08THFTIRSTRATUS__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 Production__v2_56_0__MET08THFTIRSTRATUS__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 Production__v2_56_0__MET08THFTIRSTRATUS__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 Production__v2_56_0__MET08THFTIRSTRATUS__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 Production__v2_56_0__MET08THFTIRSTRATUS__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 Production__v2_56_0__MET08THFTIRSTRATUS__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 Production__v2_56_0__MET08THFTIRSTRATUS__Dummy() + { + string check = "637738592809956919.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")); + } + +} +#endif \ No newline at end of file diff --git a/Adaptation/_Tests/Extract/Production/v2.56.0/BIORAD4-EQPT.cs b/Adaptation/_Tests/Extract/Production/v2.56.0/BIORAD4-EQPT.cs new file mode 100644 index 0000000..e09c3e8 --- /dev/null +++ b/Adaptation/_Tests/Extract/Production/v2.56.0/BIORAD4-EQPT.cs @@ -0,0 +1,44 @@ +#if true +using Microsoft.VisualStudio.TestTools.UnitTesting; +using System.Diagnostics; +using System.Reflection; +using System.Threading; + +namespace Adaptation._Tests.Extract.Production.v2_56_0; + +[TestClass] +public class BIORAD4_EQPT +{ + +#pragma warning disable CA2254 +#pragma warning disable IDE0060 + + private static CreateSelfDescription.Production.v2_56_0.BIORAD4_EQPT _BIORAD4_EQPT; + + [ClassInitialize] + public static void ClassInitialize(TestContext testContext) + { + CreateSelfDescription.Production.v2_56_0.BIORAD4_EQPT.ClassInitialize(testContext); + _BIORAD4_EQPT = CreateSelfDescription.Production.v2_56_0.BIORAD4_EQPT.EAFLoggingUnitTesting; + } + + [Ignore] + [TestMethod] + public void Production__v2_56_0__BIORAD4_EQPT__DownloadTXTFile() => _BIORAD4_EQPT.Production__v2_56_0__BIORAD4_EQPT__DownloadTXTFile(); + + [Ignore] + [TestMethod] + public void Production__v2_56_0__BIORAD4_EQPT__DownloadTXTFile638574038162800870__First() + { + bool validatePDSF = false; + string check = "DataBioRad.txt"; + MethodBase methodBase = new StackFrame().GetMethod(); + _BIORAD4_EQPT.Production__v2_56_0__BIORAD4_EQPT__DownloadTXTFile(); + string[] variables = _BIORAD4_EQPT.AdaptationTesting.GetVariables(methodBase, check, validatePDSF); + _ = _BIORAD4_EQPT.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false); + for (int i = 0; i < short.MaxValue; i++) + Thread.Sleep(500); + } + +} +#endif \ No newline at end of file diff --git a/Adaptation/_Tests/Extract/Production/v2.56.0/BIORAD4.cs b/Adaptation/_Tests/Extract/Production/v2.56.0/BIORAD4.cs new file mode 100644 index 0000000..87f2ab2 --- /dev/null +++ b/Adaptation/_Tests/Extract/Production/v2.56.0/BIORAD4.cs @@ -0,0 +1,195 @@ +#if true +using Adaptation.Shared; +using Adaptation.Shared.Methods; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using System; +using System.Diagnostics; +using System.Reflection; + +namespace Adaptation._Tests.Extract.Production.v2_56_0; + +[TestClass] +public class BIORAD4 +{ + +#pragma warning disable CA2254 +#pragma warning disable IDE0060 + + private static CreateSelfDescription.Production.v2_56_0.BIORAD4 _BIORAD4; + + [ClassInitialize] + public static void ClassInitialize(TestContext testContext) + { + CreateSelfDescription.Production.v2_56_0.BIORAD4.ClassInitialize(testContext); + _BIORAD4 = CreateSelfDescription.Production.v2_56_0.BIORAD4.EAFLoggingUnitTesting; + } + +#if DEBUG + [Ignore] +#endif + [TestMethod] + public void Production__v2_56_0__BIORAD4__txt() => _BIORAD4.Production__v2_56_0__BIORAD4__txt(); + +#if DEBUG + [Ignore] +#endif + [TestMethod] + public void Production__v2_56_0__BIORAD4__txt637730081979221342__Normal() + { + bool validatePDSF = false; + string check = "*DataBioRad.txt"; + _BIORAD4.Production__v2_56_0__BIORAD4__txt(); + MethodBase methodBase = new StackFrame().GetMethod(); + string[] variables = _BIORAD4.AdaptationTesting.GetVariables(methodBase, check, validatePDSF); + IFileRead fileRead = _BIORAD4.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false); + _ = fileRead.ReExtract(); + Shared.AdaptationTesting.UpdatePassDirectory(variables[2]); + } + +#if DEBUG + [Ignore] +#endif + [TestMethod] + public void Production__v2_56_0__BIORAD4__txt637818036815840307__ProcessFailed() + { + bool validatePDSF = false; + string check = "*DataBioRad.txt"; + _BIORAD4.Production__v2_56_0__BIORAD4__txt(); + MethodBase methodBase = new StackFrame().GetMethod(); + string[] variables = _BIORAD4.AdaptationTesting.GetVariables(methodBase, check, validatePDSF); + IFileRead fileRead = _BIORAD4.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false); + _ = fileRead.ReExtract(); + Shared.AdaptationTesting.UpdatePassDirectory(variables[2]); + } + +#if DEBUG + [Ignore] +#endif + [TestMethod] + public void Production__v2_56_0__BIORAD4__txt637746296480404920__Failure() + { + bool validatePDSF = false; + string check = "*DataBioRad.txt"; + _BIORAD4.Production__v2_56_0__BIORAD4__txt(); + MethodBase methodBase = new StackFrame().GetMethod(); + string[] variables = _BIORAD4.AdaptationTesting.GetVariables(methodBase, check, validatePDSF); + IFileRead fileRead = _BIORAD4.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false); + _ = fileRead.ReExtract(); + Shared.AdaptationTesting.UpdatePassDirectory(variables[2]); + } + +#if DEBUG + [Ignore] +#endif + [TestMethod] + public void Production__v2_56_0__BIORAD4__txt638187028378748930__THigh() + { + bool validatePDSF = false; + string check = "*DataBioRad.txt"; + _BIORAD4.Production__v2_56_0__BIORAD4__txt(); + MethodBase methodBase = new StackFrame().GetMethod(); + string[] variables = _BIORAD4.AdaptationTesting.GetVariables(methodBase, check, validatePDSF); + IFileRead fileRead = _BIORAD4.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false); + _ = fileRead.ReExtract(); + Shared.AdaptationTesting.UpdatePassDirectory(variables[2]); + } + +#if DEBUG + [Ignore] +#endif + [TestMethod] + public void Production__v2_56_0__BIORAD4__Stratus() => _BIORAD4.Production__v2_56_0__BIORAD4__Stratus(); + +#if DEBUG + [Ignore] +#endif + [TestMethod] + public void Production__v2_56_0__BIORAD4__Stratus637730081979221342__RDS() + { + bool validatePDSF = false; + string check = "CassetteDataBioRad_*.txt"; + _BIORAD4.Production__v2_56_0__BIORAD4__Stratus(); + MethodBase methodBase = new StackFrame().GetMethod(); + string[] variables = _BIORAD4.AdaptationTesting.GetVariables(methodBase, check, validatePDSF); + IFileRead fileRead = _BIORAD4.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 Production__v2_56_0__BIORAD4__Stratus637730081979221342__1TRDS() + { + bool validatePDSF = false; + string check = "CassetteDataBioRad_*.txt"; + _BIORAD4.Production__v2_56_0__BIORAD4__Stratus(); + MethodBase methodBase = new StackFrame().GetMethod(); + string[] variables = _BIORAD4.AdaptationTesting.GetVariables(methodBase, check, validatePDSF); + IFileRead fileRead = _BIORAD4.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 Production__v2_56_0__BIORAD4__Stratus637733400573863329__ReactorAndRDS() + { + DateTime dateTime; + bool validatePDSF = false; + string check = "CassetteDataBioRad_*.txt"; + _BIORAD4.Production__v2_56_0__BIORAD4__Stratus(); + MethodBase methodBase = new StackFrame().GetMethod(); + string[] variables = _BIORAD4.AdaptationTesting.GetVariables(methodBase, check, validatePDSF); + IFileRead fileRead = _BIORAD4.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false); + Logistics logistics = new(fileRead); + _ = Shared.AdaptationTesting.ReExtractCompareUpdatePassDirectory(variables, fileRead, logistics, validatePDSF); + dateTime = FileHandlers.Stratus.ProcessData.GetDateTime(logistics, string.Empty); + Assert.IsTrue(dateTime == logistics.DateTimeFromSequence); + dateTime = FileHandlers.Stratus.ProcessData.GetDateTime(logistics, "11/24/21 08:39"); + Assert.IsTrue(dateTime == logistics.DateTimeFromSequence); + } + +#if DEBUG + [Ignore] +#endif + [TestMethod] + public void Production__v2_56_0__BIORAD4__Stratus637818036815840307__ProcessFailed() + { + bool validatePDSF = false; + string check = "CassetteDataBioRad_*.txt"; + _BIORAD4.Production__v2_56_0__BIORAD4__Stratus(); + MethodBase methodBase = new StackFrame().GetMethod(); + string[] variables = _BIORAD4.AdaptationTesting.GetVariables(methodBase, check, validatePDSF); + IFileRead fileRead = _BIORAD4.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false); + _ = fileRead.ReExtract(); + Shared.AdaptationTesting.UpdatePassDirectory(variables[2]); + } + +#if DEBUG + [Ignore] +#endif + [TestMethod] + public void Production__v2_56_0__BIORAD4__QS408M() => _BIORAD4.Production__v2_56_0__BIORAD4__QS408M(); + +#if DEBUG + [Ignore] +#endif + [TestMethod] + public void Production__v2_56_0__BIORAD4__Stratus638010209430211312__MissingRecipe() + { + bool validatePDSF = false; + string check = "CassetteDataBioRad_*.txt"; + _BIORAD4.Production__v2_56_0__BIORAD4__Stratus(); + MethodBase methodBase = new StackFrame().GetMethod(); + string[] variables = _BIORAD4.AdaptationTesting.GetVariables(methodBase, check, validatePDSF); + IFileRead fileRead = _BIORAD4.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false); + _ = fileRead.ReExtract(); + Shared.AdaptationTesting.UpdatePassDirectory(variables[2]); + } + +} +#endif \ No newline at end of file diff --git a/Adaptation/_Tests/Extract/Production/v2.56.0/BIORAD5-EQPT.cs b/Adaptation/_Tests/Extract/Production/v2.56.0/BIORAD5-EQPT.cs new file mode 100644 index 0000000..f381a25 --- /dev/null +++ b/Adaptation/_Tests/Extract/Production/v2.56.0/BIORAD5-EQPT.cs @@ -0,0 +1,27 @@ +#if true +using Microsoft.VisualStudio.TestTools.UnitTesting; + +namespace Adaptation._Tests.Extract.Production.v2_56_0; + +[TestClass] +public class BIORAD5_EQPT +{ + +#pragma warning disable CA2254 +#pragma warning disable IDE0060 + + private static CreateSelfDescription.Production.v2_56_0.BIORAD5_EQPT _BIORAD5_EQPT; + + [ClassInitialize] + public static void ClassInitialize(TestContext testContext) + { + CreateSelfDescription.Production.v2_56_0.BIORAD5_EQPT.ClassInitialize(testContext); + _BIORAD5_EQPT = CreateSelfDescription.Production.v2_56_0.BIORAD5_EQPT.EAFLoggingUnitTesting; + } + + [Ignore] + [TestMethod] + public void Production__v2_56_0__BIORAD5_EQPT__DownloadTXTFile() => _BIORAD5_EQPT.Production__v2_56_0__BIORAD5_EQPT__DownloadTXTFile(); + +} +#endif \ No newline at end of file diff --git a/Adaptation/_Tests/Extract/Production/v2.56.0/BIORAD5.cs b/Adaptation/_Tests/Extract/Production/v2.56.0/BIORAD5.cs new file mode 100644 index 0000000..0005e17 --- /dev/null +++ b/Adaptation/_Tests/Extract/Production/v2.56.0/BIORAD5.cs @@ -0,0 +1,114 @@ +#if true +using Adaptation.Shared; +using Adaptation.Shared.Methods; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using System; +using System.Diagnostics; +using System.Reflection; + +namespace Adaptation._Tests.Extract.Production.v2_56_0; + +[TestClass] +public class BIORAD5 +{ + +#pragma warning disable CA2254 +#pragma warning disable IDE0060 + + private static CreateSelfDescription.Production.v2_56_0.BIORAD5 _BIORAD5; + + [ClassInitialize] + public static void ClassInitialize(TestContext testContext) + { + CreateSelfDescription.Production.v2_56_0.BIORAD5.ClassInitialize(testContext); + _BIORAD5 = CreateSelfDescription.Production.v2_56_0.BIORAD5.EAFLoggingUnitTesting; + } + + private static void NonThrowTryCatch() + { + try + { throw new Exception(); } + catch (Exception) { } + } + +#if DEBUG + [Ignore] +#endif + [TestMethod] + public void Production__v2_56_0__BIORAD5__txt() => _BIORAD5.Production__v2_56_0__BIORAD5__txt(); + +#if DEBUG + [Ignore] +#endif + [TestMethod] + public void Production__v2_56_0__BIORAD5__txt638221788953480284__MorePoints() + { + bool validatePDSF = false; + string check = "*DataBioRad.txt"; + _BIORAD5.Production__v2_56_0__BIORAD5__txt(); + MethodBase methodBase = new StackFrame().GetMethod(); + string[] variables = _BIORAD5.AdaptationTesting.GetVariables(methodBase, check, validatePDSF); + IFileRead fileRead = _BIORAD5.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false); + Logistics logistics = new(fileRead); + _ = Shared.AdaptationTesting.ReExtractCompareUpdatePassDirectory(variables, fileRead, logistics, validatePDSF); + NonThrowTryCatch(); + } + +#if DEBUG + [Ignore] +#endif + [TestMethod] + public void Production__v2_56_0__BIORAD5__Stratus() => _BIORAD5.Production__v2_56_0__BIORAD5__Stratus(); + +#if DEBUG + [Ignore] +#endif + [TestMethod] + public void Production__v2_56_0__BIORAD5__Stratus637738592809956919__ReactorAndRDS() + { + DateTime dateTime; + bool validatePDSF = false; + string check = "CassetteDataBioRad_*.txt"; + _BIORAD5.Production__v2_56_0__BIORAD5__Stratus(); + MethodBase methodBase = new StackFrame().GetMethod(); + string[] variables = _BIORAD5.AdaptationTesting.GetVariables(methodBase, check, validatePDSF); + IFileRead fileRead = _BIORAD5.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false); + Logistics logistics = new(fileRead); + _ = Shared.AdaptationTesting.ReExtractCompareUpdatePassDirectory(variables, fileRead, logistics, validatePDSF); + dateTime = FileHandlers.Stratus.ProcessData.GetDateTime(logistics, string.Empty); + Assert.IsTrue(dateTime == logistics.DateTimeFromSequence); + dateTime = FileHandlers.Stratus.ProcessData.GetDateTime(logistics, "11/24/21 08:39"); + Assert.IsTrue(dateTime == logistics.DateTimeFromSequence); + NonThrowTryCatch(); + } + +#if DEBUG + [Ignore] +#endif + [TestMethod] + public void Production__v2_56_0__BIORAD5__Stratus637805172599370243__Why() + { + DateTime dateTime; + bool validatePDSF = false; + string check = "CassetteDataBioRad_*.txt"; + _BIORAD5.Production__v2_56_0__BIORAD5__Stratus(); + MethodBase methodBase = new StackFrame().GetMethod(); + string[] variables = _BIORAD5.AdaptationTesting.GetVariables(methodBase, check, validatePDSF); + IFileRead fileRead = _BIORAD5.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false); + Logistics logistics = new(fileRead); + _ = Shared.AdaptationTesting.ReExtractCompareUpdatePassDirectory(variables, fileRead, logistics, validatePDSF); + dateTime = FileHandlers.Stratus.ProcessData.GetDateTime(logistics, string.Empty); + Assert.IsTrue(dateTime == logistics.DateTimeFromSequence); + dateTime = FileHandlers.Stratus.ProcessData.GetDateTime(logistics, "11/24/21 08:39"); + Assert.IsTrue(dateTime == logistics.DateTimeFromSequence); + NonThrowTryCatch(); + } + +#if DEBUG + [Ignore] +#endif + [TestMethod] + public void Production__v2_56_0__BIORAD5__QS408M() => _BIORAD5.Production__v2_56_0__BIORAD5__QS408M(); + +} +#endif \ No newline at end of file diff --git a/Adaptation/_Tests/Extract/Production/v2.56.0/MET08THFTIRSTRATUS.cs b/Adaptation/_Tests/Extract/Production/v2.56.0/MET08THFTIRSTRATUS.cs new file mode 100644 index 0000000..2667e4b --- /dev/null +++ b/Adaptation/_Tests/Extract/Production/v2.56.0/MET08THFTIRSTRATUS.cs @@ -0,0 +1,148 @@ +#if true +using Adaptation._Tests.Shared; +using Adaptation.Shared; +using Adaptation.Shared.Methods; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using System.Diagnostics; +using System.Reflection; + +namespace Adaptation._Tests.Extract.Production.v2_56_0; + +[TestClass] +public class MET08THFTIRSTRATUS +{ + +#pragma warning disable CA2254 +#pragma warning disable IDE0060 + + private static CreateSelfDescription.Production.v2_56_0.MET08THFTIRSTRATUS _MET08THFTIRSTRATUS; + + [ClassInitialize] + public static void ClassInitialize(TestContext testContext) + { + CreateSelfDescription.Production.v2_56_0.MET08THFTIRSTRATUS.ClassInitialize(testContext); + _MET08THFTIRSTRATUS = CreateSelfDescription.Production.v2_56_0.MET08THFTIRSTRATUS.EAFLoggingUnitTesting; + } + +#if DEBUG + [Ignore] +#endif + [TestMethod] + public void Production__v2_56_0__MET08THFTIRSTRATUS__MoveMatchingFiles() => _MET08THFTIRSTRATUS.Production__v2_56_0__MET08THFTIRSTRATUS__MoveMatchingFiles(); + +#if DEBUG + [Ignore] +#endif + [TestMethod] + public void Production__v2_56_0__MET08THFTIRSTRATUS__OpenInsightMetrologyViewer() => _MET08THFTIRSTRATUS.Production__v2_56_0__MET08THFTIRSTRATUS__OpenInsightMetrologyViewer(); + +#if DEBUG + [Ignore] +#endif + [TestMethod] + public void Production__v2_56_0__MET08THFTIRSTRATUS__IQSSi() => _MET08THFTIRSTRATUS.Production__v2_56_0__MET08THFTIRSTRATUS__IQSSi(); + +#if DEBUG + [Ignore] +#endif + [TestMethod] + public void Production__v2_56_0__MET08THFTIRSTRATUS__OpenInsight() => _MET08THFTIRSTRATUS.Production__v2_56_0__MET08THFTIRSTRATUS__OpenInsight(); + +#if DEBUG + [Ignore] +#endif + [TestMethod] + public void Production__v2_56_0__MET08THFTIRSTRATUS__OpenInsight638014829236768047__Normal() + { + string check = "*.pdsf"; + _MET08THFTIRSTRATUS.Production__v2_56_0__MET08THFTIRSTRATUS__OpenInsight(); + MethodBase method = new StackFrame().GetMethod(); + string[] variables = _MET08THFTIRSTRATUS.AdaptationTesting.GetVariables(method, check); + _ = _MET08THFTIRSTRATUS.AdaptationTesting.Get(method, variables[2], variables[3], false).ReExtract(); + AdaptationTesting.UpdatePassDirectory(variables[2]); + } + +#if DEBUG + [Ignore] +#endif + [TestMethod] + public void Production__v2_56_0__MET08THFTIRSTRATUS__OpenInsight638015284160909324__WO() + { + string check = "*.pdsf"; + _MET08THFTIRSTRATUS.Production__v2_56_0__MET08THFTIRSTRATUS__OpenInsight(); + MethodBase method = new StackFrame().GetMethod(); + string[] variables = _MET08THFTIRSTRATUS.AdaptationTesting.GetVariables(method, check); + _ = _MET08THFTIRSTRATUS.AdaptationTesting.Get(method, variables[2], variables[3], false).ReExtract(); + AdaptationTesting.UpdatePassDirectory(variables[2]); + } + +#if DEBUG + [Ignore] +#endif + [TestMethod] + public void Production__v2_56_0__MET08THFTIRSTRATUS__OpenInsight638054540026319596__IqsSql() + { + string check = "*.pdsf"; + bool validatePDSF = false; + MethodBase methodBase = new StackFrame().GetMethod(); + _MET08THFTIRSTRATUS.Production__v2_56_0__MET08THFTIRSTRATUS__OpenInsight(); + string[] variables = _MET08THFTIRSTRATUS.AdaptationTesting.GetVariables(methodBase, check, validatePDSF); + IFileRead fileRead = _MET08THFTIRSTRATUS.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false); + Logistics logistics = new(fileRead); + _ = AdaptationTesting.ReExtractCompareUpdatePassDirectory(variables, fileRead, logistics); + } + +#if DEBUG + [Ignore] +#endif + [TestMethod] + public void Production__v2_56_0__MET08THFTIRSTRATUS__OpenInsightMetrologyViewerAttachments() => _MET08THFTIRSTRATUS.Production__v2_56_0__MET08THFTIRSTRATUS__OpenInsightMetrologyViewerAttachments(); + +#if DEBUG + [Ignore] +#endif + [TestMethod] + public void Production__v2_56_0__MET08THFTIRSTRATUS__OpenInsightMetrologyViewerAttachments638131299562362655__Normal() + { + string check = "*.pdsf"; + bool validatePDSF = false; + MethodBase methodBase = new StackFrame().GetMethod(); + _MET08THFTIRSTRATUS.Production__v2_56_0__MET08THFTIRSTRATUS__OpenInsightMetrologyViewerAttachments(); + string[] variables = _MET08THFTIRSTRATUS.AdaptationTesting.GetVariables(methodBase, check, validatePDSF); + IFileRead fileRead = _MET08THFTIRSTRATUS.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false); + Logistics logistics = new(fileRead); + _ = AdaptationTesting.ReExtractCompareUpdatePassDirectory(variables, fileRead, logistics); + } + +#if DEBUG + [Ignore] +#endif + [TestMethod] + public void Production__v2_56_0__MET08THFTIRSTRATUS__APC() => _MET08THFTIRSTRATUS.Production__v2_56_0__MET08THFTIRSTRATUS__APC(); + +#if DEBUG + [Ignore] +#endif + [TestMethod] + public void Production__v2_56_0__MET08THFTIRSTRATUS__SPaCe() => _MET08THFTIRSTRATUS.Production__v2_56_0__MET08THFTIRSTRATUS__SPaCe(); + +#if DEBUG + [Ignore] +#endif + [TestMethod] + public void Production__v2_56_0__MET08THFTIRSTRATUS__Processed() => _MET08THFTIRSTRATUS.Production__v2_56_0__MET08THFTIRSTRATUS__Processed(); + +#if DEBUG + [Ignore] +#endif + [TestMethod] + public void Production__v2_56_0__MET08THFTIRSTRATUS__Archive() => _MET08THFTIRSTRATUS.Production__v2_56_0__MET08THFTIRSTRATUS__Archive(); + +#if DEBUG + [Ignore] +#endif + [TestMethod] + public void Production__v2_56_0__MET08THFTIRSTRATUS__Dummy() => _MET08THFTIRSTRATUS.Production__v2_56_0__MET08THFTIRSTRATUS__Dummy(); + +} +#endif \ No newline at end of file diff --git a/MET08THFTIRSTRATUS.csproj b/MET08THFTIRSTRATUS.csproj index 40b6b40..0e28e50 100644 --- a/MET08THFTIRSTRATUS.csproj +++ b/MET08THFTIRSTRATUS.csproj @@ -106,14 +106,16 @@ + + - - - + + + diff --git a/Properties/AssemblyInfo.cs b/Properties/AssemblyInfo.cs index d970183..a43cb21 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.52.0.0")] -[assembly: AssemblyFileVersion("2.52.0.0")] \ No newline at end of file +[assembly: AssemblyVersion("2.56.0.0")] +[assembly: AssemblyFileVersion("2.56.0.0")] \ No newline at end of file