Description Name and Test
This commit is contained in:
parent
13e5e7cccd
commit
9d76773ae5
@ -166,8 +166,8 @@ public class Description : IDescription, Shared.Properties.IDescription
|
|||||||
//
|
//
|
||||||
Date = detail.Date,
|
Date = detail.Date,
|
||||||
Lot = processData.MetaData.Date,
|
Lot = processData.MetaData.Date,
|
||||||
Part = $"{processData.MetaData.DeviceType}-{processData.MetaData.DeviceNumber}",
|
Part = $"{processData.MetaData.DeviceId}-{processData.MetaData.DeviceType}-{processData.MetaData.DeviceNumber}",
|
||||||
Process = $"{processData.MetaData.DeviceId}",
|
Process = $"{processData.MetaData.DescriptionName}",
|
||||||
Recipe = processData.MetaData.Frequency,
|
Recipe = processData.MetaData.Frequency,
|
||||||
//
|
//
|
||||||
Name = detail.Test,
|
Name = detail.Test,
|
||||||
|
@ -6,7 +6,8 @@ public class MetaData
|
|||||||
public int DeviceId { get; set; }
|
public int DeviceId { get; set; }
|
||||||
public string DeviceType { get; set; }
|
public string DeviceType { get; set; }
|
||||||
public int DeviceNumber { get; set; }
|
public int DeviceNumber { get; set; }
|
||||||
public string Description { get; set; }
|
public string DescriptionName { get; set; }
|
||||||
|
public string DescriptionTest { get; set; }
|
||||||
public string Frequency { get; set; }
|
public string Frequency { get; set; }
|
||||||
public string Date { get; set; }
|
public string Date { get; set; }
|
||||||
public string System { get; set; }
|
public string System { get; set; }
|
||||||
|
@ -73,7 +73,8 @@ public class ProcessData : IProcessData
|
|||||||
DeviceId = deviceId,
|
DeviceId = deviceId,
|
||||||
DeviceType = match.Groups["DeviceType"].Value,
|
DeviceType = match.Groups["DeviceType"].Value,
|
||||||
DeviceNumber = deviceNumber,
|
DeviceNumber = deviceNumber,
|
||||||
Description = match.Groups["Description"].Value,
|
DescriptionName = match.Groups["DescriptionName"].Value,
|
||||||
|
DescriptionTest = match.Groups["DescriptionTest"].Value,
|
||||||
Frequency = match.Groups["Frequency"].Value,
|
Frequency = match.Groups["Frequency"].Value,
|
||||||
Date = match.Groups["Date"].Value
|
Date = match.Groups["Date"].Value
|
||||||
};
|
};
|
||||||
@ -92,7 +93,7 @@ public class ProcessData : IProcessData
|
|||||||
if (columns.Length == commaSeparatedValuesConfiguration.Columns)
|
if (columns.Length == commaSeparatedValuesConfiguration.Columns)
|
||||||
{
|
{
|
||||||
string test = columns[commaSeparatedValuesConfiguration.TestIndex].Trim().Trim('"');
|
string test = columns[commaSeparatedValuesConfiguration.TestIndex].Trim().Trim('"');
|
||||||
if (test == metaData.Description)
|
if (test.IndexOf(metaData.DescriptionTest, 0, StringComparison.CurrentCultureIgnoreCase) > -1 && test.IndexOf(metaData.DescriptionName, 0, StringComparison.CurrentCultureIgnoreCase) > -1)
|
||||||
{
|
{
|
||||||
for (int i = 1; i < lines.Length; i++)
|
for (int i = 1; i < lines.Length; i++)
|
||||||
{
|
{
|
||||||
@ -102,7 +103,7 @@ public class ProcessData : IProcessData
|
|||||||
columns = line.Split(',').Select(l => l.Trim().Trim('"')).ToArray();
|
columns = line.Split(',').Select(l => l.Trim().Trim('"')).ToArray();
|
||||||
if (columns.Length != commaSeparatedValuesConfiguration.Columns)
|
if (columns.Length != commaSeparatedValuesConfiguration.Columns)
|
||||||
continue;
|
continue;
|
||||||
_Details.Add(new Record() { Test = test, Date = columns[0], Value = columns[1], Event = columns[2] });
|
_Details.Add(new Record() { Test = metaData.DescriptionTest, Date = columns[0], Value = columns[1], Event = columns[2] });
|
||||||
}
|
}
|
||||||
MetaData = metaData;
|
MetaData = metaData;
|
||||||
}
|
}
|
||||||
|
@ -61,6 +61,27 @@ public class TRENDLOG
|
|||||||
NonThrowTryCatch();
|
NonThrowTryCatch();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if DEBUG
|
||||||
|
[Ignore]
|
||||||
|
#endif
|
||||||
|
[TestMethod]
|
||||||
|
public void Staging__v2_52_0__TRENDLOG__csv638465291633220311__Normal()
|
||||||
|
{
|
||||||
|
bool validatePDSF = false;
|
||||||
|
string check = "*.csv.trg";
|
||||||
|
_TRENDLOG.Staging__v2_52_0__TRENDLOG__csv();
|
||||||
|
MethodBase methodBase = new StackFrame().GetMethod();
|
||||||
|
// string check = "Dev *, A*, present-value, *D*-*-*-*.csv.trg";
|
||||||
|
Assert.IsFalse(string.IsNullOrEmpty(_TRENDLOG.AdaptationTesting.TestContext.FullyQualifiedTestClassName));
|
||||||
|
string[] variables = _TRENDLOG.AdaptationTesting.GetVariables(methodBase, check, validatePDSF);
|
||||||
|
IFileRead fileRead = _TRENDLOG.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false);
|
||||||
|
Tuple<string, Test[], JsonElement[], List<FileInfo>> extractResult = fileRead.ReExtract();
|
||||||
|
Assert.IsFalse(string.IsNullOrEmpty(extractResult?.Item1));
|
||||||
|
Assert.IsNotNull(extractResult.Item3);
|
||||||
|
Assert.IsNotNull(extractResult.Item4);
|
||||||
|
NonThrowTryCatch();
|
||||||
|
}
|
||||||
|
|
||||||
#if DEBUG
|
#if DEBUG
|
||||||
[Ignore]
|
[Ignore]
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user