AdaptationTesting
This commit is contained in:
parent
a8a93cb115
commit
99c6474146
6
Adaptation/.vscode/settings.json
vendored
6
Adaptation/.vscode/settings.json
vendored
@ -1,9 +1,11 @@
|
|||||||
{
|
{
|
||||||
"cSpell.words": [
|
"cSpell.words": [
|
||||||
|
"CICN",
|
||||||
"DDUPSFS",
|
"DDUPSFS",
|
||||||
"EQPT",
|
"EQPT",
|
||||||
"gpcl",
|
"gpcl",
|
||||||
"IKVM",
|
"IKVM",
|
||||||
|
"ipdsf",
|
||||||
"ISMTP",
|
"ISMTP",
|
||||||
"JOBID",
|
"JOBID",
|
||||||
"Linc",
|
"Linc",
|
||||||
@ -13,10 +15,12 @@
|
|||||||
"PDFC",
|
"PDFC",
|
||||||
"pdmodel",
|
"pdmodel",
|
||||||
"pdsf",
|
"pdsf",
|
||||||
|
"pdsfc",
|
||||||
"PPTST",
|
"PPTST",
|
||||||
"RESIMAPTENCOR",
|
"RESIMAPTENCOR",
|
||||||
"TENCOR",
|
"TENCOR",
|
||||||
"TIBCO"
|
"TIBCO",
|
||||||
|
"Villach"
|
||||||
],
|
],
|
||||||
"workbench.colorCustomizations": {
|
"workbench.colorCustomizations": {
|
||||||
"activityBar.activeBackground": "#7933a3",
|
"activityBar.activeBackground": "#7933a3",
|
||||||
|
@ -112,7 +112,7 @@ public class FileRead : Properties.IFileRead
|
|||||||
// throw new Exception(cellInstanceConnectionName);
|
// throw new Exception(cellInstanceConnectionName);
|
||||||
}
|
}
|
||||||
ModelObjectParameterDefinition[] paths = GetProperties(cellInstanceConnectionName, modelObjectParameters, "Path.");
|
ModelObjectParameterDefinition[] paths = GetProperties(cellInstanceConnectionName, modelObjectParameters, "Path.");
|
||||||
if (paths.Length < 4)
|
if (paths.Length < 3)
|
||||||
throw new Exception(cellInstanceConnectionName);
|
throw new Exception(cellInstanceConnectionName);
|
||||||
if (isDuplicator)
|
if (isDuplicator)
|
||||||
_MesEntity = string.Empty;
|
_MesEntity = string.Empty;
|
||||||
|
@ -3,9 +3,12 @@ using Microsoft.Extensions.Logging;
|
|||||||
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||||
using Shared;
|
using Shared;
|
||||||
using System;
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
|
using System.Text.Json;
|
||||||
|
using System.Threading;
|
||||||
|
|
||||||
namespace _Tests.CreateSelfDescription.Staging.v2_39_0;
|
namespace _Tests.CreateSelfDescription.Staging.v2_39_0;
|
||||||
|
|
||||||
@ -71,7 +74,7 @@ public class MET08DDUPSFS6420 : EAFLoggingUnitTesting
|
|||||||
[TestMethod]
|
[TestMethod]
|
||||||
public void Staging__v2_39_0__MET08DDUPSFS6420__MET08DDUPSFS6420__()
|
public void Staging__v2_39_0__MET08DDUPSFS6420__MET08DDUPSFS6420__()
|
||||||
{
|
{
|
||||||
string check = "~IsXToOpenInsight";
|
string check = "~IsXToIQSGaN";
|
||||||
MethodBase methodBase = new StackFrame().GetMethod();
|
MethodBase methodBase = new StackFrame().GetMethod();
|
||||||
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
|
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
|
||||||
_ = Helpers.Metrology.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting);
|
_ = Helpers.Metrology.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting);
|
||||||
@ -81,7 +84,7 @@ public class MET08DDUPSFS6420 : EAFLoggingUnitTesting
|
|||||||
[TestMethod]
|
[TestMethod]
|
||||||
public void Staging__v2_39_0__MET08DDUPSFS6420__MET08DDUPSFS6420___()
|
public void Staging__v2_39_0__MET08DDUPSFS6420__MET08DDUPSFS6420___()
|
||||||
{
|
{
|
||||||
string check = "~IsXToOpenInsightMetrologyViewerAttachments";
|
string check = "~IsXToOpenInsight";
|
||||||
MethodBase methodBase = new StackFrame().GetMethod();
|
MethodBase methodBase = new StackFrame().GetMethod();
|
||||||
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
|
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
|
||||||
_ = Helpers.Metrology.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting);
|
_ = Helpers.Metrology.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting);
|
||||||
@ -91,7 +94,7 @@ public class MET08DDUPSFS6420 : EAFLoggingUnitTesting
|
|||||||
[TestMethod]
|
[TestMethod]
|
||||||
public void Staging__v2_39_0__MET08DDUPSFS6420__MET08DDUPSFS6420____()
|
public void Staging__v2_39_0__MET08DDUPSFS6420__MET08DDUPSFS6420____()
|
||||||
{
|
{
|
||||||
string check = "~IsXToAPC";
|
string check = "~IsXToOpenInsightMetrologyViewerAttachments";
|
||||||
MethodBase methodBase = new StackFrame().GetMethod();
|
MethodBase methodBase = new StackFrame().GetMethod();
|
||||||
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
|
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
|
||||||
_ = Helpers.Metrology.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting);
|
_ = Helpers.Metrology.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting);
|
||||||
@ -101,7 +104,7 @@ public class MET08DDUPSFS6420 : EAFLoggingUnitTesting
|
|||||||
[TestMethod]
|
[TestMethod]
|
||||||
public void Staging__v2_39_0__MET08DDUPSFS6420__MET08DDUPSFS6420_____()
|
public void Staging__v2_39_0__MET08DDUPSFS6420__MET08DDUPSFS6420_____()
|
||||||
{
|
{
|
||||||
string check = "~IsXToSPaCe";
|
string check = "~IsXToAPC";
|
||||||
MethodBase methodBase = new StackFrame().GetMethod();
|
MethodBase methodBase = new StackFrame().GetMethod();
|
||||||
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
|
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
|
||||||
_ = Helpers.Metrology.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting);
|
_ = Helpers.Metrology.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting);
|
||||||
@ -111,7 +114,7 @@ public class MET08DDUPSFS6420 : EAFLoggingUnitTesting
|
|||||||
[TestMethod]
|
[TestMethod]
|
||||||
public void Staging__v2_39_0__MET08DDUPSFS6420__MET08DDUPSFS6420______()
|
public void Staging__v2_39_0__MET08DDUPSFS6420__MET08DDUPSFS6420______()
|
||||||
{
|
{
|
||||||
string check = "~IsXToArchive";
|
string check = "~IsXToSPaCe";
|
||||||
MethodBase methodBase = new StackFrame().GetMethod();
|
MethodBase methodBase = new StackFrame().GetMethod();
|
||||||
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
|
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
|
||||||
_ = Helpers.Metrology.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting);
|
_ = Helpers.Metrology.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting);
|
||||||
@ -121,7 +124,7 @@ public class MET08DDUPSFS6420 : EAFLoggingUnitTesting
|
|||||||
[TestMethod]
|
[TestMethod]
|
||||||
public void Staging__v2_39_0__MET08DDUPSFS6420__MET08DDUPSFS6420_______()
|
public void Staging__v2_39_0__MET08DDUPSFS6420__MET08DDUPSFS6420_______()
|
||||||
{
|
{
|
||||||
string check = "~IsArchive";
|
string check = "~IsXToArchive";
|
||||||
MethodBase methodBase = new StackFrame().GetMethod();
|
MethodBase methodBase = new StackFrame().GetMethod();
|
||||||
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
|
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
|
||||||
_ = Helpers.Metrology.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting);
|
_ = Helpers.Metrology.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting);
|
||||||
@ -130,6 +133,16 @@ public class MET08DDUPSFS6420 : EAFLoggingUnitTesting
|
|||||||
|
|
||||||
[TestMethod]
|
[TestMethod]
|
||||||
public void Staging__v2_39_0__MET08DDUPSFS6420__MET08DDUPSFS6420________()
|
public void Staging__v2_39_0__MET08DDUPSFS6420__MET08DDUPSFS6420________()
|
||||||
|
{
|
||||||
|
string check = "~IsArchive";
|
||||||
|
MethodBase methodBase = new StackFrame().GetMethod();
|
||||||
|
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
|
||||||
|
_ = Helpers.Metrology.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting);
|
||||||
|
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
|
||||||
|
}
|
||||||
|
|
||||||
|
[TestMethod]
|
||||||
|
public void Staging__v2_39_0__MET08DDUPSFS6420__MET08DDUPSFS6420_________()
|
||||||
{
|
{
|
||||||
string check = "~IsDummy";
|
string check = "~IsDummy";
|
||||||
MethodBase methodBase = new StackFrame().GetMethod();
|
MethodBase methodBase = new StackFrame().GetMethod();
|
||||||
@ -138,4 +151,14 @@ public class MET08DDUPSFS6420 : EAFLoggingUnitTesting
|
|||||||
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
|
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[TestMethod]
|
||||||
|
public void Staging__v2_39_0__MET08DDUPSFS6420__MET08DDUPSFS6420__________()
|
||||||
|
{
|
||||||
|
string check = "~IsManualOIEntry";
|
||||||
|
MethodBase methodBase = new StackFrame().GetMethod();
|
||||||
|
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
|
||||||
|
_ = Helpers.Metrology.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting);
|
||||||
|
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
@ -65,4 +65,10 @@ public class MET08DDUPSFS6420
|
|||||||
[TestMethod]
|
[TestMethod]
|
||||||
public void Staging__v2_39_0__MET08DDUPSFS6420__MET08DDUPSFS6420________() => _MET08DDUPSFS6420.Staging__v2_39_0__MET08DDUPSFS6420__MET08DDUPSFS6420________();
|
public void Staging__v2_39_0__MET08DDUPSFS6420__MET08DDUPSFS6420________() => _MET08DDUPSFS6420.Staging__v2_39_0__MET08DDUPSFS6420__MET08DDUPSFS6420________();
|
||||||
|
|
||||||
|
[TestMethod]
|
||||||
|
public void Staging__v2_39_0__MET08DDUPSFS6420__MET08DDUPSFS6420_________() => _MET08DDUPSFS6420.Staging__v2_39_0__MET08DDUPSFS6420__MET08DDUPSFS6420_________();
|
||||||
|
|
||||||
|
[TestMethod]
|
||||||
|
public void Staging__v2_39_0__MET08DDUPSFS6420__MET08DDUPSFS6420__________() => _MET08DDUPSFS6420.Staging__v2_39_0__MET08DDUPSFS6420__MET08DDUPSFS6420__________();
|
||||||
|
|
||||||
}
|
}
|
@ -432,12 +432,6 @@ public class AdaptationTesting : ISMTP
|
|||||||
loopName = "CreateSelfDescription";
|
loopName = "CreateSelfDescription";
|
||||||
else
|
else
|
||||||
throw new Exception();
|
throw new Exception();
|
||||||
if (i == 2)
|
|
||||||
_ = stringBuilder.
|
|
||||||
AppendLine("using Microsoft.VisualStudio.TestTools.UnitTesting;").
|
|
||||||
AppendLine("using Shared;").
|
|
||||||
AppendLine("using System.Diagnostics;");
|
|
||||||
else if (i == 1)
|
|
||||||
_ = stringBuilder.
|
_ = stringBuilder.
|
||||||
AppendLine("using Adaptation.Shared.Methods;").
|
AppendLine("using Adaptation.Shared.Methods;").
|
||||||
AppendLine("using Microsoft.Extensions.Logging;").
|
AppendLine("using Microsoft.Extensions.Logging;").
|
||||||
@ -450,11 +444,8 @@ public class AdaptationTesting : ISMTP
|
|||||||
AppendLine("using System.Reflection;").
|
AppendLine("using System.Reflection;").
|
||||||
AppendLine("using System.Text.Json;").
|
AppendLine("using System.Text.Json;").
|
||||||
AppendLine("using System.Threading;");
|
AppendLine("using System.Threading;");
|
||||||
else
|
|
||||||
throw new Exception();
|
|
||||||
_ = stringBuilder.AppendLine().
|
_ = stringBuilder.AppendLine().
|
||||||
Append("namespace _Tests.").Append(loopName).Append('.').Append(_Environment).Append('.').AppendLine(cellInstanceVersionNameAsCode).
|
Append("namespace _Tests.").Append(loopName).Append('.').Append(_Environment).Append('.').Append(cellInstanceVersionNameAsCode).AppendLine(";").
|
||||||
AppendLine("{").
|
|
||||||
AppendLine().
|
AppendLine().
|
||||||
AppendLine("[TestClass]");
|
AppendLine("[TestClass]");
|
||||||
if (i == 2)
|
if (i == 2)
|
||||||
@ -462,14 +453,19 @@ public class AdaptationTesting : ISMTP
|
|||||||
Append("public class ").AppendLine(cellInstanceNameWithoutHyphen).
|
Append("public class ").AppendLine(cellInstanceNameWithoutHyphen).
|
||||||
AppendLine("{").
|
AppendLine("{").
|
||||||
AppendLine().
|
AppendLine().
|
||||||
|
AppendLine("#pragma warning disable CA2254").
|
||||||
|
AppendLine("#pragma warning disable IDE0060").
|
||||||
|
AppendLine().
|
||||||
Append("private static CreateSelfDescription.").Append(_Environment).Append('.').Append(cellInstanceVersionNameAsCode).Append('.').Append(cellInstanceNameWithoutHyphen).Append(" _").Append(cellInstanceNameWithoutHyphen).AppendLine(";");
|
Append("private static CreateSelfDescription.").Append(_Environment).Append('.').Append(cellInstanceVersionNameAsCode).Append('.').Append(cellInstanceNameWithoutHyphen).Append(" _").Append(cellInstanceNameWithoutHyphen).AppendLine(";");
|
||||||
else if (i == 1)
|
else if (i == 1)
|
||||||
_ = stringBuilder.
|
_ = stringBuilder.
|
||||||
Append("public class ").Append(cellInstanceNameWithoutHyphen).AppendLine(" : EAFLoggingUnitTesting").
|
Append("public class ").Append(cellInstanceNameWithoutHyphen).AppendLine(" : EAFLoggingUnitTesting").
|
||||||
AppendLine("{").
|
AppendLine("{").
|
||||||
AppendLine().
|
AppendLine().
|
||||||
Append("private static ").Append(cellInstanceNameWithoutHyphen).AppendLine(" _EAFLoggingUnitTesting;").
|
AppendLine("#pragma warning disable CA2254").
|
||||||
Append("internal static ").Append(cellInstanceNameWithoutHyphen).AppendLine(" EAFLoggingUnitTesting => _EAFLoggingUnitTesting;");
|
AppendLine("#pragma warning disable IDE0060").
|
||||||
|
AppendLine().
|
||||||
|
Append("internal static ").Append(cellInstanceNameWithoutHyphen).AppendLine(" EAFLoggingUnitTesting { get; private set; }");
|
||||||
else
|
else
|
||||||
throw new Exception();
|
throw new Exception();
|
||||||
if (i == 2)
|
if (i == 2)
|
||||||
@ -479,7 +475,7 @@ public class AdaptationTesting : ISMTP
|
|||||||
AppendLine().
|
AppendLine().
|
||||||
Append("public ").Append(cellInstanceNameWithoutHyphen).AppendLine("() : base(testContext: null, declaringType: null, skipEquipmentDictionary: false)").
|
Append("public ").Append(cellInstanceNameWithoutHyphen).AppendLine("() : base(testContext: null, declaringType: null, skipEquipmentDictionary: false)").
|
||||||
AppendLine("{").
|
AppendLine("{").
|
||||||
AppendLine("if (_EAFLoggingUnitTesting is null)").
|
AppendLine("if (EAFLoggingUnitTesting is null)").
|
||||||
AppendLine("throw new Exception();").
|
AppendLine("throw new Exception();").
|
||||||
AppendLine("}").
|
AppendLine("}").
|
||||||
AppendLine().
|
AppendLine().
|
||||||
@ -500,10 +496,10 @@ public class AdaptationTesting : ISMTP
|
|||||||
AppendLine("}");
|
AppendLine("}");
|
||||||
else if (i == 1)
|
else if (i == 1)
|
||||||
_ = stringBuilder.
|
_ = stringBuilder.
|
||||||
AppendLine("if (_EAFLoggingUnitTesting is null)").
|
AppendLine("if (EAFLoggingUnitTesting is null)").
|
||||||
Append("_EAFLoggingUnitTesting = new ").Append(cellInstanceNameWithoutHyphen).AppendLine("(testContext);").
|
Append("EAFLoggingUnitTesting = new ").Append(cellInstanceNameWithoutHyphen).AppendLine("(testContext);").
|
||||||
AppendLine("_EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(testContext.TestName, \" - ClassInitialize\"));").
|
AppendLine("EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(testContext.TestName, \" - ClassInitialize\"));").
|
||||||
AppendLine("string[] fileNameAndText = _EAFLoggingUnitTesting.AdaptationTesting.GetCSharpText(testContext.TestName);").
|
AppendLine("string[] fileNameAndText = EAFLoggingUnitTesting.AdaptationTesting.GetCSharpText(testContext.TestName);").
|
||||||
AppendLine("File.WriteAllText(fileNameAndText[0], fileNameAndText[1]);").
|
AppendLine("File.WriteAllText(fileNameAndText[0], fileNameAndText[1]);").
|
||||||
AppendLine("File.WriteAllText(fileNameAndText[2], fileNameAndText[3]);").
|
AppendLine("File.WriteAllText(fileNameAndText[2], fileNameAndText[3]);").
|
||||||
AppendLine("}");
|
AppendLine("}");
|
||||||
@ -517,10 +513,10 @@ public class AdaptationTesting : ISMTP
|
|||||||
AppendLine("[ClassCleanup()]").
|
AppendLine("[ClassCleanup()]").
|
||||||
AppendLine("public static void ClassCleanup()").
|
AppendLine("public static void ClassCleanup()").
|
||||||
AppendLine("{").
|
AppendLine("{").
|
||||||
AppendLine("if (!(_EAFLoggingUnitTesting.Logger is null))").
|
AppendLine("if (EAFLoggingUnitTesting.Logger is not null)").
|
||||||
AppendLine("_EAFLoggingUnitTesting.Logger.LogInformation(\"Cleanup\");").
|
AppendLine("EAFLoggingUnitTesting.Logger.LogInformation(\"Cleanup\");").
|
||||||
AppendLine("if (!(_EAFLoggingUnitTesting is null))").
|
AppendLine("if (EAFLoggingUnitTesting is not null)").
|
||||||
AppendLine("_EAFLoggingUnitTesting.Dispose();").
|
AppendLine("EAFLoggingUnitTesting.Dispose();").
|
||||||
AppendLine("}").
|
AppendLine("}").
|
||||||
AppendLine();
|
AppendLine();
|
||||||
else
|
else
|
||||||
@ -541,46 +537,35 @@ public class AdaptationTesting : ISMTP
|
|||||||
check = (from l in componentsCellComponentCellComponent.Equipment.ConnectionSettings.Setting where l.Name == sourceDirectoryCloaking select l.Value).FirstOrDefault();
|
check = (from l in componentsCellComponentCellComponent.Equipment.ConnectionSettings.Setting where l.Name == sourceDirectoryCloaking select l.Value).FirstOrDefault();
|
||||||
if (string.IsNullOrEmpty(check))
|
if (string.IsNullOrEmpty(check))
|
||||||
check = componentsCellComponentCellComponent.Equipment.SourceFileFilter;
|
check = componentsCellComponentCellComponent.Equipment.SourceFileFilter;
|
||||||
|
if (i == 2)
|
||||||
|
{
|
||||||
_ = stringBuilder.
|
_ = stringBuilder.
|
||||||
AppendLine("[TestMethod]").
|
AppendLine("[TestMethod]").
|
||||||
Append("public void ").Append(methodName).AppendLine("()").
|
Append("public void ").Append(methodName).Append("() => ").Append('_').Append(cellInstanceNameWithoutHyphen).Append('.').Append(methodName).AppendLine("();");
|
||||||
AppendLine("{");
|
}
|
||||||
if (i == 2)
|
|
||||||
_ = stringBuilder.Append('_').Append(cellInstanceNameWithoutHyphen).Append('.').Append(methodName).AppendLine("();");
|
|
||||||
else if (i == 1)
|
else if (i == 1)
|
||||||
{
|
{
|
||||||
if (componentsCellComponentCellComponent.Equipment.EquipmentType.Version != cellInstanceVersionName)
|
if (componentsCellComponentCellComponent.Equipment.EquipmentType.Version != cellInstanceVersionName)
|
||||||
throw new Exception("Versions should match!");
|
throw new Exception("Versions should match!");
|
||||||
equipmentTypeName = componentsCellComponentCellComponent.Equipment.EquipmentType.Name;
|
equipmentTypeName = componentsCellComponentCellComponent.Equipment.EquipmentType.Name;
|
||||||
_ = stringBuilder.
|
_ = stringBuilder.
|
||||||
|
AppendLine("[TestMethod]").
|
||||||
|
Append("public void ").Append(methodName).AppendLine("()").
|
||||||
|
AppendLine("{").
|
||||||
Append("string check = \"").Append(check.Split('\\').Last()).AppendLine("\";").
|
Append("string check = \"").Append(check.Split('\\').Last()).AppendLine("\";").
|
||||||
AppendLine("MethodBase methodBase = new StackFrame().GetMethod();").
|
AppendLine("MethodBase methodBase = new StackFrame().GetMethod();").
|
||||||
AppendLine("_EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, \" - Getting configuration\"));").
|
AppendLine("EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, \" - Getting configuration\"));").
|
||||||
AppendLine("string[] fileNameAndJson = _EAFLoggingUnitTesting.AdaptationTesting.GetConfiguration(methodBase);").
|
AppendLine("_ = Helpers.Metrology.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting);").
|
||||||
AppendLine("Assert.IsTrue(fileNameAndJson[1].Contains(check));").
|
AppendLine("EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, \" - Exit\"));").
|
||||||
AppendLine("File.WriteAllText(fileNameAndJson[0], fileNameAndJson[1]);");
|
|
||||||
if (componentsCellComponentCellComponent.Equipment.EquipmentType.Name == componentsCellComponentCellComponentEquipmentTypeNames[0])
|
|
||||||
_ = stringBuilder.
|
|
||||||
AppendLine("IFileRead fileRead = _EAFLoggingUnitTesting.AdaptationTesting.Get(methodBase, sourceFileLocation: string.Empty, sourceFileFilter: string.Empty, useCyclicalForDescription: false);").
|
|
||||||
AppendLine("Assert.IsFalse(string.IsNullOrEmpty(fileRead.CellInstanceConnectionName));");
|
|
||||||
_ = stringBuilder.
|
|
||||||
AppendLine("_EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, \" - Exit\"));");
|
|
||||||
}
|
|
||||||
else
|
|
||||||
throw new Exception();
|
|
||||||
_ = stringBuilder.
|
|
||||||
AppendLine("}").
|
AppendLine("}").
|
||||||
AppendLine();
|
AppendLine();
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
throw new Exception();
|
||||||
|
}
|
||||||
_ = stringBuilder.
|
_ = stringBuilder.
|
||||||
AppendLine("}").
|
AppendLine("}").
|
||||||
AppendLine().
|
AppendLine();
|
||||||
AppendLine("}").
|
|
||||||
AppendLine().
|
|
||||||
AppendLine("// dotnet build --runtime win-x64").
|
|
||||||
Append("// dotnet test --runtime win-x64 --no-build --filter \"FullyQualifiedName~_Tests.").Append(loopName).Append('.').Append(_Environment).Append('.').Append(cellInstanceVersionNameAsCode).AppendLine("\" --% -- TestRunParameters.Parameter(name=\\\"Debug\\\", value=\\\"Debugger.IsAttached\\\")").
|
|
||||||
Append("// dotnet test --runtime win-x64 --no-build --filter \"FullyQualifiedName~_Tests.").Append(loopName).Append('.').Append(_Environment).Append('.').Append(cellInstanceVersionNameAsCode).Append(" & ClassName~").Append(cellInstanceNameWithoutHyphen).AppendLine("\" --% -- TestRunParameters.Parameter(name=\\\"Debug\\\", value=\\\"Debugger.IsAttached\\\")").
|
|
||||||
Append("// dotnet test --runtime win-x64 --no-build --filter \"FullyQualifiedName~_Tests.").Append(loopName).Append('.').Append(_Environment).Append('.').Append(cellInstanceVersionNameAsCode).Append(" & ClassName~").Append(cellInstanceNameWithoutHyphen).Append(" & ").Append(methodName).AppendLine("\" --% -- TestRunParameters.Parameter(name=\\\"Debug\\\", value=\\\"Debugger.IsAttached\\\")");
|
|
||||||
if (i == 2)
|
if (i == 2)
|
||||||
extractText = stringBuilder.ToString().Trim();
|
extractText = stringBuilder.ToString().Trim();
|
||||||
else if (i == 1)
|
else if (i == 1)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user