Using pattern ... Tests passed 2023-01-24 Bug in yml dotnet tool PackageReference arrangement nuget ^ Assembly Version Not verified Infineon.EAF.Runtime 2.49.0 MesEntity Placeholder Not Tested connectionCount AssemblyVersion SRP2100 = 53, //Largest Better errror message v2.49.2 IDescription.GetDescriptions with body Viewer support tasks.json kanbn initialize WSRequest alignment Back to x64 mesfs.infineon.com Infineon.EAF.Runtime 2.49.3 pool name Kanban net8.0 v2_52_0-Tests editorconfig dotnet_diagnostic CA1862 and GetWeekOfYear for WritePDSF gitignore cellInstanceVersion.EdaConnection.PortNumber Added Climatec to Test.cs GetJobIdDirectory Remove and 5-Other-Small mesfs.infineon.com Infineon.EAF.Runtime 2.49.3 pool name Kanban Back to x64 IDescription.GetDescriptions with body Viewer support tasks.json kanbn initialize WSRequest alignment v2.49.2 Better errror message SRP2100 = 53, //Largest AssemblyVersion connectionCount MesEntity Placeholder Infineon.EAF.Runtime 2.49.0 Assembly Version dotnet tool 2023-01-24
68 lines
2.6 KiB
C#
68 lines
2.6 KiB
C#
using Adaptation._Tests.Shared;
|
|
using Microsoft.Extensions.Logging;
|
|
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
|
using System;
|
|
using System.Diagnostics;
|
|
using System.Reflection;
|
|
using System.Text;
|
|
|
|
namespace Adaptation._Tests.Static;
|
|
|
|
[TestClass]
|
|
public class XML : LoggingUnitTesting, IDisposable
|
|
{
|
|
|
|
#pragma warning disable CA2254
|
|
#pragma warning disable IDE0060
|
|
|
|
internal static XML LoggingUnitTesting { get; private set; }
|
|
|
|
public XML() : base(testContext: null, declaringType: null)
|
|
{
|
|
if (LoggingUnitTesting is null)
|
|
throw new Exception();
|
|
}
|
|
|
|
public XML(TestContext testContext) : base(testContext, new StackFrame().GetMethod().DeclaringType)
|
|
{ }
|
|
|
|
[ClassInitialize]
|
|
public static void ClassInitialize(TestContext testContext) => LoggingUnitTesting ??= new XML(testContext);
|
|
|
|
[ClassCleanup()]
|
|
public static void ClassCleanup()
|
|
{
|
|
LoggingUnitTesting?.Logger?.LogInformation("Cleanup");
|
|
LoggingUnitTesting?.Dispose();
|
|
}
|
|
|
|
[TestMethod]
|
|
public void TestXmlBuild()
|
|
{
|
|
MethodBase methodBase = new StackFrame().GetMethod();
|
|
LoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
|
|
string key;
|
|
string value;
|
|
int counter = 500;
|
|
StringBuilder stringBuilder = new();
|
|
string a = "<d2p1:ModelObjectParameterDefinition z:Id=\"i";
|
|
string c = "\"><d2p1:EnumType></d2p1:EnumType><d2p1:Id>0</d2p1:Id><d2p1:Name>CellInstance.R";
|
|
string f = "</d2p1:Name><d2p1:Value>";
|
|
string h = "</d2p1:Value><d2p1:ValueType>String</d2p1:ValueType></d2p1:ModelObjectParameterDefinition>";
|
|
int[] reactors = new int[] { 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 68, 70, 72, 73, 74, 75, 77, 79 };
|
|
foreach (int reactor in reactors)
|
|
{
|
|
for (int i = 1; i < 4; i++)
|
|
{
|
|
counter += 1;
|
|
key = i switch { 1 => ".Alias", 2 => "-EQPT.Alias", 3 => "-EQPT.StaticFileServer", _ => throw new Exception() };
|
|
value = i switch { 1 or 2 => $"R{reactor}", 3 => "10.95.154.##", _ => throw new Exception() };
|
|
_ = stringBuilder.Append(a).Append(counter).Append(c).Append(reactor).Append(key).Append(f).Append(value).AppendLine(h);
|
|
}
|
|
}
|
|
System.IO.File.WriteAllText(@"D:\Tmp\Phares\a.xml", stringBuilder.ToString());
|
|
Assert.IsTrue(true);
|
|
LoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
|
|
}
|
|
|
|
} |