MET08RESIMAPCDE - v2.47.0- Zone

This commit is contained in:
Mike Phares 2022-10-12 08:29:52 -07:00
parent 6a9f1efeb6
commit ab0f5382ff
8 changed files with 321 additions and 118 deletions

View File

@ -3,6 +3,7 @@ namespace Adaptation.FileHandlers.RsM;
public class Descriptor public class Descriptor
{ {
public string Employee { get; private set; }
public string Layer { get; private set; } public string Layer { get; private set; }
public string PSN { get; private set; } public string PSN { get; private set; }
public string RDS { get; private set; } public string RDS { get; private set; }
@ -10,8 +11,9 @@ public class Descriptor
public string Run { get; private set; } public string Run { get; private set; }
public string Zone { 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; Layer = layer;
PSN = psn; PSN = psn;
RDS = rds; RDS = rds;

View File

@ -86,6 +86,65 @@ public class ProcessData : IProcessData
return results; 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) public static Descriptor GetDescriptor(string text)
{ {
Descriptor result; Descriptor result;
@ -96,66 +155,51 @@ public class ProcessData : IProcessData
string layer; string layer;
string title; string title;
string reactor; string reactor;
string[] segments; string employee;
const string defaultPSN = "0000"; string defaultPSN = string.Empty;
const string defaultRDS = "000000"; string defaultRDS = string.Empty;
const string defaultReactor = "00"; string defaultZone = string.Empty;
if (text.Length is 2 or 3) 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; run = text;
psn = defaultPSN; psn = defaultPSN;
rds = defaultRDS; rds = defaultRDS;
zone = string.Empty; layer = segments[1];
layer = string.Empty; reactor = segments[0];
reactor = defaultReactor; employee = defaultEmployee;
if (segments.Length <= 2)
zone = defaultZone;
else
zone = segments[2];
} }
else else
{ {
// Remove illegal characters \/:*?"<>| found in the title. // Remove illegal characters \/:*?"<>| found in the title.
title = Regex.Replace(text, @"[\\,\/,\:,\*,\?,\"",\<,\>,\|]", "_").Split('\r')[0].Split('\n')[0]; 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); title = title.Substring(2);
run = title; run = title;
segments = title.Split('-'); string[] segments = title.Split('-');
if (segments.Length == 0) (reactor, rds) = GetReactorAndRDS(defaultReactor, defaultRDS, text, title, segments);
reactor = defaultReactor; (layer, psn) = GetLayerAndPSN(defaultLayer, defaultPSN, segments);
else zone = GetZone(segments);
reactor = segments[0]; employee = defaultEmployee;
if (segments.Length <= 1)
rds = defaultRDS;
else
rds = segments[1];
if (reactor.Length > 3)
{
rds = reactor;
reactor = defaultReactor;
} }
if (segments.Length <= 2) result = new(employee, layer, psn, rds, reactor, run, zone);
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 (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);
return result; return result;
} }
@ -169,6 +213,7 @@ public class ProcessData : IProcessData
Zone = descriptor.Zone; Zone = descriptor.Zone;
Layer = descriptor.Layer; Layer = descriptor.Layer;
Reactor = descriptor.Reactor; Reactor = descriptor.Reactor;
Employee = descriptor.Employee;
UniqueId = string.Concat(logistics.JobID, "_", descriptor.Run, "_", logistics.DateTimeFromSequence.ToString(timeFormat)); UniqueId = string.Concat(logistics.JobID, "_", descriptor.Run, "_", logistics.DateTimeFromSequence.ToString(timeFormat));
} }

View File

