Artifactory
Switching to nginx download Bug fix - GetHeaderId
This commit is contained in:
6
Adaptation/.vscode/tasks.json
vendored
6
Adaptation/.vscode/tasks.json
vendored
@ -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",
|
||||
|
@ -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),
|
||||
|
292
Adaptation/FileHandlers/DownloadTXTFile/FileRead.cs
Normal file
292
Adaptation/FileHandlers/DownloadTXTFile/FileRead.cs
Normal file
@ -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<string, string> fileParameter, string cellInstanceName, int? connectionCount, string cellInstanceConnectionName, FileConnectorConfiguration fileConnectorConfiguration, string equipmentTypeName, string parameterizedModelObjectDefinitionType, IList<ModelObjectParameterDefinition> modelObjectParameters, string equipmentDictionaryName, Dictionary<string, List<long>> dummyRuns, Dictionary<long, List<string>> 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<string, Test[], JsonElement[], List<FileInfo>> extractResults, Exception exception) => Move(extractResults);
|
||||
|
||||
void IFileRead.WaitForThread() => WaitForThread(thread: null, threadExceptions: null);
|
||||
|
||||
string IFileRead.GetEventDescription()
|
||||
{
|
||||
string result = _Description.GetEventDescription();
|
||||
return result;
|
||||
}
|
||||
|
||||
List<string> IFileRead.GetHeaderNames()
|
||||
{
|
||||
List<string> results = _Description.GetHeaderNames();
|
||||
return results;
|
||||
}
|
||||
|
||||
string[] IFileRead.Move(Tuple<string, Test[], JsonElement[], List<FileInfo>> 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<string, string> IFileRead.GetDisplayNamesJsonElement()
|
||||
{
|
||||
Dictionary<string, string> results = _Description.GetDisplayNamesJsonElement(this);
|
||||
return results;
|
||||
}
|
||||
|
||||
List<IDescription> IFileRead.GetDescriptions(IFileRead fileRead, List<Test> tests, IProcessData processData)
|
||||
{
|
||||
List<IDescription> results = _Description.GetDescriptions(fileRead, _Logistics, tests, processData);
|
||||
return results;
|
||||
}
|
||||
|
||||
Tuple<string, Test[], JsonElement[], List<FileInfo>> IFileRead.GetExtractResult(string reportFullPath, string eventName)
|
||||
{
|
||||
Tuple<string, Test[], JsonElement[], List<FileInfo>> 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<string, Test[], JsonElement[], List<FileInfo>>(results.Item1, Array.Empty<Test>(), JsonSerializer.Deserialize<JsonElement[]>("[]"), results.Item4);
|
||||
if (results.Item3.Length > 0 && _IsEAFHosted)
|
||||
WritePDSF(this, results.Item3);
|
||||
UpdateLastTicksDuration(DateTime.Now.Ticks - dateTime.Ticks);
|
||||
return results;
|
||||
}
|
||||
|
||||
Tuple<string, Test[], JsonElement[], List<FileInfo>> IFileRead.ReExtract()
|
||||
{
|
||||
Tuple<string, Test[], JsonElement[], List<FileInfo>> results;
|
||||
List<string> headerNames = _Description.GetHeaderNames();
|
||||
Dictionary<string, string> keyValuePairs = _Description.GetDisplayNamesJsonElement(this);
|
||||
results = ReExtract(this, headerNames, keyValuePairs);
|
||||
return results;
|
||||
}
|
||||
|
||||
private Tuple<string, Test[], JsonElement[], List<FileInfo>> 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<NginxFileSystem> GetDayNginxFileSystemCollection(DateTime fileAgeThresholdDateTime, string week, string day, string dayUrl, NginxFileSystem[] dayNginxFileSystemCollection)
|
||||
{
|
||||
List<NginxFileSystem> 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<NginxFileSystem> GetDayNginxFileSystemCollection(DateTime fileAgeThresholdDateTime)
|
||||
{
|
||||
#nullable enable
|
||||
List<NginxFileSystem> results = new();
|
||||
string dayUrl;
|
||||
string dayJson;
|
||||
string weekJson;
|
||||
string checkWeek;
|
||||
Task<HttpResponseMessage> 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<NginxFileSystem[]>(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<NginxFileSystem[]>(dayJson, propertyNameCaseInsensitiveJsonSerializerOptions);
|
||||
if (dayNginxFileSystemCollection is null)
|
||||
continue;
|
||||
results.AddRange(GetDayNginxFileSystemCollection(fileAgeThresholdDateTime, week, weekNginxFileSystem.Name, dayUrl, dayNginxFileSystemCollection));
|
||||
}
|
||||
}
|
||||
return results.AsReadOnly();
|
||||
#nullable disable
|
||||
}
|
||||
|
||||
private ReadOnlyCollection<Tuple<DateTime, FileInfo, FileInfo, string>> GetPossible()
|
||||
{
|
||||
List<Tuple<DateTime, FileInfo, FileInfo, string>> results = new();
|
||||
string fileName;
|
||||
DateTime dateTime;
|
||||
FileInfo targetFileInfo;
|
||||
FileInfo alternateFileInfo;
|
||||
DateTime fileAgeThresholdDateTime = GetFileAgeThresholdDateTime(_FileConnectorConfiguration.FileAgeThreshold);
|
||||
ReadOnlyCollection<NginxFileSystem> 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<Tuple<DateTime, FileInfo, FileInfo, string>> 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) { }
|
||||
}
|
||||
}
|
||||
|
||||
}
|
23
Adaptation/FileHandlers/DownloadTXTFile/NginxFileSystem.cs
Normal file
23
Adaptation/FileHandlers/DownloadTXTFile/NginxFileSystem.cs
Normal file
@ -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;
|
||||
}
|
||||
|
||||
}
|
@ -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<Stratus.Description> descriptions)
|
||||
internal static long GetHeaderId(IFileRead fileRead, Logistics logistics, string openInsightMetrologyViewerAPI, string openInsightMetrologyViewerFileShare, int weekOfYear, string json, List<Stratus.Description> 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());
|
||||
|
@ -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<Stratus.Description> descriptions)
|
||||
private void PostOpenInsightMetrologyViewerAttachments(List<Stratus.Description> 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<string, Test[], JsonElement[], List<FileInfo>> GetExtractResult(string reportFullPath, DateTime dateTime)
|
||||
#pragma warning restore IDE0060
|
||||
{
|
||||
Tuple<string, Test[], JsonElement[], List<FileInfo>> results;
|
||||
Tuple<string, string[], string[]> pdsf = ProcessDataStandardFormat.GetLogisticsColumnsAndBody(reportFullPath);
|
||||
@ -175,7 +177,7 @@ public class FileRead : Shared.FileRead, IFileRead
|
||||
List<Stratus.Description> 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<string, Test[], JsonElement[], List<FileInfo>>(pdsf.Item1, tests, jsonElements, new List<FileInfo>());
|
||||
return results;
|
||||
}
|
||||
|
@ -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'
|
||||
|
@ -45,27 +45,27 @@
|
||||
<PackageReference Include="IKVM.OpenJDK.XML.API" Version="7.2.4630.5"><NoWarn>NU1701</NoWarn></PackageReference>
|
||||
<PackageReference Include="IKVM.Runtime" Version="7.2.4630.5"><NoWarn>NU1701</NoWarn></PackageReference>
|
||||
<PackageReference Include="Instances" Version="3.0.0" />
|
||||
<PackageReference Include="Microsoft.Extensions.Configuration.Binder" Version="8.0.1" />
|
||||
<PackageReference Include="Microsoft.Extensions.Configuration.Binder" Version="8.0.2" />
|
||||
<PackageReference Include="Microsoft.Extensions.Configuration.CommandLine" Version="8.0.0" />
|
||||
<PackageReference Include="Microsoft.Extensions.Configuration.EnvironmentVariables" Version="8.0.0" />
|
||||
<PackageReference Include="Microsoft.Extensions.Configuration.FileExtensions" Version="8.0.0" />
|
||||
<PackageReference Include="Microsoft.Extensions.Configuration.FileExtensions" Version="8.0.1" />
|
||||
<PackageReference Include="Microsoft.Extensions.Configuration.json" Version="8.0.0" />
|
||||
<PackageReference Include="Microsoft.Extensions.Configuration" Version="8.0.0" />
|
||||
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="8.0.0" />
|
||||
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="8.0.0" />
|
||||
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="8.0.0" />
|
||||
<PackageReference Include="Microsoft.Extensions.Logging" Version="8.0.0" />
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.9.0" />
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.10.0" />
|
||||
<PackageReference Include="Microsoft.Win32.SystemEvents" Version="8.0.0" />
|
||||
<PackageReference Include="MSTest.TestAdapter" Version="3.3.1" />
|
||||
<PackageReference Include="MSTest.TestFramework" Version="3.3.1" />
|
||||
<PackageReference Include="MSTest.TestAdapter" Version="3.5.1" />
|
||||
<PackageReference Include="MSTest.TestFramework" Version="3.5.1" />
|
||||
<PackageReference Include="Pdfbox" Version="1.1.1"><NoWarn>NU1701</NoWarn></PackageReference>
|
||||
<PackageReference Include="RoboSharp" Version="1.5.1" />
|
||||
<PackageReference Include="RoboSharp" Version="1.5.3" />
|
||||
<PackageReference Include="System.Configuration.ConfigurationManager" Version="8.0.0" />
|
||||
<PackageReference Include="System.Data.OleDb" Version="8.0.0" />
|
||||
<PackageReference Include="System.Data.SqlClient" Version="4.8.6" />
|
||||
<PackageReference Include="System.Drawing.Common" Version="8.0.5" />
|
||||
<PackageReference Include="System.Text.Json" Version="8.0.3" />
|
||||
<PackageReference Include="System.Drawing.Common" Version="8.0.7" />
|
||||
<PackageReference Include="System.Text.Json" Version="8.0.4" />
|
||||
<PackageReference Include="Tesseract" Version="5.2.0" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
|
@ -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'
|
||||
|
@ -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)
|
||||
|
@ -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
|
@ -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
|
@ -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
|
@ -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
|
@ -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
|
44
Adaptation/_Tests/Extract/Production/v2.56.0/BIORAD4-EQPT.cs
Normal file
44
Adaptation/_Tests/Extract/Production/v2.56.0/BIORAD4-EQPT.cs
Normal file
@ -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
|
195
Adaptation/_Tests/Extract/Production/v2.56.0/BIORAD4.cs
Normal file
195
Adaptation/_Tests/Extract/Production/v2.56.0/BIORAD4.cs
Normal file
@ -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
|
27
Adaptation/_Tests/Extract/Production/v2.56.0/BIORAD5-EQPT.cs
Normal file
27
Adaptation/_Tests/Extract/Production/v2.56.0/BIORAD5-EQPT.cs
Normal file
@ -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
|
114
Adaptation/_Tests/Extract/Production/v2.56.0/BIORAD5.cs
Normal file
114
Adaptation/_Tests/Extract/Production/v2.56.0/BIORAD5.cs
Normal file
@ -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
|
@ -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
|
@ -106,14 +106,16 @@
|
||||
<Compile Include="Adaptation\FileHandlers\APC\FileRead.cs" />
|
||||
<Compile Include="Adaptation\FileHandlers\Archive\FileRead.cs" />
|
||||
<Compile Include="Adaptation\FileHandlers\CellInstanceConnectionName.cs" />
|
||||
<Compile Include="Adaptation\FileHandlers\DownloadTXTFile\FileRead.cs" />
|
||||
<Compile Include="Adaptation\FileHandlers\DownloadTXTFile\NginxFileSystem.cs" />
|
||||
<Compile Include="Adaptation\FileHandlers\Dummy\FileRead.cs" />
|
||||
<Compile Include="Adaptation\FileHandlers\IQSSi\FileRead.cs" />
|
||||
<Compile Include="Adaptation\FileHandlers\MoveMatchingFiles\FileRead.cs" />
|
||||
<Compile Include="Adaptation\FileHandlers\OpenInsightMetrologyViewerAttachments\FileRead.cs" />
|
||||
<Compile Include="Adaptation\FileHandlers\OpenInsightMetrologyViewer\FileRead.cs" />
|
||||
<Compile Include="Adaptation\FileHandlers\OpenInsightMetrologyViewer\WSRequest.cs" />
|
||||
<Compile Include="Adaptation\FileHandlers\OpenInsight\FileRead.cs" />
|
||||
<Compile Include="Adaptation\FileHandlers\OpenInsight\FromIQS.cs" />
|
||||
<Compile Include="Adaptation\FileHandlers\OpenInsightMetrologyViewer\FileRead.cs" />
|
||||
<Compile Include="Adaptation\FileHandlers\OpenInsightMetrologyViewer\WSRequest.cs" />
|
||||
<Compile Include="Adaptation\FileHandlers\OpenInsightMetrologyViewerAttachments\FileRead.cs" />
|
||||
<Compile Include="Adaptation\FileHandlers\Processed\FileRead.cs" />
|
||||
<Compile Include="Adaptation\FileHandlers\SPaCe\FileRead.cs" />
|
||||
<Compile Include="Adaptation\FileHandlers\Stratus\Description.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")]
|
||||
[assembly: AssemblyVersion("2.56.0.0")]
|
||||
[assembly: AssemblyFileVersion("2.56.0.0")]
|
Reference in New Issue
Block a user