MET08RESIHGCV - v2.43.4 - MethodBaseName
This commit is contained in:
parent
8bb1dcded7
commit
5d15be7ce2
2
.gitignore
vendored
2
.gitignore
vendored
@ -336,3 +336,5 @@ ASALocalRun/
|
||||
!.vscode/tasks.json
|
||||
!.vscode/launch.json
|
||||
!.vscode/extensions.json
|
||||
|
||||
*.lnk
|
||||
|
2
Adaptation/.vscode/launch.json
vendored
2
Adaptation/.vscode/launch.json
vendored
@ -4,7 +4,7 @@
|
||||
"name": ".NET Core Attach",
|
||||
"type": "coreclr",
|
||||
"request": "attach",
|
||||
"processId": 17168
|
||||
"processId": 19044
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@ -95,7 +95,7 @@ public class WSRequest
|
||||
GradeMean = x.GradeMean;
|
||||
GradeRadialGradient = x.GradeRadialGradient;
|
||||
GradeStdDev = x.GradeStdDev;
|
||||
Operator = x.Employee;
|
||||
Operator = logistics.MesEntity;
|
||||
Layer = x.Layer;
|
||||
Lot = x.Lot;
|
||||
Model = x.Model;
|
||||
|
25
Adaptation/FileHandlers/pcl/Descriptor.cs
Normal file
25
Adaptation/FileHandlers/pcl/Descriptor.cs
Normal file
@ -0,0 +1,25 @@
|
||||
namespace Adaptation.FileHandlers.pcl;
|
||||
|
||||
public class Descriptor
|
||||
{
|
||||
|
||||
public string Employee { get; private set; }
|
||||
public string Layer { get; private set; }
|
||||
public string Lot { get; private set; }
|
||||
public string PSN { get; private set; }
|
||||
public string RDS { get; private set; }
|
||||
public string Reactor { get; private set; }
|
||||
public string Zone { get; private set; }
|
||||
|
||||
public Descriptor(string employee, string layer, string lot, string psn, string rds, string reactor, string zone)
|
||||
{
|
||||
Employee = employee;
|
||||
Layer = layer;
|
||||
Lot = lot;
|
||||
PSN = psn;
|
||||
RDS = rds;
|
||||
Reactor = reactor;
|
||||
Zone = zone;
|
||||
}
|
||||
|
||||
}
|
@ -20,7 +20,7 @@ public class FileRead : Shared.FileRead, IFileRead
|
||||
public FileRead(ISMTP smtp, Dictionary<string, string> fileParameter, string cellInstanceName, 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(), true, smtp, fileParameter, cellInstanceName, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted)
|
||||
{
|
||||
_MinFileLength = 15;
|
||||
_MinFileLength = 150;
|
||||
_NullData = string.Empty;
|
||||
_Logistics = new(this);
|
||||
if (_FileParameter is null)
|
||||
@ -107,18 +107,23 @@ public class FileRead : Shared.FileRead, IFileRead
|
||||
Tuple<string, Test[], JsonElement[], List<FileInfo>> results = new(string.Empty, null, null, new List<FileInfo>());
|
||||
_Logistics = new Logistics(this, reportFullPath, useSplitForMID: true);
|
||||
SetFileParameterLotIDToLogisticsMID();
|
||||
if (reportFullPath.Length < _MinFileLength)
|
||||
results.Item4.Add(new FileInfo(reportFullPath));
|
||||
if (_Logistics.FileInfo.Length < _MinFileLength)
|
||||
results.Item4.Add(_Logistics.FileInfo);
|
||||
else
|
||||
{
|
||||
IProcessData iProcessData = new ProcessData(this, _Logistics, results.Item4, _GhostPCLFileName, _PDFTextStripperFileName);
|
||||
if (iProcessData is not ProcessData processData)
|
||||
throw new Exception(string.Concat("A) No Data - ", dateTime.Ticks));
|
||||
string mid = string.Concat(processData.Reactor, "-", processData.RDS, "-", processData.PSN);
|
||||
mid = Regex.Replace(mid, @"[\\,\/,\:,\*,\?,\"",\<,\>,\|]", "_").Split('\r')[0].Split('\n')[0];
|
||||
_Logistics.MID = mid;
|
||||
string mid;
|
||||
if (!string.IsNullOrEmpty(processData.Employee) && string.IsNullOrEmpty(processData.Reactor) && string.IsNullOrEmpty(processData.RDS) && string.IsNullOrEmpty(processData.PSN))
|
||||
mid = processData.Employee;
|
||||
else
|
||||
{
|
||||
mid = string.Concat(processData.Reactor, "-", processData.RDS, "-", processData.PSN);
|
||||
mid = Regex.Replace(mid, @"[\\,\/,\:,\*,\?,\"",\<,\>,\|]", "_").Split('\r')[0].Split('\n')[0];
|
||||
}
|
||||
SetFileParameterLotID(mid);
|
||||
_Logistics.ProcessJobID = processData.Reactor;
|
||||
_Logistics.Update(mid, processData.Reactor);
|
||||
if (!iProcessData.Details.Any())
|
||||
throw new Exception(string.Concat("B) No Data - ", dateTime.Ticks));
|
||||
results = iProcessData.GetResults(this, _Logistics, results.Item4);
|
||||
|
@ -218,6 +218,112 @@ public class ProcessData : IProcessData
|
||||
return result;
|
||||
}
|
||||
|
||||
public static Descriptor GetDescriptor(string text)
|
||||
{
|
||||
Descriptor result;
|
||||
string lot;
|
||||
string rds;
|
||||
string psn;
|
||||
string zone;
|
||||
string layer;
|
||||
string reactor;
|
||||
string employee;
|
||||
const string defaultPSN = "0000";
|
||||
const string defaultReactor = "00";
|
||||
const string defaultRDS = "000000";
|
||||
if (text.Length is 2 or 3)
|
||||
{
|
||||
lot = text;
|
||||
employee = lot;
|
||||
rds = defaultRDS;
|
||||
psn = defaultPSN;
|
||||
zone = string.Empty;
|
||||
layer = string.Empty;
|
||||
reactor = defaultReactor;
|
||||
}
|
||||
else
|
||||
{
|
||||
// Remove illegal characters \/:*?"<>| found in the Lot.
|
||||
lot = Regex.Replace(text, @"[\\,\/,\:,\*,\?,\"",\<,\>,\|]", "_").Split('\r')[0].Split('\n')[0];
|
||||
string[] segments = lot.Split('-');
|
||||
if (segments.Length == 0)
|
||||
reactor = defaultReactor;
|
||||
else
|
||||
reactor = segments[0];
|
||||
if (segments.Length <= 1)
|
||||
rds = defaultRDS;
|
||||
else
|
||||
rds = segments[1];
|
||||
if (reactor.Length > 3)
|
||||
{
|
||||
rds = reactor;
|
||||
reactor = defaultReactor;
|
||||
}
|
||||
if (segments.Length <= 2)
|
||||
psn = defaultPSN;
|
||||
else
|
||||
psn = segments[2];
|
||||
if (segments.Length < 3)
|
||||
layer = string.Empty;
|
||||
else
|
||||
{
|
||||
string[] segmentsB = segments[2].Split('.');
|
||||
if (segmentsB.Length > 1)
|
||||
psn = segmentsB[0];
|
||||
if (segmentsB.Length <= 1)
|
||||
layer = string.Empty;
|
||||
else
|
||||
layer = segmentsB[1];
|
||||
}
|
||||
if (segments.Length <= 3)
|
||||
zone = string.Empty;
|
||||
else
|
||||
zone = segments[3];
|
||||
if (segments.Length <= 4)
|
||||
employee = string.Empty;
|
||||
else
|
||||
employee = segments[4];
|
||||
}
|
||||
result = new(employee, layer, lot, psn, rds, reactor, zone);
|
||||
return result;
|
||||
}
|
||||
|
||||
private void Set(Logistics logistics, string headerText)
|
||||
{
|
||||
string lot;
|
||||
string rds;
|
||||
string psn;
|
||||
string zone;
|
||||
string layer;
|
||||
string reactor;
|
||||
string employee;
|
||||
ScanPast("Lot :");
|
||||
if (headerText.Contains("Ramp Rate :"))
|
||||
lot = GetBefore("Ramp Rate :");
|
||||
else if (headerText.Contains("Forward Rate :"))
|
||||
lot = GetBefore("Forward Rate :");
|
||||
else if (headerText.Contains("Conduct Type:"))
|
||||
lot = GetBefore("Conduct Type:");
|
||||
else
|
||||
lot = string.Empty;
|
||||
Descriptor descriptor = GetDescriptor(lot);
|
||||
lot = descriptor.Lot;
|
||||
psn = descriptor.PSN;
|
||||
rds = descriptor.RDS;
|
||||
zone = descriptor.Zone;
|
||||
layer = descriptor.Layer;
|
||||
reactor = descriptor.Reactor;
|
||||
employee = descriptor.Employee;
|
||||
Lot = lot;
|
||||
PSN = psn;
|
||||
RDS = rds;
|
||||
Zone = zone;
|
||||
Layer = layer;
|
||||
Reactor = reactor;
|
||||
Employee = employee;
|
||||
UniqueId = string.Format("{0}_{1}_{2}", logistics.JobID, lot, Path.GetFileNameWithoutExtension(logistics.ReportFullPath));
|
||||
}
|
||||
|
||||
private void Parse(IFileRead fileRead, Logistics logistics, List<FileInfo> fileInfoCollection, string ghostPCLFileName, string pdfTextStripperFileName)
|
||||
{
|
||||
if (fileRead is null)
|
||||
@ -280,22 +386,12 @@ public class ProcessData : IProcessData
|
||||
_Data = headerText;
|
||||
_Log.Debug($"****MERCURY-DATA [002]= {headerText}");
|
||||
ScanPast("Operator:");
|
||||
Employee = GetBefore("Start Voltage:");
|
||||
_ = GetBefore("Start Voltage:");
|
||||
StartVoltage = GetBefore("V");
|
||||
ScanPast("Wafer :");
|
||||
Wafer = GetBefore("S Voltage :"); // This is actually "Stop Voltage"
|
||||
StopVoltage = GetBefore("V");
|
||||
ScanPast("Lot :");
|
||||
if (headerText.Contains("Ramp Rate :"))
|
||||
Lot = GetBefore("Ramp Rate :");
|
||||
else if (headerText.Contains("Forward Rate :"))
|
||||
Lot = GetBefore("Forward Rate :");
|
||||
else if (headerText.Contains("Conduct Type:"))
|
||||
Lot = GetBefore("Conduct Type:");
|
||||
else
|
||||
Lot = string.Empty;
|
||||
// Remove illegal characters \/:*?"<>| found in the Lot.
|
||||
Lot = Regex.Replace(Lot, @"[\\,\/,\:,\*,\?,\"",\<,\>,\|]", "_").Split('\r')[0].Split('\n')[0];
|
||||
Set(logistics, headerText);
|
||||
RampRate = GetBefore("mV/sec");
|
||||
ScanPast("Plan :");
|
||||
Plan = GetBefore("G limit :");
|
||||
@ -360,28 +456,6 @@ public class ProcessData : IProcessData
|
||||
RsMean = GetToken();
|
||||
RsStdDev = GetToken();
|
||||
RsRadialGradient = GetToken();
|
||||
|
||||
string lot = Lot;
|
||||
string[] segments = lot.Split('-');
|
||||
|
||||
if (segments.Length >= 1)
|
||||
Reactor = segments[0];
|
||||
|
||||
if (segments.Length >= 2)
|
||||
RDS = segments[1];
|
||||
|
||||
if (segments.Length >= 3)
|
||||
{
|
||||
string str = segments[2];
|
||||
string[] segmentsB = str.Split('.');
|
||||
if (segmentsB.Length >= 1)
|
||||
PSN = segmentsB[0];
|
||||
if (segmentsB.Length >= 2)
|
||||
Layer = segmentsB[1];
|
||||
}
|
||||
if (segments.Length >= 4)
|
||||
Zone = segments[3];
|
||||
|
||||
//ScanPast("Flat Z: Grade : % Flat Z: Grade : % Flat Z: Grade : %");
|
||||
ScanPast("Flat Z: Grade : % Flat Z: Grade : % Flat Z: Grade : %");
|
||||
string token = GetToken();
|
||||
@ -403,7 +477,6 @@ public class ProcessData : IProcessData
|
||||
hgProbeDetail.Phase = GetToken();
|
||||
_ = GetToEOL();
|
||||
hgProbeDetail.Grade = GetToken();
|
||||
;
|
||||
hgProbeDetail.UniqueId = string.Concat("_Point-", _Details.Count + 1);
|
||||
_Details.Add(hgProbeDetail);
|
||||
_ = GetToken();
|
||||
@ -422,14 +495,12 @@ public class ProcessData : IProcessData
|
||||
}
|
||||
}
|
||||
}
|
||||
;
|
||||
UniqueId = string.Format("{0}_{1}_{2}", logistics.JobID, Lot, Path.GetFileNameWithoutExtension(logistics.ReportFullPath));
|
||||
foreach (Detail detail in _Details.Cast<Detail>())
|
||||
{
|
||||
detail.HeaderUniqueId = UniqueId;
|
||||
detail.UniqueId = string.Concat(detail, detail.UniqueId);
|
||||
}
|
||||
fileInfoCollection.Add(new FileInfo(logistics.ReportFullPath));
|
||||
fileInfoCollection.Add(logistics.FileInfo);
|
||||
}
|
||||
|
||||
#nullable enable
|
||||
|
@ -62,7 +62,7 @@
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
</PackageReference>
|
||||
<PackageReference Include="FFMpegCore" Version="4.8.0" />
|
||||
<PackageReference Include="Infineon.Monitoring.MonA" Version="2.0.0" />
|
||||
<PackageReference Include="Infineon.Monitoring.MonA" Version="3.0.0" />
|
||||
<PackageReference Include="Infineon.Yoda" Version="5.4.1" />
|
||||
<PackageReference Include="Instances" Version="2.0.0" />
|
||||
<PackageReference Include="RoboSharp" Version="1.2.7" />
|
||||
|
@ -54,6 +54,7 @@ public class FileRead : Properties.IFileRead
|
||||
string Properties.IFileRead.EventName => _EventName;
|
||||
string Properties.IFileRead.MesEntity => _MesEntity;
|
||||
bool Properties.IFileRead.IsEAFHosted => _IsEAFHosted;
|
||||
bool Properties.IFileRead.IsDuplicator => _IsDuplicator;
|
||||
string Properties.IFileRead.EquipmentType => _EquipmentType;
|
||||
string Properties.IFileRead.ReportFullPath => _ReportFullPath;
|
||||
string Properties.IFileRead.CellInstanceName => _CellInstanceName;
|
||||
|
@ -9,34 +9,46 @@ namespace Adaptation.Shared;
|
||||
public class Logistics : ILogistics
|
||||
{
|
||||
|
||||
public object NullData { get; private set; }
|
||||
public string JobID { get; private set; } //CellName
|
||||
public long Sequence { get; private set; } //Ticks
|
||||
public DateTime DateTimeFromSequence { get; private set; }
|
||||
public double TotalSecondsSinceLastWriteTimeFromSequence { get; private set; }
|
||||
public string MesEntity { get; private set; } //SPC
|
||||
public string ReportFullPath { get; private set; } //Extract file
|
||||
public string ProcessJobID { get; set; } //Reactor (duplicate but I want it in the logistics)
|
||||
public string MID { get; set; } //Lot & Pocket || Lot
|
||||
public List<string> Tags { get; set; }
|
||||
public List<string> Logistics1 { get; set; }
|
||||
public List<Logistics2> Logistics2 { get; set; }
|
||||
protected readonly DateTime _DateTimeFromSequence;
|
||||
protected readonly FileInfo _FileInfo;
|
||||
protected readonly string _JobID;
|
||||
protected readonly List<string> _Logistics1;
|
||||
protected readonly List<Logistics2> _Logistics2;
|
||||
protected string _MID;
|
||||
protected readonly string _MesEntity;
|
||||
protected readonly object _NullData;
|
||||
protected string _ProcessJobID;
|
||||
protected readonly string _ReportFullPath;
|
||||
protected readonly long _Sequence;
|
||||
protected readonly double _TotalSecondsSinceLastWriteTimeFromSequence;
|
||||
|
||||
public DateTime DateTimeFromSequence => _DateTimeFromSequence;
|
||||
public FileInfo FileInfo => _FileInfo;
|
||||
public string JobID => _JobID;
|
||||
public List<string> Logistics1 => _Logistics1;
|
||||
public List<Logistics2> Logistics2 => _Logistics2;
|
||||
public string MID => _MID;
|
||||
public string MesEntity => _MesEntity;
|
||||
public object NullData => _NullData;
|
||||
public string ProcessJobID => _ProcessJobID;
|
||||
public string ReportFullPath => _ReportFullPath;
|
||||
public long Sequence => _Sequence;
|
||||
public double TotalSecondsSinceLastWriteTimeFromSequence => _TotalSecondsSinceLastWriteTimeFromSequence;
|
||||
|
||||
public Logistics(IFileRead fileRead)
|
||||
{
|
||||
DateTime dateTime = DateTime.Now;
|
||||
NullData = null;
|
||||
Sequence = dateTime.Ticks;
|
||||
DateTimeFromSequence = dateTime;
|
||||
JobID = fileRead.CellInstanceName;
|
||||
TotalSecondsSinceLastWriteTimeFromSequence = (DateTime.Now - dateTime).TotalSeconds;
|
||||
MesEntity = DefaultMesEntity(dateTime);
|
||||
ReportFullPath = string.Empty;
|
||||
ProcessJobID = nameof(ProcessJobID);
|
||||
MID = nameof(MID);
|
||||
Tags = new List<string>();
|
||||
Logistics1 = new string[] { string.Concat("LOGISTICS_1", '\t', "A_JOBID=", JobID, ";A_MES_ENTITY=", MesEntity, ";") }.ToList();
|
||||
Logistics2 = new List<Logistics2>();
|
||||
_NullData = null;
|
||||
_Sequence = dateTime.Ticks;
|
||||
_DateTimeFromSequence = dateTime;
|
||||
_JobID = fileRead.CellInstanceName;
|
||||
_TotalSecondsSinceLastWriteTimeFromSequence = (DateTime.Now - dateTime).TotalSeconds;
|
||||
_MesEntity = DefaultMesEntity(dateTime);
|
||||
_ReportFullPath = string.Empty;
|
||||
_ProcessJobID = nameof(ProcessJobID);
|
||||
_MID = nameof(MID);
|
||||
_Logistics1 = new string[] { string.Concat("LOGISTICS_1", '\t', "A_JOBID=", JobID, ";A_MES_ENTITY=", MesEntity, ";") }.ToList();
|
||||
_Logistics2 = new List<Logistics2>();
|
||||
}
|
||||
|
||||
public Logistics(IFileRead fileRead, string reportFullPath, bool useSplitForMID, int? fileInfoLength = null)
|
||||
@ -45,19 +57,19 @@ public class Logistics : ILogistics
|
||||
throw new Exception();
|
||||
if (string.IsNullOrEmpty(fileRead.MesEntity))
|
||||
throw new Exception();
|
||||
NullData = fileRead.NullData;
|
||||
FileInfo fileInfo = new(reportFullPath);
|
||||
DateTime dateTime = fileInfo.LastWriteTime;
|
||||
if (fileInfoLength.HasValue && fileInfo.Length < fileInfoLength.Value)
|
||||
_NullData = fileRead.NullData;
|
||||
_FileInfo = new(reportFullPath);
|
||||
DateTime dateTime = _FileInfo.LastWriteTime;
|
||||
if (fileInfoLength.HasValue && _FileInfo.Length < fileInfoLength.Value)
|
||||
dateTime = dateTime.AddTicks(-1);
|
||||
JobID = fileRead.CellInstanceName;
|
||||
Sequence = dateTime.Ticks;
|
||||
DateTimeFromSequence = dateTime;
|
||||
TotalSecondsSinceLastWriteTimeFromSequence = (DateTime.Now - dateTime).TotalSeconds;
|
||||
MesEntity = fileRead.MesEntity;
|
||||
ReportFullPath = fileInfo.FullName;
|
||||
ProcessJobID = nameof(ProcessJobID);
|
||||
string fileNameWithoutExtension = Path.GetFileNameWithoutExtension(fileInfo.FullName);
|
||||
_JobID = fileRead.CellInstanceName;
|
||||
_Sequence = dateTime.Ticks;
|
||||
_DateTimeFromSequence = dateTime;
|
||||
_TotalSecondsSinceLastWriteTimeFromSequence = (DateTime.Now - dateTime).TotalSeconds;
|
||||
_MesEntity = fileRead.MesEntity;
|
||||
_ReportFullPath = _FileInfo.FullName;
|
||||
_ProcessJobID = nameof(ProcessJobID);
|
||||
string fileNameWithoutExtension = Path.GetFileNameWithoutExtension(_FileInfo.FullName);
|
||||
if (useSplitForMID)
|
||||
{
|
||||
if (fileNameWithoutExtension.IndexOf(".") > -1)
|
||||
@ -67,10 +79,9 @@ public class Logistics : ILogistics
|
||||
if (fileNameWithoutExtension.IndexOf("-") > -1)
|
||||
fileNameWithoutExtension = fileNameWithoutExtension.Split('-')[0].Trim();
|
||||
}
|
||||
MID = string.Concat(fileNameWithoutExtension.Substring(0, 1).ToUpper(), fileNameWithoutExtension.Substring(1).ToLower());
|
||||
Tags = new List<string>();
|
||||
Logistics1 = new string[] { string.Concat("LOGISTICS_1", '\t', "A_JOBID=", JobID, ";A_MES_ENTITY=", MesEntity, ";") }.ToList();
|
||||
Logistics2 = new List<Logistics2>();
|
||||
_MID = string.Concat(fileNameWithoutExtension.Substring(0, 1).ToUpper(), fileNameWithoutExtension.Substring(1).ToLower());
|
||||
_Logistics1 = new string[] { string.Concat("LOGISTICS_1", '\t', "A_JOBID=", JobID, ";A_MES_ENTITY=", MesEntity, ";") }.ToList();
|
||||
_Logistics2 = new List<Logistics2>();
|
||||
}
|
||||
|
||||
public Logistics(string reportFullPath, string logistics)
|
||||
@ -78,57 +89,57 @@ public class Logistics : ILogistics
|
||||
string key;
|
||||
DateTime dateTime;
|
||||
string[] segments;
|
||||
Logistics1 = logistics.Split(new string[] { Environment.NewLine }, StringSplitOptions.RemoveEmptyEntries).ToList();
|
||||
_FileInfo = new(reportFullPath);
|
||||
_Logistics1 = logistics.Split(new string[] { Environment.NewLine }, StringSplitOptions.RemoveEmptyEntries).ToList();
|
||||
if (!Logistics1.Any() || !Logistics1[0].StartsWith("LOGISTICS_1"))
|
||||
{
|
||||
NullData = null;
|
||||
JobID = "null";
|
||||
dateTime = new FileInfo(reportFullPath).LastWriteTime;
|
||||
Sequence = dateTime.Ticks;
|
||||
DateTimeFromSequence = dateTime;
|
||||
TotalSecondsSinceLastWriteTimeFromSequence = (DateTime.Now - dateTime).TotalSeconds;
|
||||
MesEntity = DefaultMesEntity(dateTime);
|
||||
ReportFullPath = reportFullPath;
|
||||
ProcessJobID = "R##";
|
||||
MID = "null";
|
||||
Tags = new List<string>();
|
||||
Logistics1 = new string[] { string.Concat("LOGISTICS_1", '\t', "A_JOBID=", JobID, ";A_MES_ENTITY=", MesEntity, ";") }.ToList();
|
||||
Logistics2 = new List<Logistics2>();
|
||||
_NullData = null;
|
||||
_JobID = "null";
|
||||
dateTime = _FileInfo.LastWriteTime;
|
||||
_Sequence = dateTime.Ticks;
|
||||
_DateTimeFromSequence = dateTime;
|
||||
_TotalSecondsSinceLastWriteTimeFromSequence = (DateTime.Now - dateTime).TotalSeconds;
|
||||
_MesEntity = DefaultMesEntity(dateTime);
|
||||
_ReportFullPath = reportFullPath;
|
||||
_ProcessJobID = "R##";
|
||||
_MID = "null";
|
||||
_Logistics1 = new string[] { string.Concat("LOGISTICS_1", '\t', "A_JOBID=", JobID, ";A_MES_ENTITY=", MesEntity, ";") }.ToList();
|
||||
_Logistics2 = new List<Logistics2>();
|
||||
}
|
||||
else
|
||||
{
|
||||
string logistics1Line1 = Logistics1[0];
|
||||
key = "NULL_DATA=";
|
||||
if (!logistics1Line1.Contains(key))
|
||||
NullData = null;
|
||||
_NullData = null;
|
||||
else
|
||||
{
|
||||
segments = logistics1Line1.Split(new string[] { key }, StringSplitOptions.RemoveEmptyEntries);
|
||||
NullData = segments[1].Split(';')[0];
|
||||
_NullData = segments[1].Split(';')[0];
|
||||
}
|
||||
key = "JOBID=";
|
||||
if (!logistics1Line1.Contains(key))
|
||||
JobID = "null";
|
||||
_JobID = "null";
|
||||
else
|
||||
{
|
||||
segments = logistics1Line1.Split(new string[] { key }, StringSplitOptions.RemoveEmptyEntries);
|
||||
JobID = segments[1].Split(';')[0];
|
||||
_JobID = segments[1].Split(';')[0];
|
||||
}
|
||||
key = "SEQUENCE=";
|
||||
if (!logistics1Line1.Contains(key))
|
||||
dateTime = new FileInfo(reportFullPath).LastWriteTime;
|
||||
dateTime = _FileInfo.LastWriteTime;
|
||||
else
|
||||
{
|
||||
segments = logistics1Line1.Split(new string[] { key }, StringSplitOptions.RemoveEmptyEntries);
|
||||
if (!long.TryParse(segments[1].Split(';')[0].Split('.')[0], out long sequence) || sequence < new DateTime(1999, 1, 1).Ticks)
|
||||
dateTime = new FileInfo(reportFullPath).LastWriteTime;
|
||||
dateTime = _FileInfo.LastWriteTime;
|
||||
else
|
||||
dateTime = new DateTime(sequence);
|
||||
}
|
||||
Sequence = dateTime.Ticks;
|
||||
DateTimeFromSequence = dateTime;
|
||||
TotalSecondsSinceLastWriteTimeFromSequence = (DateTime.Now - dateTime).TotalSeconds;
|
||||
DateTime lastWriteTime = new FileInfo(reportFullPath).LastWriteTime;
|
||||
_Sequence = dateTime.Ticks;
|
||||
_DateTimeFromSequence = dateTime;
|
||||
_TotalSecondsSinceLastWriteTimeFromSequence = (DateTime.Now - dateTime).TotalSeconds;
|
||||
DateTime lastWriteTime = _FileInfo.LastWriteTime;
|
||||
if (TotalSecondsSinceLastWriteTimeFromSequence > 600)
|
||||
{
|
||||
if (lastWriteTime != dateTime)
|
||||
@ -138,33 +149,32 @@ public class Logistics : ILogistics
|
||||
}
|
||||
key = "MES_ENTITY=";
|
||||
if (!logistics1Line1.Contains(key))
|
||||
MesEntity = DefaultMesEntity(dateTime);
|
||||
_MesEntity = DefaultMesEntity(dateTime);
|
||||
else
|
||||
{
|
||||
segments = logistics1Line1.Split(new string[] { key }, StringSplitOptions.RemoveEmptyEntries);
|
||||
MesEntity = segments[1].Split(';')[0];
|
||||
_MesEntity = segments[1].Split(';')[0];
|
||||
}
|
||||
ReportFullPath = reportFullPath;
|
||||
_ReportFullPath = reportFullPath;
|
||||
key = "PROCESS_JOBID=";
|
||||
if (!logistics1Line1.Contains(key))
|
||||
ProcessJobID = "R##";
|
||||
_ProcessJobID = "R##";
|
||||
else
|
||||
{
|
||||
segments = logistics1Line1.Split(new string[] { key }, StringSplitOptions.RemoveEmptyEntries);
|
||||
ProcessJobID = segments[1].Split(';')[0];
|
||||
_ProcessJobID = segments[1].Split(';')[0];
|
||||
}
|
||||
key = "MID=";
|
||||
if (!logistics1Line1.Contains(key))
|
||||
MID = "null";
|
||||
_MID = "null";
|
||||
else
|
||||
{
|
||||
segments = logistics1Line1.Split(new string[] { key }, StringSplitOptions.RemoveEmptyEntries);
|
||||
MID = segments[1].Split(';')[0];
|
||||
_MID = segments[1].Split(';')[0];
|
||||
}
|
||||
}
|
||||
Logistics2 logistics2;
|
||||
Tags = new List<string>();
|
||||
Logistics2 = new List<Logistics2>();
|
||||
_Logistics2 = new List<Logistics2>();
|
||||
for (int i = 1; i < Logistics1.Count; i++)
|
||||
{
|
||||
if (Logistics1[i].StartsWith("LOGISTICS_2"))
|
||||
@ -180,29 +190,12 @@ public class Logistics : ILogistics
|
||||
}
|
||||
}
|
||||
|
||||
public Logistics ShallowCopy() => (Logistics)MemberwiseClone();
|
||||
|
||||
private static string DefaultMesEntity(DateTime dateTime) => string.Concat(dateTime.Ticks, "_MES_ENTITY");
|
||||
|
||||
internal string GetLotViaMostCommonMethod() => MID.Substring(0, MID.Length - 2);
|
||||
|
||||
internal string GetPocketNumberViaMostCommonMethod() => MID.Substring(MID.Length - 2);
|
||||
|
||||
internal void Update(string dateTime, string processJobID, string mid)
|
||||
internal void Update(string mid, string processJobID)
|
||||
{
|
||||
if (!DateTime.TryParse(dateTime, out DateTime dateTimeCasted))
|
||||
dateTimeCasted = DateTime.Now;
|
||||
NullData = null;
|
||||
//JobID = Description.GetCellName();
|
||||
Sequence = dateTimeCasted.Ticks;
|
||||
DateTimeFromSequence = dateTimeCasted;
|
||||
TotalSecondsSinceLastWriteTimeFromSequence = (DateTime.Now - dateTimeCasted).TotalSeconds;
|
||||
//MesEntity = DefaultMesEntity(dateTime);
|
||||
//ReportFullPath = string.Empty;
|
||||
ProcessJobID = processJobID;
|
||||
MID = mid;
|
||||
Tags = new List<string>();
|
||||
Logistics1 = new string[] { string.Concat("LOGISTICS_1", '\t', "A_JOBID=", JobID, ";A_MES_ENTITY=", MesEntity, ";") }.ToList();
|
||||
Logistics2 = new List<Logistics2>();
|
||||
_MID = mid;
|
||||
_ProcessJobID = processJobID;
|
||||
}
|
||||
|
||||
}
|
@ -12,8 +12,6 @@ namespace Adaptation.Shared;
|
||||
public class ProcessDataStandardFormat
|
||||
{
|
||||
|
||||
public const string RecordStart = "RECORD_START";
|
||||
|
||||
public enum SearchFor
|
||||
{
|
||||
EquipmentIntegration = 1,
|
||||
|
@ -7,6 +7,7 @@ public interface IFileRead
|
||||
string MesEntity { get; }
|
||||
bool IsEAFHosted { get; }
|
||||
string EventName { get; }
|
||||
bool IsDuplicator { get; }
|
||||
string EquipmentType { get; }
|
||||
string ReportFullPath { get; }
|
||||
string CellInstanceName { get; }
|
||||
|
@ -1,22 +1,23 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
|
||||
namespace Adaptation.Shared.Properties;
|
||||
|
||||
public interface ILogistics
|
||||
{
|
||||
|
||||
public object NullData { get; }
|
||||
public string JobID { get; } //CellName
|
||||
public long Sequence { get; } //Ticks
|
||||
public DateTime DateTimeFromSequence { get; }
|
||||
public FileInfo FileInfo { get; }
|
||||
public string JobID { get; }
|
||||
public List<string> Logistics1 { get; }
|
||||
public List<Logistics2> Logistics2 { get; }
|
||||
public string MID { get; }
|
||||
public string MesEntity { get; }
|
||||
public object NullData { get; }
|
||||
public string ProcessJobID { get; }
|
||||
public string ReportFullPath { get; }
|
||||
public long Sequence { get; }
|
||||
public double TotalSecondsSinceLastWriteTimeFromSequence { get; }
|
||||
public string MesEntity { get; } //SPC
|
||||
public string ReportFullPath { get; } //Extract file
|
||||
public string ProcessJobID { get; set; } //Reactor (duplicate but I want it in the logistics)
|
||||
public string MID { get; set; } //Lot & Pocket || Lot
|
||||
public List<string> Tags { get; set; }
|
||||
public List<string> Logistics1 { get; set; }
|
||||
public List<Logistics2> Logistics2 { get; set; }
|
||||
|
||||
}
|
@ -15,15 +15,16 @@ public class HGCV1 : EAFLoggingUnitTesting
|
||||
#pragma warning disable CA2254
|
||||
#pragma warning disable IDE0060
|
||||
|
||||
internal static string DummyRoot { get; private set; }
|
||||
internal static HGCV1 EAFLoggingUnitTesting { get; private set; }
|
||||
|
||||
public HGCV1() : base(testContext: null, declaringType: null, skipEquipmentDictionary: false)
|
||||
public HGCV1() : base(DummyRoot, testContext: null, declaringType: null, skipEquipmentDictionary: false)
|
||||
{
|
||||
if (EAFLoggingUnitTesting is null)
|
||||
throw new Exception();
|
||||
}
|
||||
|
||||
public HGCV1(TestContext testContext) : base(testContext, new StackFrame().GetMethod().DeclaringType, skipEquipmentDictionary: false)
|
||||
public HGCV1(TestContext testContext) : base(DummyRoot, testContext, new StackFrame().GetMethod().DeclaringType, skipEquipmentDictionary: false)
|
||||
{
|
||||
}
|
||||
|
||||
@ -47,6 +48,9 @@ public class HGCV1 : EAFLoggingUnitTesting
|
||||
EAFLoggingUnitTesting.Dispose();
|
||||
}
|
||||
|
||||
#if true
|
||||
[Ignore]
|
||||
#endif
|
||||
[TestMethod]
|
||||
public void Staging__v2_39_0__HGCV1__pcl()
|
||||
{
|
||||
|
@ -15,15 +15,16 @@ public class HGCV2 : EAFLoggingUnitTesting
|
||||
#pragma warning disable CA2254
|
||||
#pragma warning disable IDE0060
|
||||
|
||||
internal static string DummyRoot { get; private set; }
|
||||
internal static HGCV2 EAFLoggingUnitTesting { get; private set; }
|
||||
|
||||
public HGCV2() : base(testContext: null, declaringType: null, skipEquipmentDictionary: false)
|
||||
public HGCV2() : base(DummyRoot, testContext: null, declaringType: null, skipEquipmentDictionary: false)
|
||||
{
|
||||
if (EAFLoggingUnitTesting is null)
|
||||
throw new Exception();
|
||||
}
|
||||
|
||||
public HGCV2(TestContext testContext) : base(testContext, new StackFrame().GetMethod().DeclaringType, skipEquipmentDictionary: false)
|
||||
public HGCV2(TestContext testContext) : base(DummyRoot, testContext, new StackFrame().GetMethod().DeclaringType, skipEquipmentDictionary: false)
|
||||
{
|
||||
}
|
||||
|
||||
@ -47,6 +48,9 @@ public class HGCV2 : EAFLoggingUnitTesting
|
||||
EAFLoggingUnitTesting.Dispose();
|
||||
}
|
||||
|
||||
#if true
|
||||
[Ignore]
|
||||
#endif
|
||||
[TestMethod]
|
||||
public void Staging__v2_39_0__HGCV2__pcl()
|
||||
{
|
||||
|
@ -15,15 +15,16 @@ public class HGCV3 : EAFLoggingUnitTesting
|
||||
#pragma warning disable CA2254
|
||||
#pragma warning disable IDE0060
|
||||
|
||||
internal static string DummyRoot { get; private set; }
|
||||
internal static HGCV3 EAFLoggingUnitTesting { get; private set; }
|
||||
|
||||
public HGCV3() : base(testContext: null, declaringType: null, skipEquipmentDictionary: false)
|
||||
public HGCV3() : base(DummyRoot, testContext: null, declaringType: null, skipEquipmentDictionary: false)
|
||||
{
|
||||
if (EAFLoggingUnitTesting is null)
|
||||
throw new Exception();
|
||||
}
|
||||
|
||||
public HGCV3(TestContext testContext) : base(testContext, new StackFrame().GetMethod().DeclaringType, skipEquipmentDictionary: false)
|
||||
public HGCV3(TestContext testContext) : base(DummyRoot, testContext, new StackFrame().GetMethod().DeclaringType, skipEquipmentDictionary: false)
|
||||
{
|
||||
}
|
||||
|
||||
@ -47,6 +48,9 @@ public class HGCV3 : EAFLoggingUnitTesting
|
||||
EAFLoggingUnitTesting.Dispose();
|
||||
}
|
||||
|
||||
#if true
|
||||
[Ignore]
|
||||
#endif
|
||||
[TestMethod]
|
||||
public void Staging__v2_39_0__HGCV3__pcl()
|
||||
{
|
||||
|
@ -15,15 +15,16 @@ public class MET08RESIHGCV : EAFLoggingUnitTesting
|
||||
#pragma warning disable CA2254
|
||||
#pragma warning disable IDE0060
|
||||
|
||||
internal static string DummyRoot { get; private set; }
|
||||
internal static MET08RESIHGCV EAFLoggingUnitTesting { get; private set; }
|
||||
|
||||
public MET08RESIHGCV() : base(testContext: null, declaringType: null, skipEquipmentDictionary: false)
|
||||
public MET08RESIHGCV() : base(DummyRoot, testContext: null, declaringType: null, skipEquipmentDictionary: false)
|
||||
{
|
||||
if (EAFLoggingUnitTesting is null)
|
||||
throw new Exception();
|
||||
}
|
||||
|
||||
public MET08RESIHGCV(TestContext testContext) : base(testContext, new StackFrame().GetMethod().DeclaringType, skipEquipmentDictionary: false)
|
||||
public MET08RESIHGCV(TestContext testContext) : base(DummyRoot, testContext, new StackFrame().GetMethod().DeclaringType, skipEquipmentDictionary: false)
|
||||
{
|
||||
}
|
||||
|
||||
@ -47,6 +48,9 @@ public class MET08RESIHGCV : EAFLoggingUnitTesting
|
||||
EAFLoggingUnitTesting.Dispose();
|
||||
}
|
||||
|
||||
#if true
|
||||
[Ignore]
|
||||
#endif
|
||||
[TestMethod]
|
||||
public void Staging__v2_39_0__MET08RESIHGCV__MET08RESIHGCV()
|
||||
{
|
||||
@ -57,6 +61,9 @@ public class MET08RESIHGCV : EAFLoggingUnitTesting
|
||||
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
|
||||
}
|
||||
|
||||
#if true
|
||||
[Ignore]
|
||||
#endif
|
||||
[TestMethod]
|
||||
public void Staging__v2_39_0__MET08RESIHGCV__MET08RESIHGCV_()
|
||||
{
|
||||
@ -67,6 +74,9 @@ public class MET08RESIHGCV : EAFLoggingUnitTesting
|
||||
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
|
||||
}
|
||||
|
||||
#if true
|
||||
[Ignore]
|
||||
#endif
|
||||
[TestMethod]
|
||||
public void Staging__v2_39_0__MET08RESIHGCV__MET08RESIHGCV__()
|
||||
{
|
||||
@ -77,6 +87,9 @@ public class MET08RESIHGCV : EAFLoggingUnitTesting
|
||||
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
|
||||
}
|
||||
|
||||
#if true
|
||||
[Ignore]
|
||||
#endif
|
||||
[TestMethod]
|
||||
public void Staging__v2_39_0__MET08RESIHGCV__MET08RESIHGCV___()
|
||||
{
|
||||
@ -87,6 +100,9 @@ public class MET08RESIHGCV : EAFLoggingUnitTesting
|
||||
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
|
||||
}
|
||||
|
||||
#if true
|
||||
[Ignore]
|
||||
#endif
|
||||
[TestMethod]
|
||||
public void Staging__v2_39_0__MET08RESIHGCV__MET08RESIHGCV____()
|
||||
{
|
||||
@ -97,6 +113,9 @@ public class MET08RESIHGCV : EAFLoggingUnitTesting
|
||||
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
|
||||
}
|
||||
|
||||
#if true
|
||||
[Ignore]
|
||||
#endif
|
||||
[TestMethod]
|
||||
public void Staging__v2_39_0__MET08RESIHGCV__MET08RESIHGCV_____()
|
||||
{
|
||||
@ -107,6 +126,9 @@ public class MET08RESIHGCV : EAFLoggingUnitTesting
|
||||
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
|
||||
}
|
||||
|
||||
#if true
|
||||
[Ignore]
|
||||
#endif
|
||||
[TestMethod]
|
||||
public void Staging__v2_39_0__MET08RESIHGCV__MET08RESIHGCV______()
|
||||
{
|
||||
@ -117,6 +139,9 @@ public class MET08RESIHGCV : EAFLoggingUnitTesting
|
||||
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
|
||||
}
|
||||
|
||||
#if true
|
||||
[Ignore]
|
||||
#endif
|
||||
[TestMethod]
|
||||
public void Staging__v2_39_0__MET08RESIHGCV__MET08RESIHGCV_______()
|
||||
{
|
||||
@ -127,6 +152,9 @@ public class MET08RESIHGCV : EAFLoggingUnitTesting
|
||||
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
|
||||
}
|
||||
|
||||
#if true
|
||||
[Ignore]
|
||||
#endif
|
||||
[TestMethod]
|
||||
public void Staging__v2_39_0__MET08RESIHGCV__MET08RESIHGCV________()
|
||||
{
|
||||
|
@ -15,15 +15,16 @@ public class HGCV1 : EAFLoggingUnitTesting
|
||||
#pragma warning disable CA2254
|
||||
#pragma warning disable IDE0060
|
||||
|
||||
internal static string DummyRoot { get; private set; }
|
||||
internal static HGCV1 EAFLoggingUnitTesting { get; private set; }
|
||||
|
||||
public HGCV1() : base(testContext: null, declaringType: null, skipEquipmentDictionary: false)
|
||||
public HGCV1() : base(DummyRoot, testContext: null, declaringType: null, skipEquipmentDictionary: false)
|
||||
{
|
||||
if (EAFLoggingUnitTesting is null)
|
||||
throw new Exception();
|
||||
}
|
||||
|
||||
public HGCV1(TestContext testContext) : base(testContext, new StackFrame().GetMethod().DeclaringType, skipEquipmentDictionary: false)
|
||||
public HGCV1(TestContext testContext) : base(DummyRoot, testContext, new StackFrame().GetMethod().DeclaringType, skipEquipmentDictionary: false)
|
||||
{
|
||||
}
|
||||
|
||||
@ -47,6 +48,9 @@ public class HGCV1 : EAFLoggingUnitTesting
|
||||
EAFLoggingUnitTesting.Dispose();
|
||||
}
|
||||
|
||||
#if true
|
||||
[Ignore]
|
||||
#endif
|
||||
[TestMethod]
|
||||
public void Staging__v2_43_0__HGCV1__pcl()
|
||||
{
|
||||
|
@ -15,15 +15,16 @@ public class HGCV2 : EAFLoggingUnitTesting
|
||||
#pragma warning disable CA2254
|
||||
#pragma warning disable IDE0060
|
||||
|
||||
internal static string DummyRoot { get; private set; }
|
||||
internal static HGCV2 EAFLoggingUnitTesting { get; private set; }
|
||||
|
||||
public HGCV2() : base(testContext: null, declaringType: null, skipEquipmentDictionary: false)
|
||||
public HGCV2() : base(DummyRoot, testContext: null, declaringType: null, skipEquipmentDictionary: false)
|
||||
{
|
||||
if (EAFLoggingUnitTesting is null)
|
||||
throw new Exception();
|
||||
}
|
||||
|
||||
public HGCV2(TestContext testContext) : base(testContext, new StackFrame().GetMethod().DeclaringType, skipEquipmentDictionary: false)
|
||||
public HGCV2(TestContext testContext) : base(DummyRoot, testContext, new StackFrame().GetMethod().DeclaringType, skipEquipmentDictionary: false)
|
||||
{
|
||||
}
|
||||
|
||||
@ -47,6 +48,9 @@ public class HGCV2 : EAFLoggingUnitTesting
|
||||
EAFLoggingUnitTesting.Dispose();
|
||||
}
|
||||
|
||||
#if true
|
||||
[Ignore]
|
||||
#endif
|
||||
[TestMethod]
|
||||
public void Staging__v2_43_0__HGCV2__pcl()
|
||||
{
|
||||
|
@ -15,15 +15,16 @@ public class HGCV3 : EAFLoggingUnitTesting
|
||||
#pragma warning disable CA2254
|
||||
#pragma warning disable IDE0060
|
||||
|
||||
internal static string DummyRoot { get; private set; }
|
||||
internal static HGCV3 EAFLoggingUnitTesting { get; private set; }
|
||||
|
||||
public HGCV3() : base(testContext: null, declaringType: null, skipEquipmentDictionary: false)
|
||||
public HGCV3() : base(DummyRoot, testContext: null, declaringType: null, skipEquipmentDictionary: false)
|
||||
{
|
||||
if (EAFLoggingUnitTesting is null)
|
||||
throw new Exception();
|
||||
}
|
||||
|
||||
public HGCV3(TestContext testContext) : base(testContext, new StackFrame().GetMethod().DeclaringType, skipEquipmentDictionary: false)
|
||||
public HGCV3(TestContext testContext) : base(DummyRoot, testContext, new StackFrame().GetMethod().DeclaringType, skipEquipmentDictionary: false)
|
||||
{
|
||||
}
|
||||
|
||||
@ -47,6 +48,9 @@ public class HGCV3 : EAFLoggingUnitTesting
|
||||
EAFLoggingUnitTesting.Dispose();
|
||||
}
|
||||
|
||||
#if true
|
||||
[Ignore]
|
||||
#endif
|
||||
[TestMethod]
|
||||
public void Staging__v2_43_0__HGCV3__pcl()
|
||||
{
|
||||
|
@ -15,15 +15,16 @@ public class MET08RESIHGCV : EAFLoggingUnitTesting
|
||||
#pragma warning disable CA2254
|
||||
#pragma warning disable IDE0060
|
||||
|
||||
internal static string DummyRoot { get; private set; }
|
||||
internal static MET08RESIHGCV EAFLoggingUnitTesting { get; private set; }
|
||||
|
||||
public MET08RESIHGCV() : base(testContext: null, declaringType: null, skipEquipmentDictionary: false)
|
||||
public MET08RESIHGCV() : base(DummyRoot, testContext: null, declaringType: null, skipEquipmentDictionary: false)
|
||||
{
|
||||
if (EAFLoggingUnitTesting is null)
|
||||
throw new Exception();
|
||||
}
|
||||
|
||||
public MET08RESIHGCV(TestContext testContext) : base(testContext, new StackFrame().GetMethod().DeclaringType, skipEquipmentDictionary: false)
|
||||
public MET08RESIHGCV(TestContext testContext) : base(DummyRoot, testContext, new StackFrame().GetMethod().DeclaringType, skipEquipmentDictionary: false)
|
||||
{
|
||||
}
|
||||
|
||||
@ -47,6 +48,9 @@ public class MET08RESIHGCV : EAFLoggingUnitTesting
|
||||
EAFLoggingUnitTesting.Dispose();
|
||||
}
|
||||
|
||||
#if true
|
||||
[Ignore]
|
||||
#endif
|
||||
[TestMethod]
|
||||
public void Staging__v2_43_0__MET08RESIHGCV__MoveMatchingFiles()
|
||||
{
|
||||
@ -57,6 +61,9 @@ public class MET08RESIHGCV : EAFLoggingUnitTesting
|
||||
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
|
||||
}
|
||||
|
||||
#if true
|
||||
[Ignore]
|
||||
#endif
|
||||
[TestMethod]
|
||||
public void Staging__v2_43_0__MET08RESIHGCV__OpenInsightMetrologyViewer()
|
||||
{
|
||||
@ -67,6 +74,9 @@ public class MET08RESIHGCV : EAFLoggingUnitTesting
|
||||
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
|
||||
}
|
||||
|
||||
#if true
|
||||
[Ignore]
|
||||
#endif
|
||||
[TestMethod]
|
||||
public void Staging__v2_43_0__MET08RESIHGCV__IQSSi()
|
||||
{
|
||||
@ -77,6 +87,9 @@ public class MET08RESIHGCV : EAFLoggingUnitTesting
|
||||
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
|
||||
}
|
||||
|
||||
#if true
|
||||
[Ignore]
|
||||
#endif
|
||||
[TestMethod]
|
||||
public void Staging__v2_43_0__MET08RESIHGCV__OpenInsight()
|
||||
{
|
||||
@ -87,6 +100,9 @@ public class MET08RESIHGCV : EAFLoggingUnitTesting
|
||||
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
|
||||
}
|
||||
|
||||
#if true
|
||||
[Ignore]
|
||||
#endif
|
||||
[TestMethod]
|
||||
public void Staging__v2_43_0__MET08RESIHGCV__OpenInsightMetrologyViewerAttachments()
|
||||
{
|
||||
@ -97,6 +113,9 @@ public class MET08RESIHGCV : EAFLoggingUnitTesting
|
||||
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
|
||||
}
|
||||
|
||||
#if true
|
||||
[Ignore]
|
||||
#endif
|
||||
[TestMethod]
|
||||
public void Staging__v2_43_0__MET08RESIHGCV__APC()
|
||||
{
|
||||
@ -107,6 +126,9 @@ public class MET08RESIHGCV : EAFLoggingUnitTesting
|
||||
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
|
||||
}
|
||||
|
||||
#if true
|
||||
[Ignore]
|
||||
#endif
|
||||
[TestMethod]
|
||||
public void Staging__v2_43_0__MET08RESIHGCV__SPaCe()
|
||||
{
|
||||
@ -117,6 +139,9 @@ public class MET08RESIHGCV : EAFLoggingUnitTesting
|
||||
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
|
||||
}
|
||||
|
||||
#if true
|
||||
[Ignore]
|
||||
#endif
|
||||
[TestMethod]
|
||||
public void Staging__v2_43_0__MET08RESIHGCV__Processed()
|
||||
{
|
||||
@ -127,6 +152,9 @@ public class MET08RESIHGCV : EAFLoggingUnitTesting
|
||||
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
|
||||
}
|
||||
|
||||
#if true
|
||||
[Ignore]
|
||||
#endif
|
||||
[TestMethod]
|
||||
public void Staging__v2_43_0__MET08RESIHGCV__Archive()
|
||||
{
|
||||
@ -137,6 +165,9 @@ public class MET08RESIHGCV : EAFLoggingUnitTesting
|
||||
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
|
||||
}
|
||||
|
||||
#if true
|
||||
[Ignore]
|
||||
#endif
|
||||
[TestMethod]
|
||||
public void Staging__v2_43_0__MET08RESIHGCV__Dummy()
|
||||
{
|
||||
|
@ -0,0 +1,66 @@
|
||||
using Adaptation._Tests.Shared;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Reflection;
|
||||
|
||||
namespace Adaptation._Tests.CreateSelfDescription.Staging.v2_43_4;
|
||||
|
||||
[TestClass]
|
||||
public class HGCV1 : EAFLoggingUnitTesting
|
||||
{
|
||||
|
||||
#pragma warning disable CA2254
|
||||
#pragma warning disable IDE0060
|
||||
|
||||
internal static string DummyRoot { get; private set; }
|
||||
internal static HGCV1 EAFLoggingUnitTesting { get; private set; }
|
||||
|
||||
static HGCV1() => DummyRoot = @"\\messv02ecc1.ec.local\EC_Characterization_Si\Dummy";
|
||||
|
||||
public HGCV1() : base(DummyRoot, testContext: null, declaringType: null, skipEquipmentDictionary: false)
|
||||
{
|
||||
if (EAFLoggingUnitTesting is null)
|
||||
throw new Exception();
|
||||
}
|
||||
|
||||
public HGCV1(TestContext testContext) : base(DummyRoot, testContext, new StackFrame().GetMethod().DeclaringType, skipEquipmentDictionary: false)
|
||||
{
|
||||
}
|
||||
|
||||
[ClassInitialize]
|
||||
public static void ClassInitialize(TestContext testContext)
|
||||
{
|
||||
if (EAFLoggingUnitTesting is null)
|
||||
EAFLoggingUnitTesting = new HGCV1(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()
|
||||
{
|
||||
if (EAFLoggingUnitTesting.Logger is not null)
|
||||
EAFLoggingUnitTesting.Logger.LogInformation("Cleanup");
|
||||
if (EAFLoggingUnitTesting is not null)
|
||||
EAFLoggingUnitTesting.Dispose();
|
||||
}
|
||||
|
||||
#if true
|
||||
[Ignore]
|
||||
#endif
|
||||
[TestMethod]
|
||||
public void Staging__v2_43_4__HGCV1__pcl()
|
||||
{
|
||||
string check = "*.pcl";
|
||||
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"));
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,66 @@
|
||||
using Adaptation._Tests.Shared;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Reflection;
|
||||
|
||||
namespace Adaptation._Tests.CreateSelfDescription.Staging.v2_43_4;
|
||||
|
||||
[TestClass]
|
||||
public class HGCV2 : EAFLoggingUnitTesting
|
||||
{
|
||||
|
||||
#pragma warning disable CA2254
|
||||
#pragma warning disable IDE0060
|
||||
|
||||
internal static string DummyRoot { get; private set; }
|
||||
internal static HGCV2 EAFLoggingUnitTesting { get; private set; }
|
||||
|
||||
static HGCV2() => DummyRoot = @"\\messv02ecc1.ec.local\EC_Characterization_Si\Dummy";
|
||||
|
||||
public HGCV2() : base(DummyRoot, testContext: null, declaringType: null, skipEquipmentDictionary: false)
|
||||
{
|
||||
if (EAFLoggingUnitTesting is null)
|
||||
throw new Exception();
|
||||
}
|
||||
|
||||
public HGCV2(TestContext testContext) : base(DummyRoot, testContext, new StackFrame().GetMethod().DeclaringType, skipEquipmentDictionary: false)
|
||||
{
|
||||
}
|
||||
|
||||
[ClassInitialize]
|
||||
public static void ClassInitialize(TestContext testContext)
|
||||
{
|
||||
if (EAFLoggingUnitTesting is null)
|
||||
EAFLoggingUnitTesting = new HGCV2(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()
|
||||
{
|
||||
if (EAFLoggingUnitTesting.Logger is not null)
|
||||
EAFLoggingUnitTesting.Logger.LogInformation("Cleanup");
|
||||
if (EAFLoggingUnitTesting is not null)
|
||||
EAFLoggingUnitTesting.Dispose();
|
||||
}
|
||||
|
||||
#if true
|
||||
[Ignore]
|
||||
#endif
|
||||
[TestMethod]
|
||||
public void Staging__v2_43_4__HGCV2__pcl()
|
||||
{
|
||||
string check = "*.pcl";
|
||||
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"));
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,66 @@
|
||||
using Adaptation._Tests.Shared;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Reflection;
|
||||
|
||||
namespace Adaptation._Tests.CreateSelfDescription.Staging.v2_43_4;
|
||||
|
||||
[TestClass]
|
||||
public class HGCV3 : EAFLoggingUnitTesting
|
||||
{
|
||||
|
||||
#pragma warning disable CA2254
|
||||
#pragma warning disable IDE0060
|
||||
|
||||
internal static string DummyRoot { get; private set; }
|
||||
internal static HGCV3 EAFLoggingUnitTesting { get; private set; }
|
||||
|
||||
static HGCV3() => DummyRoot = @"\\messv02ecc1.ec.local\EC_Characterization_Si\Dummy";
|
||||
|
||||
public HGCV3() : base(DummyRoot, testContext: null, declaringType: null, skipEquipmentDictionary: false)
|
||||
{
|
||||
if (EAFLoggingUnitTesting is null)
|
||||
throw new Exception();
|
||||
}
|
||||
|
||||
public HGCV3(TestContext testContext) : base(DummyRoot, testContext, new StackFrame().GetMethod().DeclaringType, skipEquipmentDictionary: false)
|
||||
{
|
||||
}
|
||||
|
||||
[ClassInitialize]
|
||||
public static void ClassInitialize(TestContext testContext)
|
||||
{
|
||||
if (EAFLoggingUnitTesting is null)
|
||||
EAFLoggingUnitTesting = new HGCV3(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()
|
||||
{
|
||||
if (EAFLoggingUnitTesting.Logger is not null)
|
||||
EAFLoggingUnitTesting.Logger.LogInformation("Cleanup");
|
||||
if (EAFLoggingUnitTesting is not null)
|
||||
EAFLoggingUnitTesting.Dispose();
|
||||
}
|
||||
|
||||
#if true
|
||||
[Ignore]
|
||||
#endif
|
||||
[TestMethod]
|
||||
public void Staging__v2_43_4__HGCV3__pcl()
|
||||
{
|
||||
string check = "*.pcl";
|
||||
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"));
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,183 @@
|
||||
using Adaptation._Tests.Shared;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Reflection;
|
||||
|
||||
namespace Adaptation._Tests.CreateSelfDescription.Staging.v2_43_4;
|
||||
|
||||
[TestClass]
|
||||
public class MET08RESIHGCV : EAFLoggingUnitTesting
|
||||
{
|
||||
|
||||
#pragma warning disable CA2254
|
||||
#pragma warning disable IDE0060
|
||||
|
||||
internal static string DummyRoot { get; private set; }
|
||||
internal static MET08RESIHGCV EAFLoggingUnitTesting { get; private set; }
|
||||
|
||||
static MET08RESIHGCV() => DummyRoot = @"\\messv02ecc1.ec.local\EC_Characterization_Si\Dummy";
|
||||
|
||||
public MET08RESIHGCV() : base(DummyRoot, testContext: null, declaringType: null, skipEquipmentDictionary: false)
|
||||
{
|
||||
if (EAFLoggingUnitTesting is null)
|
||||
throw new Exception();
|
||||
}
|
||||
|
||||
public MET08RESIHGCV(TestContext testContext) : base(DummyRoot, testContext, new StackFrame().GetMethod().DeclaringType, skipEquipmentDictionary: false)
|
||||
{
|
||||
}
|
||||
|
||||
[ClassInitialize]
|
||||
public static void ClassInitialize(TestContext testContext)
|
||||
{
|
||||
if (EAFLoggingUnitTesting is null)
|
||||
EAFLoggingUnitTesting = new MET08RESIHGCV(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()
|
||||
{
|
||||
if (EAFLoggingUnitTesting.Logger is not null)
|
||||
EAFLoggingUnitTesting.Logger.LogInformation("Cleanup");
|
||||
if (EAFLoggingUnitTesting is not null)
|
||||
EAFLoggingUnitTesting.Dispose();
|
||||
}
|
||||
|
||||
#if true
|
||||
[Ignore]
|
||||
#endif
|
||||
[TestMethod]
|
||||
public void Staging__v2_43_4__MET08RESIHGCV__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 true
|
||||
[Ignore]
|
||||
#endif
|
||||
[TestMethod]
|
||||
public void Staging__v2_43_4__MET08RESIHGCV__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 true
|
||||
[Ignore]
|
||||
#endif
|
||||
[TestMethod]
|
||||
public void Staging__v2_43_4__MET08RESIHGCV__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 true
|
||||
[Ignore]
|
||||
#endif
|
||||
[TestMethod]
|
||||
public void Staging__v2_43_4__MET08RESIHGCV__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 true
|
||||
[Ignore]
|
||||
#endif
|
||||
[TestMethod]
|
||||
public void Staging__v2_43_4__MET08RESIHGCV__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 true
|
||||
[Ignore]
|
||||
#endif
|
||||
[TestMethod]
|
||||
public void Staging__v2_43_4__MET08RESIHGCV__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 true
|
||||
[Ignore]
|
||||
#endif
|
||||
[TestMethod]
|
||||
public void Staging__v2_43_4__MET08RESIHGCV__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 true
|
||||
[Ignore]
|
||||
#endif
|
||||
[TestMethod]
|
||||
public void Staging__v2_43_4__MET08RESIHGCV__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 true
|
||||
[Ignore]
|
||||
#endif
|
||||
[TestMethod]
|
||||
public void Staging__v2_43_4__MET08RESIHGCV__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 true
|
||||
[Ignore]
|
||||
#endif
|
||||
[TestMethod]
|
||||
public void Staging__v2_43_4__MET08RESIHGCV__Dummy()
|
||||
{
|
||||
string check = "637400762024374000.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"));
|
||||
}
|
||||
|
||||
}
|
@ -22,9 +22,15 @@ public class HGCV3
|
||||
_HGCV3 = CreateSelfDescription.Staging.v2_39_0.HGCV3.EAFLoggingUnitTesting;
|
||||
}
|
||||
|
||||
#if true
|
||||
[Ignore]
|
||||
#endif
|
||||
[TestMethod]
|
||||
public void Staging__v2_39_0__HGCV3__pcl() => _HGCV3.Staging__v2_39_0__HGCV3__pcl();
|
||||
|
||||
#if true
|
||||
[Ignore]
|
||||
#endif
|
||||
[TestMethod]
|
||||
public void Staging__v2_39_0__HGCV3__pcl637812984345592512__MinFileLength()
|
||||
{
|
||||
@ -37,6 +43,9 @@ public class HGCV3
|
||||
_ = Shared.AdaptationTesting.ReExtractCompareUpdatePassDirectory(variables, fileRead, logistics);
|
||||
}
|
||||
|
||||
#if true
|
||||
[Ignore]
|
||||
#endif
|
||||
[TestMethod]
|
||||
public void Staging__v2_39_0__HGCV3__pcl637816384579205568__Normal()
|
||||
{
|
||||
|
@ -22,9 +22,15 @@ public class MET08RESIHGCV
|
||||
_MET08RESIHGCV = CreateSelfDescription.Staging.v2_39_0.MET08RESIHGCV.EAFLoggingUnitTesting;
|
||||
}
|
||||
|
||||
#if true
|
||||
[Ignore]
|
||||
#endif
|
||||
[TestMethod]
|
||||
public void Staging__v2_39_0__MET08RESIHGCV__MET08RESIHGCV() => _MET08RESIHGCV.Staging__v2_39_0__MET08RESIHGCV__MET08RESIHGCV();
|
||||
|
||||
#if true
|
||||
[Ignore]
|
||||
#endif
|
||||
[TestMethod]
|
||||
public void Staging__v2_39_0__MET08RESIHGCV__MET08RESIHGCV637710931421087642__Normal()
|
||||
{
|
||||
@ -37,30 +43,57 @@ public class MET08RESIHGCV
|
||||
_ = Shared.AdaptationTesting.ReExtractCompareUpdatePassDirectory(variables, fileRead, logistics);
|
||||
}
|
||||
|
||||
#if true
|
||||
[Ignore]
|
||||
#endif
|
||||
[TestMethod]
|
||||
public void Staging__v2_39_0__MET08RESIHGCV__MET08RESIHGCV_() => _MET08RESIHGCV.Staging__v2_39_0__MET08RESIHGCV__MET08RESIHGCV_();
|
||||
|
||||
#if true
|
||||
[Ignore]
|
||||
#endif
|
||||
[TestMethod]
|
||||
public void Staging__v2_39_0__MET08RESIHGCV__MET08RESIHGCV__() => _MET08RESIHGCV.Staging__v2_39_0__MET08RESIHGCV__MET08RESIHGCV__();
|
||||
|
||||
#if true
|
||||
[Ignore]
|
||||
#endif
|
||||
[TestMethod]
|
||||
public void Staging__v2_39_0__MET08RESIHGCV__MET08RESIHGCV___() => _MET08RESIHGCV.Staging__v2_39_0__MET08RESIHGCV__MET08RESIHGCV___();
|
||||
|
||||
#if true
|
||||
[Ignore]
|
||||
#endif
|
||||
[TestMethod]
|
||||
public void Staging__v2_39_0__MET08RESIHGCV__MET08RESIHGCV____() => _MET08RESIHGCV.Staging__v2_39_0__MET08RESIHGCV__MET08RESIHGCV____();
|
||||
|
||||
#if true
|
||||
[Ignore]
|
||||
#endif
|
||||
[TestMethod]
|
||||
public void Staging__v2_39_0__MET08RESIHGCV__MET08RESIHGCV_____() => _MET08RESIHGCV.Staging__v2_39_0__MET08RESIHGCV__MET08RESIHGCV_____();
|
||||
|
||||
#if true
|
||||
[Ignore]
|
||||
#endif
|
||||
[TestMethod]
|
||||
public void Staging__v2_39_0__MET08RESIHGCV__MET08RESIHGCV______() => _MET08RESIHGCV.Staging__v2_39_0__MET08RESIHGCV__MET08RESIHGCV______();
|
||||
|
||||
#if true
|
||||
[Ignore]
|
||||
#endif
|
||||
[TestMethod]
|
||||
public void Staging__v2_39_0__MET08RESIHGCV__MET08RESIHGCV_______() => _MET08RESIHGCV.Staging__v2_39_0__MET08RESIHGCV__MET08RESIHGCV_______();
|
||||
|
||||
#if true
|
||||
[Ignore]
|
||||
#endif
|
||||
[TestMethod]
|
||||
public void Staging__v2_39_0__MET08RESIHGCV__MET08RESIHGCV________() => _MET08RESIHGCV.Staging__v2_39_0__MET08RESIHGCV__MET08RESIHGCV________();
|
||||
|
||||
#if true
|
||||
[Ignore]
|
||||
#endif
|
||||
[TestMethod]
|
||||
public void Staging__v2_39_0__MET08RESIHGCV__MET08RESIHGCV________637816296802048814__Normal() => _MET08RESIHGCV.Staging__v2_39_0__MET08RESIHGCV__MET08RESIHGCV________();
|
||||
|
||||
|
@ -23,9 +23,15 @@ public class HGCV3
|
||||
_HGCV3 = CreateSelfDescription.Staging.v2_43_0.HGCV3.EAFLoggingUnitTesting;
|
||||
}
|
||||
|
||||
#if true
|
||||
[Ignore]
|
||||
#endif
|
||||
[TestMethod]
|
||||
public void Staging__v2_43_0__HGCV3__pcl() => _HGCV3.Staging__v2_43_0__HGCV3__pcl();
|
||||
|
||||
#if true
|
||||
[Ignore]
|
||||
#endif
|
||||
[TestMethod]
|
||||
[ExpectedException(typeof(Exception))]
|
||||
public void Staging__v2_43_0__HGCV3__pcl637812984345592512__MinFileLength()
|
||||
@ -39,6 +45,9 @@ public class HGCV3
|
||||
Assert.Fail();
|
||||
}
|
||||
|
||||
#if true
|
||||
[Ignore]
|
||||
#endif
|
||||
[TestMethod]
|
||||
public void Staging__v2_43_0__HGCV3__pcl637816384579205568__Normal()
|
||||
{
|
||||
|
@ -22,9 +22,15 @@ public class MET08RESIHGCV
|
||||
_MET08RESIHGCV = CreateSelfDescription.Staging.v2_43_0.MET08RESIHGCV.EAFLoggingUnitTesting;
|
||||
}
|
||||
|
||||
#if true
|
||||
[Ignore]
|
||||
#endif
|
||||
[TestMethod]
|
||||
public void Staging__v2_43_0__MET08RESIHGCV__MoveMatchingFiles() => _MET08RESIHGCV.Staging__v2_43_0__MET08RESIHGCV__MoveMatchingFiles();
|
||||
|
||||
#if true
|
||||
[Ignore]
|
||||
#endif
|
||||
[TestMethod]
|
||||
public void Staging__v2_43_0__MET08RESIHGCV__MoveMatchingFiles637816296802048814__Normal()
|
||||
{
|
||||
@ -37,30 +43,57 @@ public class MET08RESIHGCV
|
||||
_ = Shared.AdaptationTesting.ReExtractCompareUpdatePassDirectory(variables, fileRead, logistics, validatePDSF: false);
|
||||
}
|
||||
|
||||
#if true
|
||||
[Ignore]
|
||||
#endif
|
||||
[TestMethod]
|
||||
public void Staging__v2_43_0__MET08RESIHGCV__OpenInsightMetrologyViewer() => _MET08RESIHGCV.Staging__v2_43_0__MET08RESIHGCV__OpenInsightMetrologyViewer();
|
||||
|
||||
#if true
|
||||
[Ignore]
|
||||
#endif
|
||||
[TestMethod]
|
||||
public void Staging__v2_43_0__MET08RESIHGCV__IQSSi() => _MET08RESIHGCV.Staging__v2_43_0__MET08RESIHGCV__IQSSi();
|
||||
|
||||
#if true
|
||||
[Ignore]
|
||||
#endif
|
||||
[TestMethod]
|
||||
public void Staging__v2_43_0__MET08RESIHGCV__OpenInsight() => _MET08RESIHGCV.Staging__v2_43_0__MET08RESIHGCV__OpenInsight();
|
||||
|
||||
#if true
|
||||
[Ignore]
|
||||
#endif
|
||||
[TestMethod]
|
||||
public void Staging__v2_43_0__MET08RESIHGCV__OpenInsightMetrologyViewerAttachments() => _MET08RESIHGCV.Staging__v2_43_0__MET08RESIHGCV__OpenInsightMetrologyViewerAttachments();
|
||||
|
||||
#if true
|
||||
[Ignore]
|
||||
#endif
|
||||
[TestMethod]
|
||||
public void Staging__v2_43_0__MET08RESIHGCV__APC() => _MET08RESIHGCV.Staging__v2_43_0__MET08RESIHGCV__APC();
|
||||
|
||||
#if true
|
||||
[Ignore]
|
||||
#endif
|
||||
[TestMethod]
|
||||
public void Staging__v2_43_0__MET08RESIHGCV__SPaCe() => _MET08RESIHGCV.Staging__v2_43_0__MET08RESIHGCV__SPaCe();
|
||||
|
||||
#if true
|
||||
[Ignore]
|
||||
#endif
|
||||
[TestMethod]
|
||||
public void Staging__v2_43_0__MET08RESIHGCV__Processed() => _MET08RESIHGCV.Staging__v2_43_0__MET08RESIHGCV__Processed();
|
||||
|
||||
#if true
|
||||
[Ignore]
|
||||
#endif
|
||||
[TestMethod]
|
||||
public void Staging__v2_43_0__MET08RESIHGCV__Archive() => _MET08RESIHGCV.Staging__v2_43_0__MET08RESIHGCV__Archive();
|
||||
|
||||
#if true
|
||||
[Ignore]
|
||||
#endif
|
||||
[TestMethod]
|
||||
public void Staging__v2_43_0__MET08RESIHGCV__Dummy() => _MET08RESIHGCV.Staging__v2_43_0__MET08RESIHGCV__Dummy();
|
||||
|
||||
|
44
Adaptation/_Tests/Extract/Staging/v2.43.4/HGCV1.cs
Normal file
44
Adaptation/_Tests/Extract/Staging/v2.43.4/HGCV1.cs
Normal file
@ -0,0 +1,44 @@
|
||||
using Adaptation.Shared;
|
||||
using Adaptation.Shared.Methods;
|
||||
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||
using System.Diagnostics;
|
||||
using System.Reflection;
|
||||
|
||||
namespace Adaptation._Tests.Extract.Staging.v2_43_4;
|
||||
|
||||
[TestClass]
|
||||
public class HGCV1
|
||||
{
|
||||
|
||||
#pragma warning disable CA2254
|
||||
#pragma warning disable IDE0060
|
||||
|
||||
private static CreateSelfDescription.Staging.v2_43_4.HGCV1 _HGCV1;
|
||||
|
||||
[ClassInitialize]
|
||||
public static void ClassInitialize(TestContext testContext)
|
||||
{
|
||||
CreateSelfDescription.Staging.v2_43_4.HGCV1.ClassInitialize(testContext);
|
||||
_HGCV1 = CreateSelfDescription.Staging.v2_43_4.HGCV1.EAFLoggingUnitTesting;
|
||||
}
|
||||
|
||||
#if true
|
||||
[Ignore]
|
||||
#endif
|
||||
[TestMethod]
|
||||
public void Staging__v2_43_4__HGCV1__pcl() => _HGCV1.Staging__v2_43_4__HGCV1__pcl();
|
||||
|
||||
[TestMethod]
|
||||
public void Staging__v2_43_4__HGCV1__pcl637955429602879992__Normal()
|
||||
{
|
||||
string check = "*.pcl";
|
||||
bool validatePDSF = false;
|
||||
_HGCV1.Staging__v2_43_4__HGCV1__pcl();
|
||||
MethodBase methodBase = new StackFrame().GetMethod();
|
||||
string[] variables = _HGCV1.AdaptationTesting.GetVariables(methodBase, check, validatePDSF);
|
||||
IFileRead fileRead = _HGCV1.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false);
|
||||
Logistics logistics = new(fileRead);
|
||||
_ = Shared.AdaptationTesting.ReExtractCompareUpdatePassDirectory(variables, fileRead, logistics, validatePDSF);
|
||||
}
|
||||
|
||||
}
|
44
Adaptation/_Tests/Extract/Staging/v2.43.4/HGCV2.cs
Normal file
44
Adaptation/_Tests/Extract/Staging/v2.43.4/HGCV2.cs
Normal file
@ -0,0 +1,44 @@
|
||||
using Adaptation.Shared;
|
||||
using Adaptation.Shared.Methods;
|
||||
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||
using System.Diagnostics;
|
||||
using System.Reflection;
|
||||
|
||||
namespace Adaptation._Tests.Extract.Staging.v2_43_4;
|
||||
|
||||
[TestClass]
|
||||
public class HGCV2
|
||||
{
|
||||
|
||||
#pragma warning disable CA2254
|
||||
#pragma warning disable IDE0060
|
||||
|
||||
private static CreateSelfDescription.Staging.v2_43_4.HGCV2 _HGCV2;
|
||||
|
||||
[ClassInitialize]
|
||||
public static void ClassInitialize(TestContext testContext)
|
||||
{
|
||||
CreateSelfDescription.Staging.v2_43_4.HGCV2.ClassInitialize(testContext);
|
||||
_HGCV2 = CreateSelfDescription.Staging.v2_43_4.HGCV2.EAFLoggingUnitTesting;
|
||||
}
|
||||
|
||||
#if true
|
||||
[Ignore]
|
||||
#endif
|
||||
[TestMethod]
|
||||
public void Staging__v2_43_4__HGCV2__pcl() => _HGCV2.Staging__v2_43_4__HGCV2__pcl();
|
||||
|
||||
[TestMethod]
|
||||
public void Staging__v2_43_4__HGCV2__pcl637955471606299897__Normal()
|
||||
{
|
||||
string check = "*.pcl";
|
||||
bool validatePDSF = false;
|
||||
_HGCV2.Staging__v2_43_4__HGCV2__pcl();
|
||||
MethodBase methodBase = new StackFrame().GetMethod();
|
||||
string[] variables = _HGCV2.AdaptationTesting.GetVariables(methodBase, check, validatePDSF);
|
||||
IFileRead fileRead = _HGCV2.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false);
|
||||
Logistics logistics = new(fileRead);
|
||||
_ = Shared.AdaptationTesting.ReExtractCompareUpdatePassDirectory(variables, fileRead, logistics, validatePDSF);
|
||||
}
|
||||
|
||||
}
|
71
Adaptation/_Tests/Extract/Staging/v2.43.4/HGCV3.cs
Normal file
71
Adaptation/_Tests/Extract/Staging/v2.43.4/HGCV3.cs
Normal file
@ -0,0 +1,71 @@
|
||||
using Adaptation.Shared;
|
||||
using Adaptation.Shared.Methods;
|
||||
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||
using System.Diagnostics;
|
||||
using System.Reflection;
|
||||
|
||||
namespace Adaptation._Tests.Extract.Staging.v2_43_4;
|
||||
|
||||
[TestClass]
|
||||
public class HGCV3
|
||||
{
|
||||
|
||||
#pragma warning disable CA2254
|
||||
#pragma warning disable IDE0060
|
||||
|
||||
private static CreateSelfDescription.Staging.v2_43_4.HGCV3 _HGCV3;
|
||||
|
||||
[ClassInitialize]
|
||||
public static void ClassInitialize(TestContext testContext)
|
||||
{
|
||||
CreateSelfDescription.Staging.v2_43_4.HGCV3.ClassInitialize(testContext);
|
||||
_HGCV3 = CreateSelfDescription.Staging.v2_43_4.HGCV3.EAFLoggingUnitTesting;
|
||||
}
|
||||
|
||||
#if true
|
||||
[Ignore]
|
||||
#endif
|
||||
[TestMethod]
|
||||
public void Staging__v2_43_4__HGCV3__pcl() => _HGCV3.Staging__v2_43_4__HGCV3__pcl();
|
||||
|
||||
[TestMethod]
|
||||
[ExpectedException(typeof(AssertFailedException))]
|
||||
public void Staging__v2_43_4__HGCV3__pcl637812984345592512__MinFileLength()
|
||||
{
|
||||
string check = "*.pcl";
|
||||
bool validatePDSF = false;
|
||||
_HGCV3.Staging__v2_43_4__HGCV3__pcl();
|
||||
MethodBase methodBase = new StackFrame().GetMethod();
|
||||
string[] variables = _HGCV3.AdaptationTesting.GetVariables(methodBase, check, validatePDSF);
|
||||
IFileRead fileRead = _HGCV3.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false);
|
||||
Logistics logistics = new(fileRead);
|
||||
_ = Shared.AdaptationTesting.ReExtractCompareUpdatePassDirectory(variables, fileRead, logistics, validatePDSF);
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
public void Staging__v2_43_4__HGCV3__pcl637816384579205568__Normal()
|
||||
{
|
||||
string check = "*.pcl";
|
||||
bool validatePDSF = false;
|
||||
_HGCV3.Staging__v2_43_4__HGCV3__pcl();
|
||||
MethodBase methodBase = new StackFrame().GetMethod();
|
||||
string[] variables = _HGCV3.AdaptationTesting.GetVariables(methodBase, check, validatePDSF);
|
||||
IFileRead fileRead = _HGCV3.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false);
|
||||
Logistics logistics = new(fileRead);
|
||||
_ = Shared.AdaptationTesting.ReExtractCompareUpdatePassDirectory(variables, fileRead, logistics, validatePDSF);
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
public void Staging__v2_43_4__HGCV3__pcl637955459372840332__Normal()
|
||||
{
|
||||
string check = "*.pcl";
|
||||
bool validatePDSF = false;
|
||||
_HGCV3.Staging__v2_43_4__HGCV3__pcl();
|
||||
MethodBase methodBase = new StackFrame().GetMethod();
|
||||
string[] variables = _HGCV3.AdaptationTesting.GetVariables(methodBase, check, validatePDSF);
|
||||
IFileRead fileRead = _HGCV3.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false);
|
||||
Logistics logistics = new(fileRead);
|
||||
_ = Shared.AdaptationTesting.ReExtractCompareUpdatePassDirectory(variables, fileRead, logistics, validatePDSF);
|
||||
}
|
||||
|
||||
}
|
98
Adaptation/_Tests/Extract/Staging/v2.43.4/MET08RESIHGCV.cs
Normal file
98
Adaptation/_Tests/Extract/Staging/v2.43.4/MET08RESIHGCV.cs
Normal file
@ -0,0 +1,98 @@
|
||||
using Adaptation.Shared;
|
||||
using Adaptation.Shared.Methods;
|
||||
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||
using System.Diagnostics;
|
||||
using System.Reflection;
|
||||
|
||||
namespace Adaptation._Tests.Extract.Staging.v2_43_4;
|
||||
|
||||
[TestClass]
|
||||
public class MET08RESIHGCV
|
||||
{
|
||||
|
||||
#pragma warning disable CA2254
|
||||
#pragma warning disable IDE0060
|
||||
|
||||
private static CreateSelfDescription.Staging.v2_43_4.MET08RESIHGCV _MET08RESIHGCV;
|
||||
|
||||
[ClassInitialize]
|
||||
public static void ClassInitialize(TestContext testContext)
|
||||
{
|
||||
CreateSelfDescription.Staging.v2_43_4.MET08RESIHGCV.ClassInitialize(testContext);
|
||||
_MET08RESIHGCV = CreateSelfDescription.Staging.v2_43_4.MET08RESIHGCV.EAFLoggingUnitTesting;
|
||||
}
|
||||
|
||||
#if true
|
||||
[Ignore]
|
||||
#endif
|
||||
[TestMethod]
|
||||
public void Staging__v2_43_4__MET08RESIHGCV__MoveMatchingFiles() => _MET08RESIHGCV.Staging__v2_43_4__MET08RESIHGCV__MoveMatchingFiles();
|
||||
|
||||
[TestMethod]
|
||||
public void Staging__v2_43_4__MET08RESIHGCV__MoveMatchingFiles637955459372840332__Normal()
|
||||
{
|
||||
string check = "*.pdsf";
|
||||
bool validatePDSF = false;
|
||||
MethodBase methodBase = new StackFrame().GetMethod();
|
||||
_MET08RESIHGCV.Staging__v2_43_4__MET08RESIHGCV__MoveMatchingFiles();
|
||||
string[] variables = _MET08RESIHGCV.AdaptationTesting.GetVariables(methodBase, check, validatePDSF);
|
||||
IFileRead fileRead = _MET08RESIHGCV.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false);
|
||||
Logistics logistics = new(fileRead);
|
||||
_ = Shared.AdaptationTesting.ReExtractCompareUpdatePassDirectory(variables, fileRead, logistics, validatePDSF);
|
||||
}
|
||||
|
||||
#if true
|
||||
[Ignore]
|
||||
#endif
|
||||
[TestMethod]
|
||||
public void Staging__v2_43_4__MET08RESIHGCV__OpenInsightMetrologyViewer() => _MET08RESIHGCV.Staging__v2_43_4__MET08RESIHGCV__OpenInsightMetrologyViewer();
|
||||
|
||||
#if true
|
||||
[Ignore]
|
||||
#endif
|
||||
[TestMethod]
|
||||
public void Staging__v2_43_4__MET08RESIHGCV__IQSSi() => _MET08RESIHGCV.Staging__v2_43_4__MET08RESIHGCV__IQSSi();
|
||||
|
||||
#if true
|
||||
[Ignore]
|
||||
#endif
|
||||
[TestMethod]
|
||||
public void Staging__v2_43_4__MET08RESIHGCV__OpenInsight() => _MET08RESIHGCV.Staging__v2_43_4__MET08RESIHGCV__OpenInsight();
|
||||
|
||||
#if true
|
||||
[Ignore]
|
||||
#endif
|
||||
[TestMethod]
|
||||
public void Staging__v2_43_4__MET08RESIHGCV__OpenInsightMetrologyViewerAttachments() => _MET08RESIHGCV.Staging__v2_43_4__MET08RESIHGCV__OpenInsightMetrologyViewerAttachments();
|
||||
|
||||
#if true
|
||||
[Ignore]
|
||||
#endif
|
||||
[TestMethod]
|
||||
public void Staging__v2_43_4__MET08RESIHGCV__APC() => _MET08RESIHGCV.Staging__v2_43_4__MET08RESIHGCV__APC();
|
||||
|
||||
#if true
|
||||
[Ignore]
|
||||
#endif
|
||||
[TestMethod]
|
||||
public void Staging__v2_43_4__MET08RESIHGCV__SPaCe() => _MET08RESIHGCV.Staging__v2_43_4__MET08RESIHGCV__SPaCe();
|
||||
|
||||
#if true
|
||||
[Ignore]
|
||||
#endif
|
||||
[TestMethod]
|
||||
public void Staging__v2_43_4__MET08RESIHGCV__Processed() => _MET08RESIHGCV.Staging__v2_43_4__MET08RESIHGCV__Processed();
|
||||
|
||||
#if true
|
||||
[Ignore]
|
||||
#endif
|
||||
[TestMethod]
|
||||
public void Staging__v2_43_4__MET08RESIHGCV__Archive() => _MET08RESIHGCV.Staging__v2_43_4__MET08RESIHGCV__Archive();
|
||||
|
||||
#if true
|
||||
[Ignore]
|
||||
#endif
|
||||
[TestMethod]
|
||||
public void Staging__v2_43_4__MET08RESIHGCV__Dummy() => _MET08RESIHGCV.Staging__v2_43_4__MET08RESIHGCV__Dummy();
|
||||
|
||||
}
|
@ -26,10 +26,13 @@ namespace Adaptation._Tests.Shared;
|
||||
public class AdaptationTesting : ISMTP
|
||||
{
|
||||
|
||||
protected readonly string _DummyRoot;
|
||||
protected readonly string _Environment;
|
||||
protected readonly string _HostNameAndPort;
|
||||
protected readonly bool _HasWaitForProperty;
|
||||
protected readonly TestContext _TestContext;
|
||||
protected readonly bool _SkipEquipmentDictionary;
|
||||
protected readonly string _TestContextPropertiesAsJson;
|
||||
protected readonly Dictionary<string, CellInstanceVersion> _CellInstanceVersions;
|
||||
protected readonly Dictionary<string, EquipmentTypeVersion> _EquipmentTypeVersions;
|
||||
protected readonly Dictionary<string, string> _ParameterizedModelObjectDefinitionTypes;
|
||||
@ -38,10 +41,13 @@ public class AdaptationTesting : ISMTP
|
||||
protected readonly Dictionary<string, IList<ModelObjectParameterDefinition>> _ModelObjectParameters;
|
||||
protected readonly Dictionary<string, List<Tuple<string, string>>> _EquipmentDictionaryEventDescriptions;
|
||||
|
||||
public string DummyRoot => _DummyRoot;
|
||||
public string Environment => _Environment;
|
||||
public TestContext TestContext => _TestContext;
|
||||
public string HostNameAndPort => _HostNameAndPort;
|
||||
public bool HasWaitForProperty => _HasWaitForProperty;
|
||||
public bool SkipEquipmentDictionary => _SkipEquipmentDictionary;
|
||||
public string TestContextPropertiesAsJson => _TestContextPropertiesAsJson;
|
||||
public Dictionary<string, CellInstanceVersion> CellInstanceVersions => _CellInstanceVersions;
|
||||
public Dictionary<string, EquipmentTypeVersion> EquipmentTypeVersions => _EquipmentTypeVersions;
|
||||
public Dictionary<string, IList<ModelObjectParameterDefinition>> ModelObjectParameters => _ModelObjectParameters;
|
||||
@ -56,17 +62,22 @@ public class AdaptationTesting : ISMTP
|
||||
|
||||
void ISMTP.SendNormalPriorityEmailMessage(string subject, string body) => throw new NotImplementedException();
|
||||
|
||||
public AdaptationTesting(TestContext testContext, bool skipEquipmentDictionary)
|
||||
public AdaptationTesting(string dummyRoot, TestContext testContext, bool skipEquipmentDictionary, string testContextPropertiesAsJson, bool hasWaitForProperty)
|
||||
{
|
||||
|
||||
string environment = GetEnvironment(testContext);
|
||||
string hostNameAndPort = GetHostNameAndPort(environment);
|
||||
_DummyRoot = dummyRoot;
|
||||
_TestContext = testContext;
|
||||
_Environment = environment;
|
||||
_HostNameAndPort = hostNameAndPort;
|
||||
_HasWaitForProperty = hasWaitForProperty;
|
||||
_SkipEquipmentDictionary = skipEquipmentDictionary;
|
||||
_TestContextPropertiesAsJson = testContextPropertiesAsJson;
|
||||
_CellInstanceVersions = new Dictionary<string, CellInstanceVersion>();
|
||||
_EquipmentTypeVersions = new Dictionary<string, EquipmentTypeVersion>();
|
||||
_EquipmentTypeVersions = new Dictionary<string, EquipmentTypeVersion>();
|
||||
_ParameterizedModelObjectDefinitionTypes = new Dictionary<string, string>();
|
||||
_ParameterizedModelObjectDefinitionTypes = new Dictionary<string, string>();
|
||||
_EquipmentDictionaryVersions = new Dictionary<string, EquipmentDictionaryVersion>();
|
||||
_FileConnectorConfigurations = new Dictionary<string, FileConnectorConfiguration>();
|
||||
@ -94,23 +105,28 @@ public class AdaptationTesting : ISMTP
|
||||
return result;
|
||||
}
|
||||
|
||||
protected string GetTestResultsDirectory()
|
||||
public static string GetTestResultsDirectory(string testContextTestResultsDirectory, bool hasWaitForProperty)
|
||||
{
|
||||
string result = string.Empty;
|
||||
string testResults = "05_TestResults";
|
||||
string checkDirectory = _TestContext.TestResultsDirectory;
|
||||
if (string.IsNullOrEmpty(checkDirectory) || !checkDirectory.Contains(testResults))
|
||||
throw new Exception();
|
||||
string rootDirectory = Path.GetPathRoot(checkDirectory);
|
||||
for (int i = 0; i < int.MaxValue; i++)
|
||||
string checkDirectory = testContextTestResultsDirectory;
|
||||
if (hasWaitForProperty && (string.IsNullOrEmpty(checkDirectory) || !checkDirectory.Contains(testResults)))
|
||||
throw new Exception($"A:{checkDirectory}; B:{testResults};");
|
||||
else if (!hasWaitForProperty && (string.IsNullOrEmpty(checkDirectory) || !checkDirectory.Contains(testResults)))
|
||||
result = testContextTestResultsDirectory;
|
||||
else
|
||||
{
|
||||
checkDirectory = Path.GetDirectoryName(checkDirectory);
|
||||
if (string.IsNullOrEmpty(checkDirectory) || checkDirectory == rootDirectory)
|
||||
break;
|
||||
if (checkDirectory.EndsWith(testResults) && Directory.Exists(checkDirectory))
|
||||
string rootDirectory = Path.GetPathRoot(checkDirectory);
|
||||
for (int i = 0; i < int.MaxValue; i++)
|
||||
{
|
||||
result = checkDirectory;
|
||||
break;
|
||||
checkDirectory = Path.GetDirectoryName(checkDirectory);
|
||||
if (string.IsNullOrEmpty(checkDirectory) || checkDirectory == rootDirectory)
|
||||
break;
|
||||
if (checkDirectory.EndsWith(testResults) && Directory.Exists(checkDirectory))
|
||||
{
|
||||
result = checkDirectory;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (string.IsNullOrEmpty(result))
|
||||
@ -118,6 +134,12 @@ public class AdaptationTesting : ISMTP
|
||||
return result;
|
||||
}
|
||||
|
||||
private string GetTestResultsDirectory(bool hasWaitForProperty)
|
||||
{
|
||||
string result = GetTestResultsDirectory(_TestContext.TestResultsDirectory, hasWaitForProperty);
|
||||
return result;
|
||||
}
|
||||
|
||||
protected static string GetCellInstanceConnectionName(string cellInstanceConnectionName)
|
||||
{
|
||||
string result;
|
||||
@ -170,28 +192,29 @@ public class AdaptationTesting : ISMTP
|
||||
return results;
|
||||
}
|
||||
|
||||
internal string[] GetSegments(string methodBaseName)
|
||||
public static MethodBaseName GetMethodBaseName(string dummyRoot, string environment, bool hasWaitForProperty, string methodBaseName, string testResultsDirectory)
|
||||
{
|
||||
List<string> results;
|
||||
string fileFullName;
|
||||
MethodBaseName result;
|
||||
string comment;
|
||||
string[] textFiles;
|
||||
string fileFullName;
|
||||
string dummyDirectory;
|
||||
string withActualCICN;
|
||||
string separator = "__";
|
||||
string textFileDirectory;
|
||||
string connectionNameAndTicks;
|
||||
string cellInstanceConnectionName;
|
||||
string ticks = DateTime.Now.Ticks.ToString();
|
||||
string cellInstanceConnectionNameFromMethodBaseName;
|
||||
string testResultsDirectory = GetTestResultsDirectory();
|
||||
string[] segments = methodBaseName.Split(new string[] { separator }, StringSplitOptions.None);
|
||||
if (segments[0] != _Environment)
|
||||
if (segments[0] != environment)
|
||||
throw new Exception();
|
||||
string rawVersionName = segments[1];
|
||||
string rawCellInstanceName = segments[2];
|
||||
string cellInstanceVersionName = segments[1].Replace('_', '.');
|
||||
string cellInstanceName = segments[2].Replace('_', '-').Replace("_EQPT", "-EQPT");
|
||||
string before = string.Concat(_Environment, separator, rawVersionName, separator, cellInstanceName, separator);
|
||||
string before = string.Concat(environment, separator, rawVersionName, separator, cellInstanceName, separator);
|
||||
string after = methodBaseName.Substring(before.Length);
|
||||
string versionDirectory = Path.Combine(testResultsDirectory, _Environment, cellInstanceName, cellInstanceVersionName);
|
||||
string versionDirectory = Path.Combine(testResultsDirectory, environment, cellInstanceName, cellInstanceVersionName);
|
||||
if (!Directory.Exists(versionDirectory))
|
||||
_ = Directory.CreateDirectory(versionDirectory);
|
||||
comment = segments[segments.Length - 1];
|
||||
@ -221,87 +244,76 @@ public class AdaptationTesting : ISMTP
|
||||
cellInstanceConnectionNameFromMethodBaseName = after;
|
||||
}
|
||||
cellInstanceConnectionName = GetCellInstanceConnectionName(cellInstanceConnectionNameFromMethodBaseName);
|
||||
string methodBaseNameWithActualCICN = GetMethodBaseNameWithActualCICN(methodBaseName, rawCellInstanceName, cellInstanceConnectionNameFromMethodBaseName, cellInstanceConnectionName, ticks);
|
||||
withActualCICN = GetMethodBaseNameWithActualCICN(methodBaseName, rawCellInstanceName, cellInstanceConnectionNameFromMethodBaseName, cellInstanceConnectionName, ticks);
|
||||
if (hasWaitForProperty)
|
||||
dummyDirectory = string.Empty;
|
||||
else if (string.IsNullOrEmpty(ticks))
|
||||
dummyDirectory = string.Empty;
|
||||
else
|
||||
{
|
||||
if (string.IsNullOrEmpty(dummyRoot))
|
||||
throw new Exception($"{nameof(dummyRoot)} is empty!");
|
||||
if (!withActualCICN.Contains(ticks))
|
||||
throw new Exception($"{withActualCICN} doesn't contain {ticks}!");
|
||||
segments = withActualCICN.Split(new string[] { ticks }, StringSplitOptions.None);
|
||||
dummyDirectory = Path.Combine(dummyRoot, cellInstanceName, ticks, string.Join(null, segments));
|
||||
if (!Directory.Exists(dummyDirectory))
|
||||
_ = Directory.CreateDirectory(dummyDirectory);
|
||||
}
|
||||
if (string.IsNullOrEmpty(ticks))
|
||||
{
|
||||
textFiles = Array.Empty<string>();
|
||||
fileFullName = Path.Combine(versionDirectory, methodBaseNameWithActualCICN, $"{cellInstanceConnectionNameFromMethodBaseName}.json");
|
||||
textFileDirectory = string.Empty;
|
||||
fileFullName = Path.Combine(versionDirectory, withActualCICN, $"{cellInstanceConnectionNameFromMethodBaseName}.json");
|
||||
}
|
||||
else
|
||||
{
|
||||
segments = methodBaseNameWithActualCICN.Split(new string[] { ticks }, StringSplitOptions.None);
|
||||
string textDirectory = Path.Combine(versionDirectory, segments[0], string.Concat(ticks, segments[1]));
|
||||
segments = withActualCICN.Split(new string[] { ticks }, StringSplitOptions.None);
|
||||
textFileDirectory = Path.Combine(versionDirectory, segments[0], string.Concat(ticks, segments[1]));
|
||||
fileFullName = Path.Combine(versionDirectory, segments[0], $"{cellInstanceConnectionNameFromMethodBaseName}.json");
|
||||
if (!Directory.Exists(textDirectory))
|
||||
}
|
||||
result = new(after, before, cellInstanceConnectionName, cellInstanceConnectionNameFromMethodBaseName, cellInstanceName, cellInstanceVersionName, comment, dummyDirectory, fileFullName, rawCellInstanceName, rawVersionName, separator, testResultsDirectory, textFileDirectory, ticks, versionDirectory, withActualCICN);
|
||||
return result;
|
||||
}
|
||||
|
||||
private MethodBaseName GetMethodBaseName(MethodBase methodBase)
|
||||
{
|
||||
MethodBaseName result;
|
||||
string testResultsDirectory = GetTestResultsDirectory(_HasWaitForProperty);
|
||||
result = GetMethodBaseName(_DummyRoot, _Environment, _HasWaitForProperty, methodBase.Name, testResultsDirectory);
|
||||
return result;
|
||||
}
|
||||
|
||||
private string[] GetTextFiles(MethodBaseName mbn)
|
||||
{
|
||||
string[] results;
|
||||
if (string.IsNullOrEmpty(mbn.TextFileDirectory))
|
||||
results = Array.Empty<string>();
|
||||
else if (!Directory.Exists(mbn.TextFileDirectory))
|
||||
{
|
||||
results = Array.Empty<string>();
|
||||
if (!_HasWaitForProperty)
|
||||
_ = Directory.CreateDirectory(mbn.TextFileDirectory);
|
||||
else
|
||||
{
|
||||
textFiles = Array.Empty<string>();
|
||||
string renameDirectory = Path.Combine(Path.GetDirectoryName(textDirectory), $"_Rename - {Path.GetFileName(textDirectory)}");
|
||||
string renameDirectory = Path.Combine(Path.GetDirectoryName(mbn.TextFileDirectory), $"_Rename - {Path.GetFileName(mbn.TextFileDirectory)}");
|
||||
_ = Directory.CreateDirectory(renameDirectory);
|
||||
_ = Process.Start("explorer.exe", renameDirectory);
|
||||
File.WriteAllText(Path.Combine(renameDirectory, $"{nameof(FileConnectorConfiguration.SourceFileFilter)}.txt"), string.Empty);
|
||||
File.WriteAllText(Path.Combine(renameDirectory, $"{nameof(FileConnectorConfiguration.SourceFileLocation)}.txt"), string.Empty);
|
||||
}
|
||||
else
|
||||
}
|
||||
else
|
||||
{
|
||||
results = Directory.GetFiles(mbn.TextFileDirectory, "*.txt", SearchOption.TopDirectoryOnly);
|
||||
if (!string.IsNullOrEmpty(mbn.Ticks) && _HasWaitForProperty && !results.Any())
|
||||
{
|
||||
textFiles = Directory.GetFiles(textDirectory, "*.txt", SearchOption.TopDirectoryOnly);
|
||||
if (!textFiles.Any())
|
||||
{
|
||||
_ = Process.Start("explorer.exe", textDirectory);
|
||||
File.WriteAllText(Path.Combine(textDirectory, "_ Why.why"), string.Empty);
|
||||
}
|
||||
_ = Process.Start("explorer.exe", mbn.TextFileDirectory);
|
||||
File.WriteAllText(Path.Combine(mbn.TextFileDirectory, "_ Why.why"), string.Empty);
|
||||
}
|
||||
}
|
||||
results = new List<string>
|
||||
{
|
||||
_Environment,
|
||||
rawCellInstanceName,
|
||||
cellInstanceName,
|
||||
cellInstanceVersionName,
|
||||
cellInstanceConnectionNameFromMethodBaseName,
|
||||
cellInstanceConnectionName,
|
||||
ticks,
|
||||
comment,
|
||||
fileFullName
|
||||
};
|
||||
results.AddRange(textFiles);
|
||||
return results.ToArray();
|
||||
}
|
||||
|
||||
internal string[] GetSegments(MethodBase methodBase)
|
||||
{
|
||||
string[] results = GetSegments(methodBase.Name);
|
||||
return results;
|
||||
}
|
||||
|
||||
internal static string GetEnvironment(string[] segments) => segments[0];
|
||||
|
||||
internal static string GetRawCellInstanceName(string[] segments) => segments[1];
|
||||
|
||||
internal static string GetCellInstanceName(string[] segments) => segments[2];
|
||||
|
||||
internal static string GetCellInstanceVersionName(string[] segments) => segments[3];
|
||||
|
||||
internal static string GetCellInstanceConnectionNameFromMethodBaseName(string[] segments) => segments[4];
|
||||
|
||||
internal static string GetCellInstanceConnectionName(string[] segments) => segments[5];
|
||||
|
||||
internal static string GetTicks(string[] segments) => segments[6];
|
||||
|
||||
internal static string GetComment(string[] segments) => segments[7];
|
||||
|
||||
internal static FileInfo GetFileName(string[] segments) => new(segments[8]);
|
||||
|
||||
internal static string[] GetTextFiles(string[] segments)
|
||||
{
|
||||
List<string> results = new();
|
||||
if (segments.Length > 8)
|
||||
{
|
||||
for (int i = 9; i < segments.Length; i++)
|
||||
results.Add(segments[i]);
|
||||
}
|
||||
return results.ToArray();
|
||||
}
|
||||
|
||||
protected static Stream ToStream(string @this)
|
||||
{
|
||||
MemoryStream memoryStream = new();
|
||||
@ -466,6 +478,7 @@ public class AdaptationTesting : ISMTP
|
||||
AppendLine("#pragma warning disable CA2254").
|
||||
AppendLine("#pragma warning disable IDE0060").
|
||||
AppendLine().
|
||||
AppendLine("internal static string DummyRoot { get; private set; }").
|
||||
Append("internal static ").Append(cellInstanceNameWithoutHyphen).AppendLine(" EAFLoggingUnitTesting { get; private set; }");
|
||||
else
|
||||
throw new Exception();
|
||||
@ -474,13 +487,15 @@ public class AdaptationTesting : ISMTP
|
||||
else if (i == 1)
|
||||
_ = stringBuilder.
|
||||
AppendLine().
|
||||
Append("public ").Append(cellInstanceNameWithoutHyphen).AppendLine("() : base(testContext: null, declaringType: null, skipEquipmentDictionary: false)").
|
||||
Append("static ").Append(cellInstanceNameWithoutHyphen).AppendLine("() => DummyRoot = @\"\\\\messv02ecc1.ec.local\\EC_Characterization_Si\\Dummy\";").
|
||||
AppendLine().
|
||||
Append("public ").Append(cellInstanceNameWithoutHyphen).AppendLine("() : base(DummyRoot, testContext: null, declaringType: null, skipEquipmentDictionary: false)").
|
||||
AppendLine("{").
|
||||
AppendLine("if (EAFLoggingUnitTesting is null)").
|
||||
AppendLine("throw new Exception();").
|
||||
AppendLine("}").
|
||||
AppendLine().
|
||||
Append("public ").Append(cellInstanceNameWithoutHyphen).AppendLine("(TestContext testContext) : base(testContext, new StackFrame().GetMethod().DeclaringType, skipEquipmentDictionary: false)").
|
||||
Append("public ").Append(cellInstanceNameWithoutHyphen).AppendLine("(TestContext testContext) : base(DummyRoot, testContext, new StackFrame().GetMethod().DeclaringType, skipEquipmentDictionary: false)").
|
||||
AppendLine("{").
|
||||
AppendLine("}").
|
||||
AppendLine();
|
||||
@ -541,6 +556,9 @@ public class AdaptationTesting : ISMTP
|
||||
if (i == 2)
|
||||
{
|
||||
_ = stringBuilder.
|
||||
AppendLine("#if true").
|
||||
AppendLine("[Ignore]").
|
||||
AppendLine("#endif").
|
||||
AppendLine("[TestMethod]").
|
||||
Append("public void ").Append(methodName).Append("() => ").Append('_').Append(cellInstanceNameWithoutHyphen).Append('.').Append(methodName).AppendLine("();").AppendLine();
|
||||
}
|
||||
@ -550,13 +568,16 @@ public class AdaptationTesting : ISMTP
|
||||
throw new Exception("Versions should match!");
|
||||
equipmentTypeName = componentsCellComponentCellComponent.Equipment.EquipmentType.Name;
|
||||
_ = stringBuilder.
|
||||
AppendLine("#if true").
|
||||
AppendLine("[Ignore]").
|
||||
AppendLine("#endif").
|
||||
AppendLine("[TestMethod]").
|
||||
Append("public void ").Append(methodName).AppendLine("()").
|
||||
AppendLine("{").
|
||||
Append("string check = \"").Append(check.Split('\\').Last()).AppendLine("\";").
|
||||
AppendLine("MethodBase methodBase = new StackFrame().GetMethod();").
|
||||
AppendLine("EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, \" - Getting configuration\"));").
|
||||
AppendLine("_ = Shared.AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting);").
|
||||
AppendLine("_ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting);").
|
||||
AppendLine("EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, \" - Exit\"));").
|
||||
AppendLine("}").
|
||||
AppendLine();
|
||||
@ -879,32 +900,26 @@ public class AdaptationTesting : ISMTP
|
||||
public string[] GetCSharpText(string testName)
|
||||
{
|
||||
string[] results;
|
||||
string[] segments = GetSegments(testName);
|
||||
FileInfo fileInfo = GetFileName(segments);
|
||||
string cellInstanceName = GetCellInstanceName(segments);
|
||||
string cellInstanceVersionName = GetCellInstanceVersionName(segments);
|
||||
string cellInstanceConnectionName = GetCellInstanceConnectionName(segments);
|
||||
if (!string.IsNullOrEmpty(cellInstanceConnectionName) && !Directory.Exists(fileInfo.DirectoryName))
|
||||
string testResultsDirectory = GetTestResultsDirectory(_HasWaitForProperty);
|
||||
MethodBaseName mbn = GetMethodBaseName(_DummyRoot, _Environment, _HasWaitForProperty, testName, testResultsDirectory);
|
||||
FileInfo fileInfo = new(mbn.FileFullName);
|
||||
if (!string.IsNullOrEmpty(mbn.CellInstanceConnectionName) && !Directory.Exists(fileInfo.DirectoryName))
|
||||
_ = Directory.CreateDirectory(fileInfo.Directory.FullName);
|
||||
Tuple<string, CellInstanceVersion> cellInstanceVersionTuple = GetCellInstanceVersionTuple(cellInstanceName, cellInstanceVersionName);
|
||||
results = GetCSharpTextB(fileInfo, cellInstanceName, cellInstanceVersionName, cellInstanceVersionTuple.Item2);
|
||||
Tuple<string, CellInstanceVersion> cellInstanceVersionTuple = GetCellInstanceVersionTuple(mbn.CellInstanceName, mbn.CellInstanceVersionName);
|
||||
results = GetCSharpTextB(fileInfo, mbn.CellInstanceName, mbn.CellInstanceVersionName, cellInstanceVersionTuple.Item2);
|
||||
return results;
|
||||
}
|
||||
|
||||
public string[] GetConfiguration(MethodBase methodBase)
|
||||
{
|
||||
string[] results;
|
||||
string[] segments = GetSegments(methodBase.Name);
|
||||
string ticks = GetTicks(segments);
|
||||
FileInfo fileInfo = GetFileName(segments);
|
||||
string cellInstanceName = GetCellInstanceName(segments);
|
||||
string cellInstanceVersionName = GetCellInstanceVersionName(segments);
|
||||
string cellInstanceConnectionName = GetCellInstanceConnectionName(segments);
|
||||
if (!string.IsNullOrEmpty(cellInstanceConnectionName) && !Directory.Exists(fileInfo.DirectoryName))
|
||||
MethodBaseName mbn = GetMethodBaseName(methodBase);
|
||||
FileInfo fileInfo = new(mbn.FileFullName);
|
||||
if (!string.IsNullOrEmpty(mbn.CellInstanceConnectionName) && !Directory.Exists(fileInfo.DirectoryName))
|
||||
_ = Directory.CreateDirectory(fileInfo.Directory.FullName);
|
||||
Tuple<string, CellInstanceVersion> cellInstanceVersionTuple = GetCellInstanceVersionTuple(cellInstanceName, cellInstanceVersionName);
|
||||
Tuple<string, FileConnectorConfiguration> fileConnectorConfigurationTuple = GetFileConnectorConfigurationTuple(cellInstanceVersionTuple, cellInstanceConnectionName);
|
||||
if (string.IsNullOrEmpty(ticks) && fileConnectorConfigurationTuple.Item2?.FileScanningIntervalInSeconds is not null)
|
||||
Tuple<string, CellInstanceVersion> cellInstanceVersionTuple = GetCellInstanceVersionTuple(mbn.CellInstanceName, mbn.CellInstanceVersionName);
|
||||
Tuple<string, FileConnectorConfiguration> fileConnectorConfigurationTuple = GetFileConnectorConfigurationTuple(cellInstanceVersionTuple, mbn.CellInstanceConnectionName);
|
||||
if (string.IsNullOrEmpty(mbn.Ticks) && fileConnectorConfigurationTuple.Item2?.FileScanningIntervalInSeconds is not null)
|
||||
{
|
||||
string fileScanningIntervalInSecondsLine;
|
||||
string versionDirectory = Path.GetDirectoryName(fileInfo.DirectoryName);
|
||||
@ -914,12 +929,12 @@ public class AdaptationTesting : ISMTP
|
||||
fileScanningIntervalInSecondsLine = $"+\t{fileConnectorConfigurationTuple.Item2.FileScanningIntervalInSeconds.Value:+0000}\t{Path.GetFileName(fileInfo.DirectoryName)}";
|
||||
File.AppendAllLines(Path.Combine(versionDirectory, "FileScanningIntervalInSeconds.txt"), new string[] { fileScanningIntervalInSecondsLine });
|
||||
}
|
||||
Tuple<string, string, string, EquipmentTypeVersion> equipmentTypeVersionTuple = GetEquipmentTypeVersionTuple(cellInstanceVersionTuple.Item2, cellInstanceConnectionName);
|
||||
Tuple<string, string, string, EquipmentTypeVersion> equipmentTypeVersionTuple = GetEquipmentTypeVersionTuple(cellInstanceVersionTuple.Item2, mbn.CellInstanceConnectionName);
|
||||
Tuple<string, string> parameterizedModelObjectDefinitionTypeTuple = GetParameterizedModelObjectDefinitionTypeTuple(equipmentTypeVersionTuple);
|
||||
Tuple<string, IList<ModelObjectParameterDefinition>> modelObjectParametersTuple = GetModelObjectParameters(equipmentTypeVersionTuple);
|
||||
Tuple<string, string, string, EquipmentDictionaryVersion> equipmentDictionaryVersionTuple = GetEquipmentDictionaryVersionTuple(cellInstanceVersionTuple.Item2, cellInstanceConnectionName, equipmentTypeVersionTuple.Item4);
|
||||
Tuple<string, string, string, EquipmentDictionaryVersion> equipmentDictionaryVersionTuple = GetEquipmentDictionaryVersionTuple(cellInstanceVersionTuple.Item2, mbn.CellInstanceConnectionName, equipmentTypeVersionTuple.Item4);
|
||||
Tuple<string, List<Tuple<string, string>>> equipmentDictionaryIsAlwaysEnabledEventsTuple = GetEquipmentDictionaryIsAlwaysEnabledEventsTuple(equipmentDictionaryVersionTuple);
|
||||
Dictionary<string, object> objects = GetKeyValuePairs(cellInstanceName, cellInstanceVersionName, cellInstanceConnectionName, fileConnectorConfigurationTuple.Item2, equipmentTypeVersionTuple.Item2, parameterizedModelObjectDefinitionTypeTuple.Item2, modelObjectParametersTuple.Item2, equipmentDictionaryVersionTuple.Item2, equipmentDictionaryIsAlwaysEnabledEventsTuple.Item2);
|
||||
Dictionary<string, object> objects = GetKeyValuePairs(mbn.CellInstanceName, mbn.CellInstanceVersionName, mbn.CellInstanceConnectionName, fileConnectorConfigurationTuple.Item2, equipmentTypeVersionTuple.Item2, parameterizedModelObjectDefinitionTypeTuple.Item2, modelObjectParametersTuple.Item2, equipmentDictionaryVersionTuple.Item2, equipmentDictionaryIsAlwaysEnabledEventsTuple.Item2);
|
||||
string json = JsonSerializer.Serialize(objects, new JsonSerializerOptions { WriteIndented = true });
|
||||
results = new string[] { fileInfo.FullName, json };
|
||||
return results;
|
||||
@ -928,22 +943,19 @@ public class AdaptationTesting : ISMTP
|
||||
public IFileRead Get(MethodBase methodBase, string sourceFileLocation, string sourceFileFilter, bool useCyclicalForDescription)
|
||||
{
|
||||
IFileRead result;
|
||||
string[] segments = GetSegments(methodBase.Name);
|
||||
FileInfo fileInfo = GetFileName(segments);
|
||||
string cellInstanceName = GetCellInstanceName(segments);
|
||||
string cellInstanceVersionName = GetCellInstanceVersionName(segments);
|
||||
MethodBaseName mbn = GetMethodBaseName(methodBase);
|
||||
FileInfo fileInfo = new(mbn.FileFullName);
|
||||
Dictionary<string, string> fileParameter = new();
|
||||
string cellInstanceConnectionName = GetCellInstanceConnectionName(segments);
|
||||
if (!string.IsNullOrEmpty(cellInstanceConnectionName) && !Directory.Exists(fileInfo.DirectoryName))
|
||||
if (!string.IsNullOrEmpty(mbn.CellInstanceConnectionName) && !Directory.Exists(fileInfo.DirectoryName))
|
||||
_ = Directory.CreateDirectory(fileInfo.Directory.FullName);
|
||||
Dictionary<string, List<long>> dummyRuns = new();
|
||||
Dictionary<long, List<string>> staticRuns = new();
|
||||
Tuple<string, CellInstanceVersion> cellInstanceVersionTuple = GetCellInstanceVersionTuple(cellInstanceName, cellInstanceVersionName);
|
||||
Tuple<string, FileConnectorConfiguration> fileConnectorConfigurationTuple = GetFileConnectorConfigurationTuple(cellInstanceVersionTuple, cellInstanceConnectionName);
|
||||
Tuple<string, string, string, EquipmentTypeVersion> equipmentTypeVersionTuple = GetEquipmentTypeVersionTuple(cellInstanceVersionTuple.Item2, cellInstanceConnectionName);
|
||||
Tuple<string, CellInstanceVersion> cellInstanceVersionTuple = GetCellInstanceVersionTuple(mbn.CellInstanceName, mbn.CellInstanceVersionName);
|
||||
Tuple<string, FileConnectorConfiguration> fileConnectorConfigurationTuple = GetFileConnectorConfigurationTuple(cellInstanceVersionTuple, mbn.CellInstanceConnectionName);
|
||||
Tuple<string, string, string, EquipmentTypeVersion> equipmentTypeVersionTuple = GetEquipmentTypeVersionTuple(cellInstanceVersionTuple.Item2, mbn.CellInstanceConnectionName);
|
||||
Tuple<string, string> parameterizedModelObjectDefinitionTypeTuple = GetParameterizedModelObjectDefinitionTypeTuple(equipmentTypeVersionTuple);
|
||||
Tuple<string, IList<ModelObjectParameterDefinition>> modelObjectParametersTuple = GetModelObjectParameters(equipmentTypeVersionTuple);
|
||||
Tuple<string, string, string, EquipmentDictionaryVersion> equipmentDictionaryVersionTuple = GetEquipmentDictionaryVersionTuple(cellInstanceVersionTuple.Item2, cellInstanceConnectionName, equipmentTypeVersionTuple.Item4);
|
||||
Tuple<string, string, string, EquipmentDictionaryVersion> equipmentDictionaryVersionTuple = GetEquipmentDictionaryVersionTuple(cellInstanceVersionTuple.Item2, mbn.CellInstanceConnectionName, equipmentTypeVersionTuple.Item4);
|
||||
_ = GetEquipmentDictionaryIsAlwaysEnabledEventsTuple(equipmentDictionaryVersionTuple);
|
||||
if (!string.IsNullOrEmpty(sourceFileLocation) && sourceFileLocation != fileConnectorConfigurationTuple.Item2.SourceFileLocation)
|
||||
fileConnectorConfigurationTuple.Item2.SourceFileLocation = sourceFileLocation;
|
||||
@ -975,33 +987,29 @@ public class AdaptationTesting : ISMTP
|
||||
_ = Directory.CreateDirectory(fileConnectorConfigurationTuple.Item2.AlternateTargetFolder);
|
||||
}
|
||||
}
|
||||
result = FileHandlers.CellInstanceConnectionName.Get(this, fileParameter, cellInstanceName, cellInstanceConnectionName, fileConnectorConfigurationTuple.Item2, equipmentTypeVersionTuple.Item2, parameterizedModelObjectDefinitionTypeTuple.Item2, modelObjectParametersTuple.Item2, equipmentDictionaryVersionTuple.Item2, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted: false);
|
||||
result = FileHandlers.CellInstanceConnectionName.Get(this, fileParameter, mbn.CellInstanceName, mbn.CellInstanceConnectionName, fileConnectorConfigurationTuple.Item2, equipmentTypeVersionTuple.Item2, parameterizedModelObjectDefinitionTypeTuple.Item2, modelObjectParametersTuple.Item2, equipmentDictionaryVersionTuple.Item2, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted: false);
|
||||
return result;
|
||||
}
|
||||
|
||||
public string[] GetVariables(MethodBase methodBase, string check)
|
||||
public string[] GetVariables(MethodBase methodBase, string check, bool validatePDSF = true)
|
||||
{
|
||||
string[] results;
|
||||
string[] lines;
|
||||
string ipdsfFile;
|
||||
string textFileDirectory;
|
||||
string[] segments;
|
||||
string fileNameWithoutExtension;
|
||||
string searchPattern = "*.ipdsf";
|
||||
string methodBaseNameWithActualCICN;
|
||||
string sourceFileFilter = string.Empty;
|
||||
string sourceFileLocation = string.Empty;
|
||||
string[] segments = GetSegments(methodBase);
|
||||
string ticks = GetTicks(segments);
|
||||
FileInfo fileInfo = GetFileName(segments);
|
||||
string[] textFiles = GetTextFiles(segments);
|
||||
string cellInstanceName = GetCellInstanceName(segments);
|
||||
string rawCellInstanceName = GetRawCellInstanceName(segments);
|
||||
string cellInstanceConnectionName = GetCellInstanceConnectionName(segments);
|
||||
string cellInstanceConnectionNameFromMethodBaseName = GetCellInstanceConnectionNameFromMethodBaseName(segments);
|
||||
string methodBaseNameWithActualCICN = GetMethodBaseNameWithActualCICN(methodBase.Name, rawCellInstanceName, cellInstanceConnectionNameFromMethodBaseName, cellInstanceConnectionName, ticks);
|
||||
MethodBaseName mbn = GetMethodBaseName(methodBase);
|
||||
string[] textFiles = GetTextFiles(mbn);
|
||||
if (!textFiles.Any())
|
||||
textFileDirectory = string.Empty;
|
||||
else
|
||||
textFileDirectory = Path.GetDirectoryName(textFiles[0]);
|
||||
{
|
||||
if (_HasWaitForProperty)
|
||||
throw new Exception("Set text file!");
|
||||
sourceFileLocation = mbn.DummyDirectory;
|
||||
}
|
||||
foreach (string textFile in textFiles)
|
||||
{
|
||||
lines = File.ReadAllLines(textFile);
|
||||
@ -1012,18 +1020,20 @@ public class AdaptationTesting : ISMTP
|
||||
sourceFileFilter = lines[0];
|
||||
else if (fileNameWithoutExtension == nameof(FileConnectorConfiguration.SourceFileLocation))
|
||||
{
|
||||
segments = lines[0].Split(new string[] { ticks }, StringSplitOptions.None);
|
||||
methodBaseNameWithActualCICN = GetMethodBaseNameWithActualCICN(methodBase.Name, mbn.RawCellInstanceName, mbn.CellInstanceConnectionNameFromMethodBaseName, mbn.CellInstanceConnectionName, mbn.Ticks);
|
||||
segments = lines[0].Split(new string[] { mbn.Ticks }, StringSplitOptions.None);
|
||||
if (segments.Length > 2)
|
||||
throw new Exception("Ticks should only appear once in source file location!");
|
||||
if (segments.Length != 2)
|
||||
throw new Exception("Ticks missing from source file location!");
|
||||
if (segments[1].Contains(ticks))
|
||||
if (segments[1].Contains(mbn.Ticks))
|
||||
throw new Exception("From source file location path should not contain ticks!");
|
||||
if (!segments[1].EndsWith(methodBaseNameWithActualCICN.Replace(ticks, string.Empty)))
|
||||
if (!segments[1].EndsWith(methodBaseNameWithActualCICN.Replace(mbn.Ticks, string.Empty)))
|
||||
throw new Exception("Method name missing from source file location!");
|
||||
sourceFileLocation = lines[0];
|
||||
}
|
||||
}
|
||||
FileInfo fileInfo = new(mbn.FileFullName);
|
||||
if (!Directory.Exists(fileInfo.Directory.FullName))
|
||||
_ = Directory.CreateDirectory(fileInfo.Directory.FullName);
|
||||
if (!fileInfo.Exists)
|
||||
@ -1044,25 +1054,30 @@ public class AdaptationTesting : ISMTP
|
||||
fileConnectorConfiguration.SourceFileFilter = sourceFileFilter;
|
||||
if (!string.IsNullOrEmpty(sourceFileLocation))
|
||||
fileConnectorConfiguration.SourceFileLocation = sourceFileLocation;
|
||||
if (string.IsNullOrEmpty(sourceFileLocation))
|
||||
ipdsfFile = searchPattern;
|
||||
if (!validatePDSF)
|
||||
ipdsfFile = string.Empty;
|
||||
else
|
||||
{
|
||||
string ipdsfDirectory = Path.Combine(sourceFileLocation, "ipdsf");
|
||||
if (!Directory.Exists(ipdsfDirectory))
|
||||
if (string.IsNullOrEmpty(sourceFileLocation))
|
||||
ipdsfFile = searchPattern;
|
||||
else
|
||||
{
|
||||
string[] files = Directory.GetFiles(ipdsfDirectory, searchPattern, SearchOption.TopDirectoryOnly);
|
||||
if (files.Any())
|
||||
ipdsfFile = files[0];
|
||||
else
|
||||
string ipdsfDirectory = Path.Combine(sourceFileLocation, "ipdsf");
|
||||
if (!Directory.Exists(ipdsfDirectory))
|
||||
ipdsfFile = searchPattern;
|
||||
else
|
||||
{
|
||||
string[] files = Directory.GetFiles(ipdsfDirectory, searchPattern, SearchOption.TopDirectoryOnly);
|
||||
if (files.Any())
|
||||
ipdsfFile = files[0];
|
||||
else
|
||||
ipdsfFile = searchPattern;
|
||||
}
|
||||
}
|
||||
if (ipdsfFile == searchPattern)
|
||||
throw new Exception();
|
||||
}
|
||||
if (ipdsfFile == searchPattern)
|
||||
throw new Exception();
|
||||
results = new string[] { fileInfo.FullName, json, fileConnectorConfiguration.SourceFileLocation, fileConnectorConfiguration.SourceFileFilter, ipdsfFile, textFileDirectory };
|
||||
results = new string[] { fileInfo.FullName, json, fileConnectorConfiguration.SourceFileLocation, fileConnectorConfiguration.SourceFileFilter, ipdsfFile, mbn.TextFileDirectory };
|
||||
if (string.IsNullOrEmpty(results[0]))
|
||||
throw new Exception();
|
||||
if (string.IsNullOrEmpty(results[1]))
|
||||
@ -1071,7 +1086,7 @@ public class AdaptationTesting : ISMTP
|
||||
throw new Exception();
|
||||
if (string.IsNullOrEmpty(results[3]))
|
||||
throw new Exception();
|
||||
if (string.IsNullOrEmpty(results[4]))
|
||||
if (validatePDSF && string.IsNullOrEmpty(results[4]))
|
||||
throw new Exception();
|
||||
if (string.IsNullOrEmpty(results[5]))
|
||||
throw new Exception();
|
||||
@ -1232,29 +1247,32 @@ public class AdaptationTesting : ISMTP
|
||||
{
|
||||
string result;
|
||||
Tuple<string, Test[], JsonElement[], List<FileInfo>> extractResult = fileRead.ReExtract();
|
||||
Assert.IsFalse(string.IsNullOrEmpty(extractResult?.Item1));
|
||||
Assert.IsTrue(extractResult.Item3.Length > 0, "extractResult Array Length check!");
|
||||
Assert.IsNotNull(extractResult.Item4);
|
||||
if (!validatePDSF)
|
||||
_ = GetLogisticsColumnsAndBody(fileRead, logistics, extractResult, new(string.Empty, Array.Empty<string>(), Array.Empty<string>()));
|
||||
else
|
||||
if (!fileRead.IsDuplicator)
|
||||
{
|
||||
Tuple<string, string[], string[]> pdsf = GetLogisticsColumnsAndBody(variables[2], variables[4]);
|
||||
Tuple<string, string[], string[]> pdsfNew = GetLogisticsColumnsAndBody(fileRead, logistics, extractResult, pdsf);
|
||||
CompareSave(variables[5], pdsf, pdsfNew);
|
||||
Assert.IsTrue(pdsf.Item1 == pdsfNew.Item1, "Item1 check!");
|
||||
string[] json = GetItem2(pdsf, pdsfNew);
|
||||
CompareSaveJSON(variables[5], json);
|
||||
Assert.IsTrue(json[0] == json[1], "Item2 check!");
|
||||
string[] join = GetItem3(pdsf, pdsfNew);
|
||||
CompareSaveTSV(variables[5], join);
|
||||
Assert.IsTrue(join[0] == join[1], "Item3 (Join) check!");
|
||||
Assert.IsFalse(string.IsNullOrEmpty(extractResult?.Item1));
|
||||
Assert.IsTrue(extractResult.Item3.Length > 0, "extractResult Array Length check!");
|
||||
Assert.IsNotNull(extractResult.Item4);
|
||||
if (!validatePDSF)
|
||||
_ = GetLogisticsColumnsAndBody(fileRead, logistics, extractResult, new(string.Empty, Array.Empty<string>(), Array.Empty<string>()));
|
||||
else
|
||||
{
|
||||
Tuple<string, string[], string[]> pdsf = GetLogisticsColumnsAndBody(variables[2], variables[4]);
|
||||
Tuple<string, string[], string[]> pdsfNew = GetLogisticsColumnsAndBody(fileRead, logistics, extractResult, pdsf);
|
||||
CompareSave(variables[5], pdsf, pdsfNew);
|
||||
Assert.IsTrue(pdsf.Item1 == pdsfNew.Item1, "Item1 check!");
|
||||
string[] json = GetItem2(pdsf, pdsfNew);
|
||||
CompareSaveJSON(variables[5], json);
|
||||
Assert.IsTrue(json[0] == json[1], "Item2 check!");
|
||||
string[] join = GetItem3(pdsf, pdsfNew);
|
||||
CompareSaveTSV(variables[5], join);
|
||||
Assert.IsTrue(join[0] == join[1], "Item3 (Join) check!");
|
||||
}
|
||||
UpdatePassDirectory(variables[2]);
|
||||
}
|
||||
UpdatePassDirectory(variables[2]);
|
||||
result = extractResult.Item1;
|
||||
return result;
|
||||
}
|
||||
|
||||
}
|
||||
// namespace Adaptation._Tests.Helpers { public class AdaptationTesting { } }
|
||||
// 2022-05-12 -> AdaptationTesting
|
||||
// 2022-08-05 -> AdaptationTesting
|
@ -10,13 +10,13 @@ public class EAFLoggingUnitTesting : LoggingUnitTesting, IDisposable
|
||||
|
||||
public AdaptationTesting AdaptationTesting => _AdaptationTesting;
|
||||
|
||||
public EAFLoggingUnitTesting(TestContext testContext, Type declaringType, bool skipEquipmentDictionary) :
|
||||
public EAFLoggingUnitTesting(string dummyRoot, TestContext testContext, Type declaringType, bool skipEquipmentDictionary) :
|
||||
base(testContext, declaringType)
|
||||
{
|
||||
if (testContext is null || declaringType is null)
|
||||
_AdaptationTesting = null;
|
||||
else
|
||||
_AdaptationTesting = new AdaptationTesting(testContext, skipEquipmentDictionary);
|
||||
_AdaptationTesting = new AdaptationTesting(dummyRoot, testContext, skipEquipmentDictionary, _TestContextPropertiesAsJson, _HasWaitForProperty);
|
||||
}
|
||||
|
||||
public new void Dispose()
|
||||
|
45
Adaptation/_Tests/Shared/MethodBaseName.cs
Normal file
45
Adaptation/_Tests/Shared/MethodBaseName.cs
Normal file
@ -0,0 +1,45 @@
|
||||
namespace Adaptation._Tests.Shared;
|
||||
|
||||
public class MethodBaseName
|
||||
{
|
||||
|
||||
public string After { get; private set; }
|
||||
public string Before { get; private set; }
|
||||
public string CellInstanceConnectionName { get; private set; }
|
||||
public string CellInstanceConnectionNameFromMethodBaseName { get; private set; }
|
||||
public string CellInstanceName { get; private set; }
|
||||
public string CellInstanceVersionName { get; private set; }
|
||||
public string Comment { get; private set; }
|
||||
public string DummyDirectory { get; private set; }
|
||||
public string FileFullName { get; private set; }
|
||||
public string RawCellInstanceName { get; private set; }
|
||||
public string RawVersionName { get; private set; }
|
||||
public string Separator { get; private set; }
|
||||
public string TestResultsDirectory { get; private set; }
|
||||
public string TextFileDirectory { get; private set; }
|
||||
public string Ticks { get; private set; }
|
||||
public string VersionDirectory { get; private set; }
|
||||
public string WithActualCICN { get; private set; }
|
||||
|
||||
public MethodBaseName(string after, string before, string cellInstanceConnectionName, string cellInstanceConnectionNameFromMethodBaseName, string cellInstanceName, string cellInstanceVersionName, string comment, string dummyDirectory, string fileFullName, string rawCellInstanceName, string rawVersionName, string separator, string testResultsDirectory, string textFileDirectory, string ticks, string versionDirectory, string withActualCICN)
|
||||
{
|
||||
After = after;
|
||||
Before = before;
|
||||
CellInstanceConnectionName = cellInstanceConnectionName;
|
||||
CellInstanceConnectionNameFromMethodBaseName = cellInstanceConnectionNameFromMethodBaseName;
|
||||
CellInstanceName = cellInstanceName;
|
||||
CellInstanceVersionName = cellInstanceVersionName;
|
||||
Comment = comment;
|
||||
DummyDirectory = dummyDirectory;
|
||||
FileFullName = fileFullName;
|
||||
RawCellInstanceName = rawCellInstanceName;
|
||||
RawVersionName = rawVersionName;
|
||||
Separator = separator;
|
||||
TestResultsDirectory = testResultsDirectory;
|
||||
TextFileDirectory = textFileDirectory;
|
||||
Ticks = ticks;
|
||||
VersionDirectory = versionDirectory;
|
||||
WithActualCICN = withActualCICN;
|
||||
}
|
||||
|
||||
}
|
@ -13,9 +13,13 @@ namespace Adaptation._Tests.Shared;
|
||||
public class UnitTesting
|
||||
{
|
||||
|
||||
protected readonly bool _HasWaitForProperty;
|
||||
protected readonly IsEnvironment _IsEnvironment;
|
||||
protected readonly string _TestContextPropertiesAsJson;
|
||||
|
||||
public IsEnvironment IsEnvironment => _IsEnvironment;
|
||||
public bool HasWaitForProperty => _HasWaitForProperty;
|
||||
public string TestContextPropertiesAsJson => _TestContextPropertiesAsJson;
|
||||
|
||||
public UnitTesting(TestContext testContext, Type declaringType)
|
||||
{
|
||||
@ -23,18 +27,23 @@ public class UnitTesting
|
||||
_IsEnvironment = null;
|
||||
else
|
||||
{
|
||||
string waitFor = "\"WaitFor\":";
|
||||
string projectDirectory = GetProjectDirectory(testContext);
|
||||
string json = JsonSerializer.Serialize(testContext.Properties);
|
||||
_TestContextPropertiesAsJson = JsonSerializer.Serialize(testContext.Properties, new JsonSerializerOptions { WriteIndented = true });
|
||||
_HasWaitForProperty = _TestContextPropertiesAsJson.Contains(waitFor);
|
||||
string vsCodeDirectory = Path.Combine(projectDirectory, ".vscode");
|
||||
if (!Directory.Exists(vsCodeDirectory))
|
||||
_ = Directory.CreateDirectory(vsCodeDirectory);
|
||||
string launchText = GetLaunchText();
|
||||
File.WriteAllText(Path.Combine(vsCodeDirectory, "launch.json"), launchText);
|
||||
for (int i = 0; i < int.MaxValue; i++)
|
||||
if (_HasWaitForProperty)
|
||||
{
|
||||
if (!json.Contains("Debugger.IsAttached") || Debugger.IsAttached)
|
||||
break;
|
||||
Thread.Sleep(500);
|
||||
for (int i = 0; i < int.MaxValue; i++)
|
||||
{
|
||||
if (!_TestContextPropertiesAsJson.Contains($"{waitFor} \"Debugger.IsAttached\"") || Debugger.IsAttached)
|
||||
break;
|
||||
Thread.Sleep(500);
|
||||
}
|
||||
}
|
||||
MethodBase methodBase = declaringType.GetMethod(testContext.TestName);
|
||||
if (methodBase is not null)
|
||||
|
67
Adaptation/_Tests/Static/pcl.cs
Normal file
67
Adaptation/_Tests/Static/pcl.cs
Normal file
@ -0,0 +1,67 @@
|
||||
using Adaptation._Tests.Shared;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.Reflection;
|
||||
|
||||
namespace Adaptation._Tests.Static;
|
||||
|
||||
[TestClass]
|
||||
public class PCL : LoggingUnitTesting, IDisposable
|
||||
{
|
||||
|
||||
#pragma warning disable CA2254
|
||||
#pragma warning disable IDE0060
|
||||
|
||||
internal static PCL LoggingUnitTesting { get; private set; }
|
||||
|
||||
public PCL() : base(testContext: null, declaringType: null)
|
||||
{
|
||||
if (LoggingUnitTesting is null)
|
||||
throw new Exception();
|
||||
}
|
||||
|
||||
public PCL(TestContext testContext) : base(testContext, new StackFrame().GetMethod().DeclaringType)
|
||||
{
|
||||
}
|
||||
|
||||
[ClassInitialize]
|
||||
public static void ClassInitialize(TestContext testContext)
|
||||
{
|
||||
if (LoggingUnitTesting is null)
|
||||
LoggingUnitTesting = new PCL(testContext);
|
||||
}
|
||||
|
||||
[ClassCleanup()]
|
||||
public static void ClassCleanup()
|
||||
{
|
||||
if (LoggingUnitTesting.Logger is not null)
|
||||
LoggingUnitTesting.Logger.LogInformation("Cleanup");
|
||||
if (LoggingUnitTesting is not null)
|
||||
LoggingUnitTesting.Dispose();
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
public void TestDescriptor()
|
||||
{
|
||||
FileHandlers.pcl.Descriptor descriptor;
|
||||
MethodBase methodBase = new StackFrame().GetMethod();
|
||||
LoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
|
||||
descriptor = FileHandlers.pcl.ProcessData.GetDescriptor("12-123456-1234");
|
||||
Assert.IsTrue(descriptor.Reactor is "12");
|
||||
Assert.IsTrue(descriptor.RDS is "123456");
|
||||
Assert.IsTrue(descriptor.PSN is "1234");
|
||||
descriptor = FileHandlers.pcl.ProcessData.GetDescriptor("123456");
|
||||
Assert.IsTrue(descriptor.Reactor is "00");
|
||||
Assert.IsTrue(descriptor.RDS is "123456");
|
||||
Assert.IsTrue(descriptor.PSN is "0000");
|
||||
descriptor = FileHandlers.pcl.ProcessData.GetDescriptor("MP");
|
||||
Assert.IsTrue(descriptor.Reactor is "00");
|
||||
Assert.IsTrue(descriptor.RDS is "000000");
|
||||
Assert.IsTrue(descriptor.PSN is "0000");
|
||||
Assert.IsTrue(descriptor.Employee is "MP");
|
||||
LoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
|
||||
}
|
||||
|
||||
}
|
@ -1,5 +1,21 @@
|
||||
{
|
||||
"scripts": {
|
||||
"AA-CreateSelfDescription.Staging.v2_43_4-HGCV1_EQPT": "dotnet test --runtime win-x64 --no-build --filter \"FullyQualifiedName~Adaptation._Tests.CreateSelfDescription.Staging.v2_43_4 & ClassName~HGCV1_EQPT\" -- TestRunParameters.Parameter(name=\\\"WaitFor\\\", value=\\\"Debugger.IsAttached\\\")",
|
||||
"AB-CreateSelfDescription.Staging.v2_43_4-HGCV2_EQPT": "dotnet test --runtime win-x64 --no-build --filter \"FullyQualifiedName~Adaptation._Tests.CreateSelfDescription.Staging.v2_43_4 & ClassName~HGCV2_EQPT\" -- TestRunParameters.Parameter(name=\\\"WaitFor\\\", value=\\\"Debugger.IsAttached\\\")",
|
||||
"AC-CreateSelfDescription.Staging.v2_43_4-HGCV3_EQPT": "dotnet test --runtime win-x64 --no-build --filter \"FullyQualifiedName~Adaptation._Tests.CreateSelfDescription.Staging.v2_43_4 & ClassName~HGCV3_EQPT\" -- TestRunParameters.Parameter(name=\\\"WaitFor\\\", value=\\\"Debugger.IsAttached\\\")",
|
||||
"BA-CreateSelfDescription.Staging.v2_43_4-HGCV1": "dotnet test --runtime win-x64 --no-build --filter \"FullyQualifiedName~Adaptation._Tests.CreateSelfDescription.Staging.v2_43_4 & ClassName~HGCV1\" -- TestRunParameters.Parameter(name=\\\"WaitFor\\\", value=\\\"Debugger.IsAttached\\\")",
|
||||
"BB-CreateSelfDescription.Staging.v2_43_4-HGCV2": "dotnet test --runtime win-x64 --no-build --filter \"FullyQualifiedName~Adaptation._Tests.CreateSelfDescription.Staging.v2_43_4 & ClassName~HGCV2\" -- TestRunParameters.Parameter(name=\\\"WaitFor\\\", value=\\\"Debugger.IsAttached\\\")",
|
||||
"BC-CreateSelfDescription.Staging.v2_43_4-HGCV3": "dotnet test --runtime win-x64 --no-build --filter \"FullyQualifiedName~Adaptation._Tests.CreateSelfDescription.Staging.v2_43_4 & ClassName~HGCV3\" -- TestRunParameters.Parameter(name=\\\"WaitFor\\\", value=\\\"Debugger.IsAttached\\\")",
|
||||
"CA-CreateSelfDescription.Staging.v2_43_4-MET08RESIHGCV": "dotnet test --runtime win-x64 --no-build --filter \"FullyQualifiedName~Adaptation._Tests.CreateSelfDescription.Staging.v2_43_4 & ClassName~MET08RESIHGCV\" -- TestRunParameters.Parameter(name=\\\"WaitFor\\\", value=\\\"Debugger.IsAttached\\\")",
|
||||
"DA-CreateSelfDescription.Staging.v2_43_4": "dotnet test --runtime win-x64 --no-build --filter \"FullyQualifiedName~Adaptation._Tests.CreateSelfDescription.Staging.v2_43_4\" -- TestRunParameters.Parameter(name=\\\"WaitFor\\\", value=\\\"Debugger.IsAttached\\\")",
|
||||
"EA-Extract.Staging.v2_43_4-HGCV1_EQPT-Staging__v2_43_4__HGCV1_EQPT__DownloadRsMFile637953072332628623__Normal": "dotnet test --runtime win-x64 --no-build --filter \"FullyQualifiedName~Adaptation._Tests.Extract.Staging.v2_43_4 & ClassName~HGCV1_EQPT & Name~Staging__v2_43_4__HGCV1_EQPT__DownloadRsMFile637953072332628623__Normal\" -- TestRunParameters.Parameter(name=\\\"WaitFor\\\", value=\\\"Debugger.IsAttached\\\")",
|
||||
"EA-Extract.Staging.v2_43_4-HGCV2_EQPT-Staging__v2_43_4__HGCV2_EQPT__DownloadRsMFile637953072332628623__Normal": "dotnet test --runtime win-x64 --no-build --filter \"FullyQualifiedName~Adaptation._Tests.Extract.Staging.v2_43_4 & ClassName~HGCV2_EQPT & Name~Staging__v2_43_4__HGCV2_EQPT__DownloadRsMFile637953072332628623__Normal\" -- TestRunParameters.Parameter(name=\\\"WaitFor\\\", value=\\\"Debugger.IsAttached\\\")",
|
||||
"EA-Extract.Staging.v2_43_4-HGCV3_EQPT-Staging__v2_43_4__HGCV3_EQPT__DownloadRsMFile637953072332628623__Normal": "dotnet test --runtime win-x64 --no-build --filter \"FullyQualifiedName~Adaptation._Tests.Extract.Staging.v2_43_4 & ClassName~HGCV3_EQPT & Name~Staging__v2_43_4__HGCV3_EQPT__DownloadRsMFile637953072332628623__Normal\" -- TestRunParameters.Parameter(name=\\\"WaitFor\\\", value=\\\"Debugger.IsAttached\\\")",
|
||||
"FA-Extract.Staging.v2_43_4-HGCV1-Staging__v2_43_4__HGCV1__pcl637955429602879992__Normal": "dotnet test --filter \"FullyQualifiedName~Adaptation._Tests.Extract.Staging.v2_43_4 & ClassName~HGCV1 & Name~Staging__v2_43_4__HGCV1__pcl637955429602879992__Normal\" -- TestRunParameters.Parameter(name=\\\"WaitFor\\\", value=\\\"Debugger.IsAttached\\\")",
|
||||
"FB-Extract.Staging.v2_43_4-HGCV2-Staging__v2_43_4__HGCV2__pcl637955471606299897__Normal": "dotnet test --filter \"FullyQualifiedName~Adaptation._Tests.Extract.Staging.v2_43_4 & ClassName~HGCV2 & Name~Staging__v2_43_4__HGCV2__pcl637955471606299897__Normal\" -- TestRunParameters.Parameter(name=\\\"WaitFor\\\", value=\\\"Debugger.IsAttached\\\")",
|
||||
"FC-Extract.Staging.v2_43_4-HGCV3-Staging__v2_43_4__HGCV3__pcl637955459372840332__Normal": "dotnet test --filter \"FullyQualifiedName~Adaptation._Tests.Extract.Staging.v2_43_4 & ClassName~HGCV3 & Name~Staging__v2_43_4__HGCV3__pcl637955459372840332__Normal\" -- TestRunParameters.Parameter(name=\\\"WaitFor\\\", value=\\\"Debugger.IsAttached\\\")",
|
||||
"GA-Extract.Staging.v2_43_4-MET08RESIHGCV-Staging__v2_43_4__MET08RESIHGCV__MoveMatchingFiles637955459372840332__Normal": "dotnet test --filter \"FullyQualifiedName~Adaptation._Tests.Extract.Staging.v2_43_4 & ClassName~MET08RESIHGCV & Name~Staging__v2_43_4__MET08RESIHGCV__MoveMatchingFiles637955459372840332__Normal\" -- TestRunParameters.Parameter(name=\\\"WaitFor\\\", value=\\\"Debugger.IsAttached\\\")",
|
||||
"HA-Extract.Staging.v2_43_4-HGCV3-Staging__v2_43_4__HGCV3__pcl637812984345592512__MinFileLength": "dotnet test --filter \"FullyQualifiedName~Adaptation._Tests.Extract.Staging.v2_43_4 & ClassName~HGCV3 & Name~Staging__v2_43_4__HGCV3__pcl637812984345592512__MinFileLength\" -- TestRunParameters.Parameter(name=\\\"WaitFor\\\", value=\\\"Debugger.IsAttached\\\")",
|
||||
"Alpha": "ABCDEFGHIJKLMNOPQRSTUVWXYZ",
|
||||
"nuget-clear": "dotnet nuget locals all --clear",
|
||||
"build": "dotnet build --runtime win-x64 --self-contained",
|
||||
@ -9,19 +25,6 @@
|
||||
"dotnet-format": "dotnet format --report .vscode --verbosity detailed --severity warn",
|
||||
"MSBuild": "\"C:/Program Files (x86)/Microsoft Visual Studio/2022/BuildTools/MSBuild/Current/Bin/MSBuild.exe\" /target:Build /restore:True /p:RestoreSources=https://api.nuget.org/v3/index.json%3Bhttps://packagemanagement.eu.infineon.com:4430/api/v2/%3Bhttps://tfs.intra.infineon.com/tfs/ManufacturingIT/_packaging/eaf/nuget/v3/index.json /detailedsummary /consoleloggerparameters:PerformanceSummary;ErrorsOnly; /property:Configuration=Debug;TargetFrameworkVersion=v4.8 ../MET08RESIHGCV.csproj",
|
||||
"pull": "git pull",
|
||||
"garbage-collect": "git gc",
|
||||
"AS-CreateSelfDescription.Staging.v2_43_0-MET08RESIHGCV": "dotnet test --runtime win-x64 --no-build --filter \"FullyQualifiedName~Adaptation._Tests.CreateSelfDescription.Staging.v2_43_0 & ClassName~MET08RESIHGCV\" -- TestRunParameters.Parameter(name=\\\"Debug\\\", value=\\\"Debugger.IsAttached\\\")",
|
||||
"AU-CreateSelfDescription.Staging.v2_43_0-HGCV1": "dotnet test --runtime win-x64 --no-build --filter \"FullyQualifiedName~Adaptation._Tests.CreateSelfDescription.Staging.v2_43_0 & ClassName~HGCV1\" -- TestRunParameters.Parameter(name=\\\"Debug\\\", value=\\\"Debugger.IsAttached\\\")",
|
||||
"AW-CreateSelfDescription.Staging.v2_43_0-HGCV2": "dotnet test --runtime win-x64 --no-build --filter \"FullyQualifiedName~Adaptation._Tests.CreateSelfDescription.Staging.v2_43_0 & ClassName~HGCV2\" -- TestRunParameters.Parameter(name=\\\"Debug\\\", value=\\\"Debugger.IsAttached\\\")",
|
||||
"AY-CreateSelfDescription.Staging.v2_43_0-HGCV3": "dotnet test --runtime win-x64 --no-build --filter \"FullyQualifiedName~Adaptation._Tests.CreateSelfDescription.Staging.v2_43_0 & ClassName~HGCV3\" -- TestRunParameters.Parameter(name=\\\"Debug\\\", value=\\\"Debugger.IsAttached\\\")",
|
||||
"AZ-CreateSelfDescription.Staging.v2_43_0": "dotnet test --runtime win-x64 --no-build --filter \"FullyQualifiedName~Adaptation._Tests.CreateSelfDescription.Staging.v2_43_0\" -- TestRunParameters.Parameter(name=\\\"Debug\\\", value=\\\"Debugger.IsAttached\\\")",
|
||||
"BA-Extract.Staging.v2_43_0-HGCV3-Staging__v2_43_0__HGCV3__pcl637812984345592512__MinFileLength": "dotnet test --filter \"FullyQualifiedName~Adaptation._Tests.Extract.Staging.v2_43_0 & ClassName~HGCV3 & Name~Staging__v2_43_0__HGCV3__pcl637812984345592512__MinFileLength\" -- TestRunParameters.Parameter(name=\\\"Debug\\\", value=\\\"Debugger.IsAttached\\\")",
|
||||
"BB-Extract.Staging.v2_43_0-HGCV3-Staging__v2_43_0__HGCV3__pcl637816384579205568__Normal": "dotnet test --filter \"FullyQualifiedName~Adaptation._Tests.Extract.Staging.v2_43_0 & ClassName~HGCV3 & Name~Staging__v2_43_0__HGCV3__pcl637816384579205568__Normal\" -- TestRunParameters.Parameter(name=\\\"Debug\\\", value=\\\"Debugger.IsAttached\\\")",
|
||||
"BC-Extract.Staging.v2_43_0-MET08RESIHGCV-Staging__v2_43_0__MET08RESIHGCV__MoveMatchingFiles637816296802048814__Normal": "dotnet test --filter \"FullyQualifiedName~Adaptation._Tests.Extract.Staging.v2_43_0 & ClassName~MET08RESIHGCV & Name~Staging__v2_43_0__MET08RESIHGCV__MoveMatchingFiles637816296802048814__Normal\" -- TestRunParameters.Parameter(name=\\\"Debug\\\", value=\\\"Debugger.IsAttached\\\")",
|
||||
"BS-Extract.Staging.v2_43_0-MET08RESIHGCV": "dotnet test --runtime win-x64 --no-build --filter \"FullyQualifiedName~Adaptation._Tests.Extract.Staging.v2_43_0 & ClassName~MET08RESIHGCV\" -- TestRunParameters.Parameter(name=\\\"Debug\\\", value=\\\"Debugger.IsAttached\\\")",
|
||||
"BU-Extract.Staging.v2_43_0-HGCV1": "dotnet test --runtime win-x64 --no-build --filter \"FullyQualifiedName~Adaptation._Tests.Extract.Staging.v2_43_0 & ClassName~HGCV1\" -- TestRunParameters.Parameter(name=\\\"Debug\\\", value=\\\"Debugger.IsAttached\\\")",
|
||||
"BW-Extract.Staging.v2_43_0-HGCV2": "dotnet test --runtime win-x64 --no-build --filter \"FullyQualifiedName~Adaptation._Tests.Extract.Staging.v2_43_0 & ClassName~HGCV2\" -- TestRunParameters.Parameter(name=\\\"Debug\\\", value=\\\"Debugger.IsAttached\\\")",
|
||||
"BY-Extract.Staging.v2_43_0-HGCV3": "dotnet test --runtime win-x64 --no-build --filter \"FullyQualifiedName~Adaptation._Tests.Extract.Staging.v2_43_0 & ClassName~HGCV3\" -- TestRunParameters.Parameter(name=\\\"Debug\\\", value=\\\"Debugger.IsAttached\\\")",
|
||||
"BZ-Extract.Staging.v2_43_0": "dotnet test --runtime win-x64 --no-build --filter \"FullyQualifiedName~Adaptation._Tests.Extract.Staging.v2_43_0\" -- TestRunParameters.Parameter(name=\\\"Debug\\\", value=\\\"Debugger.IsAttached\\\")"
|
||||
"garbage-collect": "git gc"
|
||||
}
|
||||
}
|
@ -107,10 +107,10 @@
|
||||
<Compile Include="Adaptation\FileHandlers\OpenInsightMetrologyViewer\WSRequest.cs" />
|
||||
<Compile Include="Adaptation\FileHandlers\OpenInsight\FileRead.cs" />
|
||||
<Compile Include="Adaptation\FileHandlers\pcl\Description.cs" />
|
||||
<Compile Include="Adaptation\FileHandlers\pcl\Descriptor.cs" />
|
||||
<Compile Include="Adaptation\FileHandlers\pcl\Detail.cs" />
|
||||
<Compile Include="Adaptation\FileHandlers\pcl\FileRead.cs" />
|
||||
<Compile Include="Adaptation\FileHandlers\pcl\ProcessData.cs" />
|
||||
<Compile Include="Adaptation\FileHandlers\pcl\teest.cs" />
|
||||
<Compile Include="Adaptation\FileHandlers\Processed\FileRead.cs" />
|
||||
<Compile Include="Adaptation\FileHandlers\SPaCe\FileRead.cs" />
|
||||
<Compile Include="Adaptation\Ifx\Eaf\Common\Configuration\ConnectionSetting.cs" />
|
||||
|
Loading…
x
Reference in New Issue
Block a user