@ -3,6 +3,7 @@ namespace Adaptation.FileHandlers.txt;
public class Descriptor public class Descriptor
{ {
public string Employee { get; private set; }
public string Layer { get; private set; } public string Layer { get; private set; }
public string PSN { get; private set; } public string PSN { get; private set; }
public string RDS { get; private set; } public string RDS { get; private set; }
@ -11,8 +12,9 @@ public class Descriptor
public string Title { get; private set; } public string Title { get; private set; }
public string Zone { 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; Layer = layer;
PSN = psn; PSN = psn;
RDS = rds; RDS = rds;

View File

@ -242,43 +242,15 @@ public class ProcessData : IProcessData
return result; return result;
} }
public static Descriptor GetDescriptor(string text) private static (string, string) GetReactorAndRDS(string defaultReactor, string defaultRDS, string text, string formattedText, string[] segments)
{ {
Descriptor result;
string psn;
string rds; string rds;
string run;
string zone;
string title;
string layer;
string reactor; string reactor;
string[] segments; if (string.IsNullOrEmpty(text) || segments.Length == 0 || string.IsNullOrEmpty(formattedText))
const string defaultPSN = "0000";
const string defaultRDS = "000000";
const string defaultReactor = "00";
if (text.Length is 2 or 3)
{
run = text;
title = text;
psn = defaultPSN;
rds = defaultRDS;
zone = string.Empty;
layer = string.Empty;
reactor = defaultReactor;
}
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"))
title = title.Substring(2);
run = title;
segments = title.Split('-');
if (segments.Length == 0)
reactor = defaultReactor; reactor = defaultReactor;
else else
reactor = segments[0]; reactor = segments[0];
if (segments.Length <= 1) if (segments.Length <= 1 || !int.TryParse(segments[1], out int rdsValue) || rdsValue < 99)
rds = defaultRDS; rds = defaultRDS;
else else
rds = segments[1]; rds = segments[1];
@ -287,32 +259,105 @@ public class ProcessData : IProcessData
rds = reactor; rds = reactor;
reactor = defaultReactor; 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) if (segments.Length <= 2)
{
psn = defaultPSN; psn = defaultPSN;
else layer = defaultLayer;
psn = segments[2]; }
if (segments.Length < 3)
layer = string.Empty;
else else
{ {
string[] segmentsB = segments[2].Split('.'); string[] segmentsB = segments[2].Split('.');
if (segmentsB.Length > 1)
psn = segmentsB[0]; psn = segmentsB[0];
if (segmentsB.Length <= 1) if (segmentsB.Length <= 1)
layer = string.Empty; layer = defaultLayer;
else else
{
layer = segmentsB[1]; layer = segmentsB[1];
}
if (segments.Length <= 3)
zone = string.Empty;
else
zone = segments[3];
}
if (layer.Length > 1 && layer[0] == '0') if (layer.Length > 1 && layer[0] == '0')
layer = layer.Substring(1); layer = layer.Substring(1);
if (zone.Length > 1 && zone[0] == '0') }
zone = zone.Substring(1); }
result = new(layer, psn, rds, reactor, run, title, zone); 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;
string psn;
string rds;
string run;
string zone;
string layer;
string title;
string reactor;
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;
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.Length > 2 && title[0] == '1' && (title[1] == 'T' || title[1] == 't'))
title = title.Substring(2);
run = title;
string[] segments = title.Split('-');
(reactor, rds) = GetReactorAndRDS(defaultReactor, defaultRDS, text, title, segments);
(layer, psn) = GetLayerAndPSN(defaultLayer, defaultPSN, segments);
zone = GetZone(segments);
employee = defaultEmployee;
}
result = new(employee, layer, psn, rds, reactor, run, title, zone);
return result; return result;
} }
@ -359,6 +404,7 @@ public class ProcessData : IProcessData
layer = descriptor.Layer; layer = descriptor.Layer;
title = descriptor.Title; title = descriptor.Title;
reactor = descriptor.Reactor; reactor = descriptor.Reactor;
employee = descriptor.Employee;
resistivitySpec = GetToEOL(); resistivitySpec = GetToEOL();
ScanPast("EQUIP#:"); ScanPast("EQUIP#:");
equipId = GetBefore("Engineer:"); equipId = GetBefore("Engineer:");
@ -369,6 +415,9 @@ public class ProcessData : IProcessData
lot = GetBefore("D.L.RATIO:"); lot = GetBefore("D.L.RATIO:");
dlRatio = GetToEOL(); dlRatio = GetToEOL();
ScanPast("OPERATOR:"); ScanPast("OPERATOR:");
if (!string.IsNullOrEmpty(employee))
_ = GetBefore("TEMP:");
else
employee = GetBefore("TEMP:"); employee = GetBefore("TEMP:");
temp = GetToken(); temp = GetToken();
string dateTimeText = GetToEOL(); string dateTimeText = GetToEOL();

View File

