Bug in yml dotnet tool PackageReference arrangement RDS Blank Change int dotnet test nuget ^ [spcepiworld].[dbo].[evnt_inf] Assembly Version WS Result bug fix and Nuget bump, PSN, Reactor and Extra RDS rule OpenInsightApi and testRunTitle editorconfig bugs Fix Type serializerValue RDS oversight PropertyNameCaseInsensitive Save check for file already present NoWaitDirectory MoveArchive allow empty directory and continueOnError for clean files CreatePointerFile and more on NoWaitDirectory
72 lines
2.5 KiB
C#
72 lines
2.5 KiB
C#
using Adaptation._Tests.Shared;
|
|
using Microsoft.Extensions.Logging;
|
|
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
|
using System;
|
|
using System.Diagnostics;
|
|
using System.IO;
|
|
using System.Reflection;
|
|
using System.Text;
|
|
|
|
namespace Adaptation._Tests.Static;
|
|
|
|
[TestClass]
|
|
public class MET08DDUPSFS6420 : LoggingUnitTesting, IDisposable
|
|
{
|
|
|
|
#pragma warning disable CA2254
|
|
#pragma warning disable IDE0060
|
|
|
|
internal static MET08DDUPSFS6420 LoggingUnitTesting { get; private set; }
|
|
|
|
public MET08DDUPSFS6420() : base(testContext: null, declaringType: null)
|
|
{
|
|
if (LoggingUnitTesting is null)
|
|
throw new Exception();
|
|
}
|
|
|
|
public MET08DDUPSFS6420(TestContext testContext) : base(testContext, new StackFrame().GetMethod().DeclaringType)
|
|
{
|
|
}
|
|
|
|
[ClassInitialize]
|
|
public static void ClassInitialize(TestContext testContext) => LoggingUnitTesting ??= new MET08DDUPSFS6420(testContext);
|
|
|
|
[ClassCleanup()]
|
|
public static void ClassCleanup()
|
|
{
|
|
LoggingUnitTesting?.Logger?.LogInformation("Cleanup");
|
|
LoggingUnitTesting?.Dispose();
|
|
}
|
|
|
|
[TestMethod]
|
|
public void TestDateTime()
|
|
{
|
|
DateTime dateTime = DateTime.Now;
|
|
Assert.IsTrue(dateTime.ToString("M/d/yyyy h:mm:ss tt") == dateTime.ToString());
|
|
}
|
|
|
|
#if DEBUG
|
|
[Ignore]
|
|
#endif
|
|
[TestMethod]
|
|
public void Staging()
|
|
{
|
|
MethodBase methodBase = new StackFrame().GetMethod();
|
|
StringBuilder results = new();
|
|
(string cellInstanceName, string cellInstanceVersionName)[] collection = new (string, string)[]
|
|
{
|
|
new("MET08DDUPSFS6420", "v2.47.1"),
|
|
};
|
|
string staging = "http://mestsa07ec.ec.local:9003/CellInstanceServiceV2";
|
|
Shared.PasteSpecialXml.EAF.XML.API.CellInstance.CellInstanceVersion cellInstanceVersion;
|
|
LoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
|
|
foreach ((string cellInstanceName, string cellInstanceVersionName) in collection)
|
|
{
|
|
cellInstanceVersion = AdaptationTesting.GetCellInstanceVersion($"{staging}/{cellInstanceName}/{cellInstanceVersionName}/configuration");
|
|
_ = results.AppendLine($"{cellInstanceName}\t{cellInstanceVersionName}\t{cellInstanceVersion.EdaConnection.PortNumber}");
|
|
}
|
|
File.WriteAllText($"D:/Tmp/{methodBase.Module.Name}-{methodBase.ReflectedType.Name}-{methodBase.Name}.tsv", results.ToString());
|
|
LoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
|
|
}
|
|
|
|
} |