MET08RESIMAPCDE - v2.47.0- Zone
This commit is contained in:
parent
6a9f1efeb6
commit
ab0f5382ff
@ -3,6 +3,7 @@ namespace Adaptation.FileHandlers.RsM;
|
||||
public class Descriptor
|
||||
{
|
||||
|
||||
public string Employee { get; private set; }
|
||||
public string Layer { get; private set; }
|
||||
public string PSN { get; private set; }
|
||||
public string RDS { get; private set; }
|
||||
@ -10,8 +11,9 @@ public class Descriptor
|
||||
public string Run { get; private set; }
|
||||
public string Zone { get; private set; }
|
||||
|
||||
public Descriptor(string layer, string psn, string rds, string reactor, string run, string zone)
|
||||
public Descriptor(string employee, string layer, string psn, string rds, string reactor, string run, string zone)
|
||||
{
|
||||
Employee = employee;
|
||||
Layer = layer;
|
||||
PSN = psn;
|
||||
RDS = rds;
|
||||
|
@ -86,6 +86,65 @@ public class ProcessData : IProcessData
|
||||
return results;
|
||||
}
|
||||
|
||||
private static (string, string) GetReactorAndRDS(string defaultReactor, string defaultRDS, string text, string formattedText, string[] segments)
|
||||
{
|
||||
string rds;
|
||||
string reactor;
|
||||
if (string.IsNullOrEmpty(text) || segments.Length == 0 || string.IsNullOrEmpty(formattedText))
|
||||
reactor = defaultReactor;
|
||||
else
|
||||
reactor = segments[0];
|
||||
if (segments.Length <= 1 || !int.TryParse(segments[1], out int rdsValue) || rdsValue < 99)
|
||||
rds = defaultRDS;
|
||||
else
|
||||
rds = segments[1];
|
||||
if (reactor.Length > 3)
|
||||
{
|
||||
rds = reactor;
|
||||
reactor = defaultReactor;
|
||||
}
|
||||
return new(reactor, rds);
|
||||
}
|
||||
|
||||
private static (string, string) GetLayerAndPSN(string defaultLayer, string defaultPSN, string[] segments)
|
||||
{
|
||||
string psn;
|
||||
string layer;
|
||||
if (segments.Length <= 2)
|
||||
{
|
||||
psn = defaultPSN;
|
||||
layer = defaultLayer;
|
||||
}
|
||||
else
|
||||
{
|
||||
string[] segmentsB = segments[2].Split('.');
|
||||
psn = segmentsB[0];
|
||||
if (segmentsB.Length <= 1)
|
||||
layer = defaultLayer;
|
||||
else
|
||||
{
|
||||
layer = segmentsB[1];
|
||||
if (layer.Length > 1 && layer[0] == '0')
|
||||
layer = layer.Substring(1);
|
||||
}
|
||||
}
|
||||
return (layer, psn);
|
||||
}
|
||||
|
||||
private static string GetZone(string[] segments)
|
||||
{
|
||||
string result;
|
||||
if (segments.Length <= 3)
|
||||
result = string.Empty;
|
||||
else
|
||||
{
|
||||
result = segments[3];
|
||||
if (result.Length > 1 && result[0] == '0')
|
||||
result = result.Substring(1);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
public static Descriptor GetDescriptor(string text)
|
||||
{
|
||||
Descriptor result;
|
||||
@ -96,66 +155,51 @@ public class ProcessData : IProcessData
|
||||
string layer;
|
||||
string title;
|
||||
string reactor;
|
||||
string[] segments;
|
||||
const string defaultPSN = "0000";
|
||||
const string defaultRDS = "000000";
|
||||
const string defaultReactor = "00";
|
||||
if (text.Length is 2 or 3)
|
||||
string employee;
|
||||
string defaultPSN = string.Empty;
|
||||
string defaultRDS = string.Empty;
|
||||
string defaultZone = string.Empty;
|
||||
string defaultLayer = string.Empty;
|
||||
string defaultReactor = string.Empty;
|
||||
string defaultEmployee = string.Empty;
|
||||
if (string.IsNullOrEmpty(text) || (text.Length is 2 or 3 && Regex.IsMatch(text, "^[a-zA-z]{2,3}")))
|
||||
{
|
||||
run = text;
|
||||
employee = text;
|
||||
psn = defaultPSN;
|
||||
rds = defaultRDS;
|
||||
zone = defaultZone;
|
||||
layer = defaultLayer;
|
||||
reactor = defaultReactor;
|
||||
}
|
||||
else if (Regex.IsMatch(text, @"^[0-9]{2}[.][0-9]{1}[.]?[0-9]{0,1}"))
|
||||
{
|
||||
string[] segments = text.Split('.');
|
||||
run = text;
|
||||
psn = defaultPSN;
|
||||
rds = defaultRDS;
|
||||
zone = string.Empty;
|
||||
layer = string.Empty;
|
||||
reactor = defaultReactor;
|
||||
layer = segments[1];
|
||||
reactor = segments[0];
|
||||
employee = defaultEmployee;
|
||||
if (segments.Length <= 2)
|
||||
zone = defaultZone;
|
||||
else
|
||||
zone = segments[2];
|
||||
}
|
||||
else
|
||||
{
|
||||
// Remove illegal characters \/:*?"<>| found in the title.
|
||||
title = Regex.Replace(text, @"[\\,\/,\:,\*,\?,\"",\<,\>,\|]", "_").Split('\r')[0].Split('\n')[0];
|
||||
if (title.StartsWith("1T") || title.StartsWith("1t"))
|
||||
if (title.Length > 2 && title[0] == '1' && (title[1] == 'T' || title[1] == 't'))
|
||||
title = title.Substring(2);
|
||||
run = title;
|
||||
segments = title.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];
|
||||
string[] segments = title.Split('-');
|
||||
(reactor, rds) = GetReactorAndRDS(defaultReactor, defaultRDS, text, title, segments);
|
||||
(layer, psn) = GetLayerAndPSN(defaultLayer, defaultPSN, segments);
|
||||
zone = GetZone(segments);
|
||||
employee = defaultEmployee;
|
||||
}
|
||||
if (layer.Length > 1 && layer[0] == '0')
|
||||
layer = layer.Substring(1);
|
||||
if (zone.Length > 1 && zone[0] == '0')
|
||||
zone = zone.Substring(1);
|
||||
result = new(layer, psn, rds, reactor, run, zone);
|
||||
result = new(employee, layer, psn, rds, reactor, run, zone);
|
||||
return result;
|
||||
}
|
||||
|
||||
@ -169,6 +213,7 @@ public class ProcessData : IProcessData
|
||||
Zone = descriptor.Zone;
|
||||
Layer = descriptor.Layer;
|
||||
Reactor = descriptor.Reactor;
|
||||
Employee = descriptor.Employee;
|
||||
UniqueId = string.Concat(logistics.JobID, "_", descriptor.Run, "_", logistics.DateTimeFromSequence.ToString(timeFormat));
|
||||
}
|
||||
|
||||
|
@ -3,6 +3,7 @@ namespace Adaptation.FileHandlers.txt;
|
||||
public class Descriptor
|
||||
{
|
||||
|
||||
public string Employee { get; private set; }
|
||||
public string Layer { get; private set; }
|
||||
public string PSN { get; private set; }
|
||||
public string RDS { get; private set; }
|
||||
@ -11,8 +12,9 @@ public class Descriptor
|
||||
public string Title { get; private set; }
|
||||
public string Zone { get; private set; }
|
||||
|
||||
public Descriptor(string layer, string psn, string rds, string reactor, string run, string title, string zone)
|
||||
public Descriptor(string employee, string layer, string psn, string rds, string reactor, string run, string title, string zone)
|
||||
{
|
||||
Employee = employee;
|
||||
Layer = layer;
|
||||
PSN = psn;
|
||||
RDS = rds;
|
||||
|
@ -242,6 +242,65 @@ public class ProcessData : IProcessData
|
||||
return result;
|
||||
}
|
||||
|
||||
private static (string, string) GetReactorAndRDS(string defaultReactor, string defaultRDS, string text, string formattedText, string[] segments)
|
||||
{
|
||||
string rds;
|
||||
string reactor;
|
||||
if (string.IsNullOrEmpty(text) || segments.Length == 0 || string.IsNullOrEmpty(formattedText))
|
||||
reactor = defaultReactor;
|
||||
else
|
||||
reactor = segments[0];
|
||||
if (segments.Length <= 1 || !int.TryParse(segments[1], out int rdsValue) || rdsValue < 99)
|
||||
rds = defaultRDS;
|
||||
else
|
||||
rds = segments[1];
|
||||
if (reactor.Length > 3)
|
||||
{
|
||||
rds = reactor;
|
||||
reactor = defaultReactor;
|
||||
}
|
||||
return new(reactor, rds);
|
||||
}
|
||||
|
||||
private static (string, string) GetLayerAndPSN(string defaultLayer, string defaultPSN, string[] segments)
|
||||
{
|
||||
string psn;
|
||||
string layer;
|
||||
if (segments.Length <= 2)
|
||||
{
|
||||
psn = defaultPSN;
|
||||
layer = defaultLayer;
|
||||
}
|
||||
else
|
||||
{
|
||||
string[] segmentsB = segments[2].Split('.');
|
||||
psn = segmentsB[0];
|
||||
if (segmentsB.Length <= 1)
|
||||
layer = defaultLayer;
|
||||
else
|
||||
{
|
||||
layer = segmentsB[1];
|
||||
if (layer.Length > 1 && layer[0] == '0')
|
||||
layer = layer.Substring(1);
|
||||
}
|
||||
}
|
||||
return (layer, psn);
|
||||
}
|
||||
|
||||
private static string GetZone(string[] segments)
|
||||
{
|
||||
string result;
|
||||
if (segments.Length <= 3)
|
||||
result = string.Empty;
|
||||
else
|
||||
{
|
||||
result = segments[3];
|
||||
if (result.Length > 1 && result[0] == '0')
|
||||
result = result.Substring(1);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
public static Descriptor GetDescriptor(string text)
|
||||
{
|
||||
Descriptor result;
|
||||
@ -249,70 +308,56 @@ public class ProcessData : IProcessData
|
||||
string rds;
|
||||
string run;
|
||||
string zone;
|
||||
string title;
|
||||
string layer;
|
||||
string title;
|
||||
string reactor;
|
||||
string[] segments;
|
||||
const string defaultPSN = "0000";
|
||||
const string defaultRDS = "000000";
|
||||
const string defaultReactor = "00";
|
||||
if (text.Length is 2 or 3)
|
||||
string employee;
|
||||
string defaultPSN = string.Empty;
|
||||
string defaultRDS = string.Empty;
|
||||
string defaultZone = string.Empty;
|
||||
string defaultLayer = string.Empty;
|
||||
string defaultReactor = string.Empty;
|
||||
string defaultEmployee = string.Empty;
|
||||
if (string.IsNullOrEmpty(text) || (text.Length is 2 or 3 && Regex.IsMatch(text, "^[a-zA-z]{2,3}")))
|
||||
{
|
||||
run = text;
|
||||
title = text;
|
||||
employee = text;
|
||||
psn = defaultPSN;
|
||||
rds = defaultRDS;
|
||||
zone = defaultZone;
|
||||
layer = defaultLayer;
|
||||
reactor = defaultReactor;
|
||||
}
|
||||
else if (Regex.IsMatch(text, @"^[0-9]{2}[.][0-9]{1}[.]?[0-9]{0,1}"))
|
||||
{
|
||||
string[] segments = text.Split('.');
|
||||
run = text;
|
||||
title = text;
|
||||
psn = defaultPSN;
|
||||
rds = defaultRDS;
|
||||
zone = string.Empty;
|
||||
layer = string.Empty;
|
||||
reactor = defaultReactor;
|
||||
layer = segments[1];
|
||||
reactor = segments[0];
|
||||
employee = defaultEmployee;
|
||||
if (segments.Length <= 2)
|
||||
zone = defaultZone;
|
||||
else
|
||||
zone = segments[2];
|
||||
}
|
||||
else
|
||||
{
|
||||
// Remove illegal characters \/:*?"<>| found in the run.
|
||||
title = Regex.Replace(text, @"[\\,\/,\:,\*,\?,\"",\<,\>,\|]", "_").Split('\r')[0].Split('\n')[0];
|
||||
if (title.StartsWith("1T") || title.StartsWith("1t"))
|
||||
if (title.Length > 2 && title[0] == '1' && (title[1] == 'T' || title[1] == 't'))
|
||||
title = title.Substring(2);
|
||||
run = title;
|
||||
segments = title.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];
|
||||
string[] segments = title.Split('-');
|
||||
(reactor, rds) = GetReactorAndRDS(defaultReactor, defaultRDS, text, title, segments);
|
||||
(layer, psn) = GetLayerAndPSN(defaultLayer, defaultPSN, segments);
|
||||
zone = GetZone(segments);
|
||||
employee = defaultEmployee;
|
||||
}
|
||||
if (layer.Length > 1 && layer[0] == '0')
|
||||
layer = layer.Substring(1);
|
||||
if (zone.Length > 1 && zone[0] == '0')
|
||||
zone = zone.Substring(1);
|
||||
result = new(layer, psn, rds, reactor, run, title, zone);
|
||||
result = new(employee, layer, psn, rds, reactor, run, title, zone);
|
||||
return result;
|
||||
}
|
||||
|
||||
@ -359,6 +404,7 @@ public class ProcessData : IProcessData
|
||||
layer = descriptor.Layer;
|
||||
title = descriptor.Title;
|
||||
reactor = descriptor.Reactor;
|
||||
employee = descriptor.Employee;
|
||||
resistivitySpec = GetToEOL();
|
||||
ScanPast("EQUIP#:");
|
||||
equipId = GetBefore("Engineer:");
|
||||
@ -369,7 +415,10 @@ public class ProcessData : IProcessData
|
||||
lot = GetBefore("D.L.RATIO:");
|
||||
dlRatio = GetToEOL();
|
||||
ScanPast("OPERATOR:");
|
||||
employee = GetBefore("TEMP:");
|
||||
if (!string.IsNullOrEmpty(employee))
|
||||
_ = GetBefore("TEMP:");
|
||||
else
|
||||
employee = GetBefore("TEMP:");
|
||||
temp = GetToken();
|
||||
string dateTimeText = GetToEOL();
|
||||
DateTime dateTime = GetDateTime(logistics, dateTimeText);
|
||||
|
@ -48,34 +48,90 @@ public class RsM : LoggingUnitTesting, IDisposable
|
||||
FileHandlers.RsM.Descriptor descriptor;
|
||||
MethodBase methodBase = new StackFrame().GetMethod();
|
||||
LoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
|
||||
descriptor = FileHandlers.RsM.ProcessData.GetDescriptor(string.Empty);
|
||||
Assert.IsTrue(string.IsNullOrEmpty(descriptor.Reactor));
|
||||
Assert.IsTrue(string.IsNullOrEmpty(descriptor.RDS));
|
||||
Assert.IsTrue(string.IsNullOrEmpty(descriptor.PSN));
|
||||
Assert.IsTrue(string.IsNullOrEmpty(descriptor.Layer));
|
||||
Assert.IsTrue(string.IsNullOrEmpty(descriptor.Zone));
|
||||
Assert.IsTrue(string.IsNullOrEmpty(descriptor.Employee));
|
||||
descriptor = FileHandlers.RsM.ProcessData.GetDescriptor("12-123456-1234");
|
||||
Assert.IsTrue(descriptor.Reactor is "12");
|
||||
Assert.IsTrue(descriptor.RDS is "123456");
|
||||
Assert.IsTrue(descriptor.PSN is "1234");
|
||||
Assert.IsTrue(string.IsNullOrEmpty(descriptor.Layer));
|
||||
Assert.IsTrue(string.IsNullOrEmpty(descriptor.Zone));
|
||||
Assert.IsTrue(string.IsNullOrEmpty(descriptor.Employee));
|
||||
descriptor = FileHandlers.RsM.ProcessData.GetDescriptor("123456");
|
||||
Assert.IsTrue(descriptor.Reactor is "00");
|
||||
Assert.IsTrue(string.IsNullOrEmpty(descriptor.Reactor));
|
||||
Assert.IsTrue(descriptor.RDS is "123456");
|
||||
Assert.IsTrue(descriptor.PSN is "0000");
|
||||
Assert.IsTrue(string.IsNullOrEmpty(descriptor.PSN));
|
||||
Assert.IsTrue(string.IsNullOrEmpty(descriptor.Layer));
|
||||
Assert.IsTrue(string.IsNullOrEmpty(descriptor.Zone));
|
||||
Assert.IsTrue(string.IsNullOrEmpty(descriptor.Employee));
|
||||
descriptor = FileHandlers.RsM.ProcessData.GetDescriptor("1T123456");
|
||||
Assert.IsTrue(descriptor.Reactor is "00");
|
||||
Assert.IsTrue(string.IsNullOrEmpty(descriptor.Reactor));
|
||||
Assert.IsTrue(descriptor.RDS is "123456");
|
||||
Assert.IsTrue(descriptor.PSN is "0000");
|
||||
Assert.IsTrue(string.IsNullOrEmpty(descriptor.PSN));
|
||||
Assert.IsTrue(string.IsNullOrEmpty(descriptor.Layer));
|
||||
Assert.IsTrue(string.IsNullOrEmpty(descriptor.Zone));
|
||||
Assert.IsTrue(string.IsNullOrEmpty(descriptor.Employee));
|
||||
descriptor = FileHandlers.RsM.ProcessData.GetDescriptor("MP");
|
||||
Assert.IsTrue(descriptor.Reactor is "00");
|
||||
Assert.IsTrue(descriptor.RDS is "000000");
|
||||
Assert.IsTrue(descriptor.PSN is "0000");
|
||||
Assert.IsTrue(string.IsNullOrEmpty(descriptor.Reactor));
|
||||
Assert.IsTrue(string.IsNullOrEmpty(descriptor.RDS));
|
||||
Assert.IsTrue(string.IsNullOrEmpty(descriptor.PSN));
|
||||
Assert.IsTrue(descriptor.Employee is "MP");
|
||||
Assert.IsTrue(string.IsNullOrEmpty(descriptor.Layer));
|
||||
Assert.IsTrue(string.IsNullOrEmpty(descriptor.Zone));
|
||||
descriptor = FileHandlers.RsM.ProcessData.GetDescriptor("12-123456-1234.2-1");
|
||||
Assert.IsTrue(descriptor.Reactor is "12");
|
||||
Assert.IsTrue(descriptor.RDS is "123456");
|
||||
Assert.IsTrue(descriptor.PSN is "1234");
|
||||
Assert.IsTrue(descriptor.Layer is "2");
|
||||
Assert.IsTrue(descriptor.Zone is "1");
|
||||
Assert.IsTrue(string.IsNullOrEmpty(descriptor.Employee));
|
||||
descriptor = FileHandlers.RsM.ProcessData.GetDescriptor("12-123456-1234.02-01");
|
||||
Assert.IsTrue(descriptor.Reactor is "12");
|
||||
Assert.IsTrue(descriptor.RDS is "123456");
|
||||
Assert.IsTrue(descriptor.PSN is "1234");
|
||||
Assert.IsTrue(descriptor.Layer is "2");
|
||||
Assert.IsTrue(descriptor.Zone is "1");
|
||||
Assert.IsTrue(string.IsNullOrEmpty(descriptor.Employee));
|
||||
descriptor = FileHandlers.RsM.ProcessData.GetDescriptor("12-123456-1234.02-1");
|
||||
Assert.IsTrue(descriptor.Reactor is "12");
|
||||
Assert.IsTrue(descriptor.RDS is "123456");
|
||||
Assert.IsTrue(descriptor.PSN is "1234");
|
||||
Assert.IsTrue(descriptor.Layer is "2");
|
||||
Assert.IsTrue(descriptor.Zone is "1");
|
||||
Assert.IsTrue(string.IsNullOrEmpty(descriptor.Employee));
|
||||
descriptor = FileHandlers.RsM.ProcessData.GetDescriptor("20");
|
||||
Assert.IsTrue(descriptor.Reactor is "20");
|
||||
Assert.IsTrue(string.IsNullOrEmpty(descriptor.RDS));
|
||||
Assert.IsTrue(string.IsNullOrEmpty(descriptor.PSN));
|
||||
Assert.IsTrue(string.IsNullOrEmpty(descriptor.Layer));
|
||||
Assert.IsTrue(string.IsNullOrEmpty(descriptor.Zone));
|
||||
Assert.IsTrue(string.IsNullOrEmpty(descriptor.Employee));
|
||||
descriptor = FileHandlers.RsM.ProcessData.GetDescriptor("20.2");
|
||||
Assert.IsTrue(descriptor.Reactor is "20");
|
||||
Assert.IsTrue(string.IsNullOrEmpty(descriptor.RDS));
|
||||
Assert.IsTrue(string.IsNullOrEmpty(descriptor.PSN));
|
||||
Assert.IsTrue(descriptor.Layer is "2");
|
||||
Assert.IsTrue(string.IsNullOrEmpty(descriptor.Zone));
|
||||
Assert.IsTrue(string.IsNullOrEmpty(descriptor.Employee));
|
||||
descriptor = FileHandlers.RsM.ProcessData.GetDescriptor("20.2.1");
|
||||
Assert.IsTrue(descriptor.Layer is "2");
|
||||
Assert.IsTrue(string.IsNullOrEmpty(descriptor.PSN));
|
||||
Assert.IsTrue(string.IsNullOrEmpty(descriptor.RDS));
|
||||
Assert.IsTrue(descriptor.Reactor is "20");
|
||||
Assert.IsTrue(descriptor.Zone is "1");
|
||||
Assert.IsTrue(string.IsNullOrEmpty(descriptor.Employee));
|
||||
descriptor = FileHandlers.RsM.ProcessData.GetDescriptor("20.1.1");
|
||||
Assert.IsTrue(descriptor.Layer is "1");
|
||||
Assert.IsTrue(string.IsNullOrEmpty(descriptor.PSN));
|
||||
Assert.IsTrue(string.IsNullOrEmpty(descriptor.RDS));
|
||||
Assert.IsTrue(descriptor.Reactor is "20");
|
||||
Assert.IsTrue(descriptor.Zone is "1");
|
||||
Assert.IsTrue(string.IsNullOrEmpty(descriptor.Employee));
|
||||
LoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
|
||||
}
|
||||
|
||||
|
@ -48,34 +48,83 @@ public class TXT : LoggingUnitTesting, IDisposable
|
||||
FileHandlers.txt.Descriptor descriptor;
|
||||
MethodBase methodBase = new StackFrame().GetMethod();
|
||||
LoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
|
||||
descriptor = FileHandlers.txt.ProcessData.GetDescriptor(string.Empty);
|
||||
Assert.IsTrue(string.IsNullOrEmpty(descriptor.Reactor));
|
||||
Assert.IsTrue(string.IsNullOrEmpty(descriptor.RDS));
|
||||
Assert.IsTrue(string.IsNullOrEmpty(descriptor.PSN));
|
||||
Assert.IsTrue(string.IsNullOrEmpty(descriptor.Layer));
|
||||
Assert.IsTrue(string.IsNullOrEmpty(descriptor.Zone));
|
||||
Assert.IsTrue(string.IsNullOrEmpty(descriptor.Employee));
|
||||
descriptor = FileHandlers.txt.ProcessData.GetDescriptor("12-123456-1234");
|
||||
Assert.IsTrue(descriptor.Reactor is "12");
|
||||
Assert.IsTrue(descriptor.RDS is "123456");
|
||||
Assert.IsTrue(descriptor.PSN is "1234");
|
||||
Assert.IsTrue(string.IsNullOrEmpty(descriptor.Layer));
|
||||
Assert.IsTrue(string.IsNullOrEmpty(descriptor.Zone));
|
||||
Assert.IsTrue(string.IsNullOrEmpty(descriptor.Employee));
|
||||
descriptor = FileHandlers.txt.ProcessData.GetDescriptor("123456");
|
||||
Assert.IsTrue(descriptor.Reactor is "00");
|
||||
Assert.IsTrue(string.IsNullOrEmpty(descriptor.Reactor));
|
||||
Assert.IsTrue(descriptor.RDS is "123456");
|
||||
Assert.IsTrue(descriptor.PSN is "0000");
|
||||
Assert.IsTrue(string.IsNullOrEmpty(descriptor.PSN));
|
||||
Assert.IsTrue(string.IsNullOrEmpty(descriptor.Layer));
|
||||
Assert.IsTrue(string.IsNullOrEmpty(descriptor.Zone));
|
||||
Assert.IsTrue(string.IsNullOrEmpty(descriptor.Employee));
|
||||
descriptor = FileHandlers.txt.ProcessData.GetDescriptor("1T123456");
|
||||
Assert.IsTrue(descriptor.Reactor is "00");
|
||||
Assert.IsTrue(string.IsNullOrEmpty(descriptor.Reactor));
|
||||
Assert.IsTrue(descriptor.RDS is "123456");
|
||||
Assert.IsTrue(descriptor.PSN is "0000");
|
||||
Assert.IsTrue(string.IsNullOrEmpty(descriptor.PSN));
|
||||
Assert.IsTrue(string.IsNullOrEmpty(descriptor.Layer));
|
||||
Assert.IsTrue(string.IsNullOrEmpty(descriptor.Zone));
|
||||
Assert.IsTrue(string.IsNullOrEmpty(descriptor.Employee));
|
||||
descriptor = FileHandlers.txt.ProcessData.GetDescriptor("MP");
|
||||
Assert.IsTrue(descriptor.Reactor is "00");
|
||||
Assert.IsTrue(descriptor.RDS is "000000");
|
||||
Assert.IsTrue(descriptor.PSN is "0000");
|
||||
Assert.IsTrue(string.IsNullOrEmpty(descriptor.Reactor));
|
||||
Assert.IsTrue(string.IsNullOrEmpty(descriptor.RDS));
|
||||
Assert.IsTrue(string.IsNullOrEmpty(descriptor.PSN));
|
||||
Assert.IsTrue(descriptor.Employee is "MP");
|
||||
Assert.IsTrue(string.IsNullOrEmpty(descriptor.Layer));
|
||||
Assert.IsTrue(string.IsNullOrEmpty(descriptor.Zone));
|
||||
descriptor = FileHandlers.txt.ProcessData.GetDescriptor("12-123456-1234.2-1");
|
||||
Assert.IsTrue(descriptor.Reactor is "12");
|
||||
Assert.IsTrue(descriptor.RDS is "123456");
|
||||
Assert.IsTrue(descriptor.PSN is "1234");
|
||||
Assert.IsTrue(descriptor.Layer is "2");
|
||||
Assert.IsTrue(descriptor.Zone is "1");
|
||||
descriptor = FileHandlers.txt.ProcessData.GetDescriptor("12-123456-1234.02-01");
|
||||
Assert.IsTrue(string.IsNullOrEmpty(descriptor.Employee));
|
||||
descriptor = FileHandlers.txt.ProcessData.GetDescriptor("12-123456-1234.02-1");
|
||||
Assert.IsTrue(descriptor.Reactor is "12");
|
||||
Assert.IsTrue(descriptor.RDS is "123456");
|
||||
Assert.IsTrue(descriptor.PSN is "1234");
|
||||
Assert.IsTrue(descriptor.Layer is "2");
|
||||
Assert.IsTrue(descriptor.Zone is "1");
|
||||
Assert.IsTrue(string.IsNullOrEmpty(descriptor.Employee));
|
||||
descriptor = FileHandlers.txt.ProcessData.GetDescriptor("20");
|
||||
Assert.IsTrue(descriptor.Reactor is "20");
|
||||
Assert.IsTrue(string.IsNullOrEmpty(descriptor.RDS));
|
||||
Assert.IsTrue(string.IsNullOrEmpty(descriptor.PSN));
|
||||
Assert.IsTrue(string.IsNullOrEmpty(descriptor.Layer));
|
||||
Assert.IsTrue(string.IsNullOrEmpty(descriptor.Zone));
|
||||
Assert.IsTrue(string.IsNullOrEmpty(descriptor.Employee));
|
||||
descriptor = FileHandlers.txt.ProcessData.GetDescriptor("20.2");
|
||||
Assert.IsTrue(descriptor.Reactor is "20");
|
||||
Assert.IsTrue(string.IsNullOrEmpty(descriptor.RDS));
|
||||
Assert.IsTrue(string.IsNullOrEmpty(descriptor.PSN));
|
||||
Assert.IsTrue(descriptor.Layer is "2");
|
||||
Assert.IsTrue(string.IsNullOrEmpty(descriptor.Zone));
|
||||
Assert.IsTrue(string.IsNullOrEmpty(descriptor.Employee));
|
||||
descriptor = FileHandlers.txt.ProcessData.GetDescriptor("20.2.1");
|
||||
Assert.IsTrue(descriptor.Layer is "2");
|
||||
Assert.IsTrue(string.IsNullOrEmpty(descriptor.PSN));
|
||||
Assert.IsTrue(string.IsNullOrEmpty(descriptor.RDS));
|
||||
Assert.IsTrue(descriptor.Reactor is "20");
|
||||
Assert.IsTrue(descriptor.Zone is "1");
|
||||
Assert.IsTrue(string.IsNullOrEmpty(descriptor.Employee));
|
||||
descriptor = FileHandlers.txt.ProcessData.GetDescriptor("20.1.1");
|
||||
Assert.IsTrue(descriptor.Layer is "1");
|
||||
Assert.IsTrue(string.IsNullOrEmpty(descriptor.PSN));
|
||||
Assert.IsTrue(string.IsNullOrEmpty(descriptor.RDS));
|
||||
Assert.IsTrue(descriptor.Reactor is "20");
|
||||
Assert.IsTrue(descriptor.Zone is "1");
|
||||
Assert.IsTrue(string.IsNullOrEmpty(descriptor.Employee));
|
||||
LoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
|
||||
}
|
||||
|
||||
|
@ -167,7 +167,7 @@
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Infineon.EAF.Runtime">
|
||||
<Version>2.43.0</Version>
|
||||
<Version>2.47.0</Version>
|
||||
</PackageReference>
|
||||
<PackageReference Include="System.Text.Json">
|
||||
<Version>6.0.3</Version>
|
||||
|
@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
|
||||
// You can specify all the values or you can default the Build and Revision Numbers
|
||||
// by using the '*' as shown below:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("2.43.4.0")]
|
||||
[assembly: AssemblyFileVersion("2.43.4.0")]
|
||||
[assembly: AssemblyVersion("2.47.0.0")]
|
||||
[assembly: AssemblyFileVersion("2.47.0.0")]
|
||||
|
Loading…
x
Reference in New Issue
Block a user