@ -48,34 +48,90 @@ public class RsM : LoggingUnitTesting, IDisposable
FileHandlers.RsM.Descriptor descriptor; FileHandlers.RsM.Descriptor descriptor;
MethodBase methodBase = new StackFrame().GetMethod(); MethodBase methodBase = new StackFrame().GetMethod();
LoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration")); 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"); descriptor = FileHandlers.RsM.ProcessData.GetDescriptor("12-123456-1234");
Assert.IsTrue(descriptor.Reactor is "12"); Assert.IsTrue(descriptor.Reactor is "12");
Assert.IsTrue(descriptor.RDS is "123456"); Assert.IsTrue(descriptor.RDS is "123456");
Assert.IsTrue(descriptor.PSN is "1234"); 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"); 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.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"); 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.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"); descriptor = FileHandlers.RsM.ProcessData.GetDescriptor("MP");
Assert.IsTrue(descriptor.Reactor is "00"); Assert.IsTrue(string.IsNullOrEmpty(descriptor.Reactor));
Assert.IsTrue(descriptor.RDS is "000000"); Assert.IsTrue(string.IsNullOrEmpty(descriptor.RDS));
Assert.IsTrue(descriptor.PSN is "0000"); 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"); descriptor = FileHandlers.RsM.ProcessData.GetDescriptor("12-123456-1234.2-1");
Assert.IsTrue(descriptor.Reactor is "12"); Assert.IsTrue(descriptor.Reactor is "12");
Assert.IsTrue(descriptor.RDS is "123456"); Assert.IsTrue(descriptor.RDS is "123456");
Assert.IsTrue(descriptor.PSN is "1234"); Assert.IsTrue(descriptor.PSN is "1234");
Assert.IsTrue(descriptor.Layer is "2"); Assert.IsTrue(descriptor.Layer is "2");
Assert.IsTrue(descriptor.Zone is "1"); Assert.IsTrue(descriptor.Zone is "1");
Assert.IsTrue(string.IsNullOrEmpty(descriptor.Employee));
descriptor = FileHandlers.RsM.ProcessData.GetDescriptor("12-123456-1234.02-01"); descriptor = FileHandlers.RsM.ProcessData.GetDescriptor("12-123456-1234.02-01");
Assert.IsTrue(descriptor.Reactor is "12"); Assert.IsTrue(descriptor.Reactor is "12");
Assert.IsTrue(descriptor.RDS is "123456"); Assert.IsTrue(descriptor.RDS is "123456");
Assert.IsTrue(descriptor.PSN is "1234"); Assert.IsTrue(descriptor.PSN is "1234");
Assert.IsTrue(descriptor.Layer is "2"); Assert.IsTrue(descriptor.Layer is "2");
Assert.IsTrue(descriptor.Zone is "1"); 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")); LoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
} }

View File

@ -48,34 +48,83 @@ public class TXT : LoggingUnitTesting, IDisposable
FileHandlers.txt.Descriptor descriptor; FileHandlers.txt.Descriptor descriptor;
MethodBase methodBase = new StackFrame().GetMethod(); MethodBase methodBase = new StackFrame().GetMethod();
LoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration")); 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"); descriptor = FileHandlers.txt.ProcessData.GetDescriptor("12-123456-1234");
Assert.IsTrue(descriptor.Reactor is "12"); Assert.IsTrue(descriptor.Reactor is "12");
Assert.IsTrue(descriptor.RDS is "123456"); Assert.IsTrue(descriptor.RDS is "123456");
Assert.IsTrue(descriptor.PSN is "1234"); 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"); 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.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"); 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.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"); descriptor = FileHandlers.txt.ProcessData.GetDescriptor("MP");
Assert.IsTrue(descriptor.Reactor is "00"); Assert.IsTrue(string.IsNullOrEmpty(descriptor.Reactor));
Assert.IsTrue(descriptor.RDS is "000000"); Assert.IsTrue(string.IsNullOrEmpty(descriptor.RDS));
Assert.IsTrue(descriptor.PSN is "0000"); 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"); descriptor = FileHandlers.txt.ProcessData.GetDescriptor("12-123456-1234.2-1");
Assert.IsTrue(descriptor.Reactor is "12"); Assert.IsTrue(descriptor.Reactor is "12");
Assert.IsTrue(descriptor.RDS is "123456"); Assert.IsTrue(descriptor.RDS is "123456");
Assert.IsTrue(descriptor.PSN is "1234"); Assert.IsTrue(descriptor.PSN is "1234");
Assert.IsTrue(descriptor.Layer is "2"); Assert.IsTrue(descriptor.Layer is "2");
Assert.IsTrue(descriptor.Zone is "1"); 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.Reactor is "12");
Assert.IsTrue(descriptor.RDS is "123456"); Assert.IsTrue(descriptor.RDS is "123456");
Assert.IsTrue(descriptor.PSN is "1234"); Assert.IsTrue(descriptor.PSN is "1234");
Assert.IsTrue(descriptor.Layer is "2"); Assert.IsTrue(descriptor.Layer is "2");
Assert.IsTrue(descriptor.Zone is "1"); 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")); LoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
} }

View File

@ -167,7 +167,7 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Infineon.EAF.Runtime"> <PackageReference Include="Infineon.EAF.Runtime">
<Version>2.43.0</Version> <Version>2.47.0</Version>
</PackageReference> </PackageReference>
<PackageReference Include="System.Text.Json"> <PackageReference Include="System.Text.Json">
<Version>6.0.3</Version> <Version>6.0.3</Version>

View File

@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
// You can specify all the values or you can default the Build and Revision Numbers // You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below: // by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")] // [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("2.43.4.0")] [assembly: AssemblyVersion("2.47.0.0")]
[assembly: AssemblyFileVersion("2.43.4.0")] [assembly: AssemblyFileVersion("2.47.0.0")]