Version Error Message
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
This commit is contained in:
104
Adaptation/_Tests/Static/DEP08SIASM.cs
Normal file
104
Adaptation/_Tests/Static/DEP08SIASM.cs
Normal file
@ -0,0 +1,104 @@
|
||||
using Adaptation._Tests.Shared;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using System.Text;
|
||||
|
||||
namespace Adaptation._Tests.Static;
|
||||
|
||||
[TestClass]
|
||||
public class DEP08SIASM : LoggingUnitTesting, IDisposable
|
||||
{
|
||||
|
||||
#pragma warning disable CA2254
|
||||
#pragma warning disable IDE0060
|
||||
|
||||
internal static DEP08SIASM LoggingUnitTesting { get; private set; }
|
||||
|
||||
public DEP08SIASM() : base(testContext: null, declaringType: null)
|
||||
{
|
||||
if (LoggingUnitTesting is null)
|
||||
throw new Exception();
|
||||
}
|
||||
|
||||
public DEP08SIASM(TestContext testContext) : base(testContext, new StackFrame().GetMethod().DeclaringType)
|
||||
{
|
||||
}
|
||||
|
||||
[ClassInitialize]
|
||||
public static void ClassInitialize(TestContext testContext) => LoggingUnitTesting ??= new DEP08SIASM(testContext);
|
||||
|
||||
[ClassCleanup()]
|
||||
public static void ClassCleanup()
|
||||
{
|
||||
LoggingUnitTesting?.Logger?.LogInformation("Cleanup");
|
||||
LoggingUnitTesting?.Dispose();
|
||||
}
|
||||
|
||||
private static void NonThrowTryCatch()
|
||||
{
|
||||
try
|
||||
{ throw new Exception(); }
|
||||
catch (Exception) { }
|
||||
}
|
||||
|
||||
[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("DEP08SIASM", "v2.56.0"),
|
||||
};
|
||||
string staging = "http://mestsa07ec.infineon.com: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}");
|
||||
}
|
||||
string sourceDirectory = "D:/Tmp/cellInstanceVersion.EdaConnection.PortNumber";
|
||||
if (!Directory.Exists(sourceDirectory))
|
||||
_ = Directory.CreateDirectory(sourceDirectory);
|
||||
File.WriteAllText(Path.Combine(sourceDirectory, $"{methodBase.Module.Name}-{methodBase.ReflectedType.Name}-{methodBase.Name}.tsv"), results.ToString());
|
||||
LoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
public void CellInstanceVersionEdaConnectionPortNumber()
|
||||
{
|
||||
MethodBase methodBase = new StackFrame().GetMethod();
|
||||
string sourceDirectory = "D:/Tmp/cellInstanceVersion.EdaConnection.PortNumber";
|
||||
if (Directory.Exists(sourceDirectory))
|
||||
{
|
||||
string destinationDirectory = Path.Combine(sourceDirectory, "All");
|
||||
if (!Directory.Exists(destinationDirectory))
|
||||
_ = Directory.CreateDirectory(destinationDirectory);
|
||||
List<string> lines = new();
|
||||
string[] files = Directory.GetFiles(sourceDirectory, "*.tsv", SearchOption.TopDirectoryOnly);
|
||||
foreach (string file in files)
|
||||
lines.AddRange(File.ReadAllLines(file));
|
||||
File.WriteAllLines(Path.Combine(destinationDirectory, $"{DateTime.Now.Ticks}.tsv"), lines.Distinct().OrderBy(l => l));
|
||||
}
|
||||
LoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
|
||||
NonThrowTryCatch();
|
||||
}
|
||||
|
||||
}
|
@ -33,8 +33,7 @@ public class EAF : LoggingUnitTesting, IDisposable
|
||||
[ClassInitialize]
|
||||
public static void ClassInitialize(TestContext testContext)
|
||||
{
|
||||
if (LoggingUnitTesting is null)
|
||||
LoggingUnitTesting = new EAF(testContext);
|
||||
LoggingUnitTesting ??= new EAF(testContext);
|
||||
string dummyRoot = string.Empty;
|
||||
bool skipEquipmentDictionary = true;
|
||||
AdaptationTesting = new(dummyRoot, testContext, skipEquipmentDictionary, LoggingUnitTesting.TestContextPropertiesAsJson, LoggingUnitTesting.HasWaitForProperty);
|
||||
@ -43,10 +42,8 @@ public class EAF : LoggingUnitTesting, IDisposable
|
||||
[ClassCleanup()]
|
||||
public static void ClassCleanup()
|
||||
{
|
||||
if (LoggingUnitTesting.Logger is not null)
|
||||
LoggingUnitTesting.Logger.LogInformation("Cleanup");
|
||||
if (LoggingUnitTesting is not null)
|
||||
LoggingUnitTesting.Dispose();
|
||||
LoggingUnitTesting?.Logger?.LogInformation("Cleanup");
|
||||
LoggingUnitTesting?.Dispose();
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
@ -58,9 +55,91 @@ public class EAF : LoggingUnitTesting, IDisposable
|
||||
HttpClient httpClient = new();
|
||||
MethodBase methodBase = new StackFrame().GetMethod();
|
||||
string currentActiveVersionTag = "CurrentActiveVersion>";
|
||||
string managementSite = "http://mestsa07ec.ec.local:9003/CellInstances/entity/";
|
||||
string managementSite = "http://mestsa07ec.infineon.com:9003/CellInstances/entity/";
|
||||
LoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
|
||||
string[] cellInstances = new string[] { "R74-PLC", "MET08THFTIRQS408M", "HGCV1", "TENCOR1", "R53-EQPT", "EC", "TENCOR1-EDA", "R47-PLC-EDA", "SPV01", "CDE4-EDA", "MET08DDUPSP1TBI", "BACKLOG", "R34", "BIORAD5", "CDE3-EQPT", "BIORAD4-EDA", "CDE2-EDA", "CDE5-EDA", "DEP08SIHTRPLC", "R70-PLC-EDA", "MET08THFTIRSTRATUS", "R34-EQPT", "MET08ANLYSDIFAAST230", "BIORAD4", "CDE3-EDA", "CDE5-EQPT", "R72-PLC-EDA", "R74-PLC-EDA", "BACKLOG-EQPT", "CDE3", "TENCOR3-EDA", "R73-PLC-EDA", "R47-PLC", "SP101", "SPV01-EDA", "BIORAD3-EDA", "R70-PLC", "MET08RESIHGCV", "CDE4", "MET08RESIMAPCDE", "TENCOR2", "TENCOR3", "DEP08SIASM", "SP101-EQPT", "BIORAD2", "CDE2", "HGCV3-EDA", "HGCV2-EDA", "HGCV1-EDA", "BIORAD2-EDA", "TENCOR2-EDA", "CDE4-EQPT", "R72-PLC", "HGCV3", "HGCV2", "BIORAD3", "BIORAD5-EDA", "R34-EDA", "SP101-EDA", "R73-PLC", "CDE5", "MET08DDUPSFS6420" };
|
||||
string[] cellInstances = new string[]
|
||||
{
|
||||
"BACKLOG-EQPT",
|
||||
"BACKLOG",
|
||||
"BIORAD2-EDA",
|
||||
"BIORAD2",
|
||||
"BIORAD3-EDA",
|
||||
"BIORAD3",
|
||||
"BIORAD4-EDA",
|
||||
"BIORAD4",
|
||||
"BIORAD5-EDA",
|
||||
"BIORAD5",
|
||||
"CDE2-EDA",
|
||||
"CDE2",
|
||||
"CDE3-EDA",
|
||||
"CDE3-EQPT",
|
||||
"CDE3",
|
||||
"CDE4-EDA",
|
||||
"CDE4-EQPT",
|
||||
"CDE4",
|
||||
"CDE5-EDA",
|
||||
"CDE5-EQPT",
|
||||
"CDE5",
|
||||
"CDE6-EDA",
|
||||
"CDE6-EQPT",
|
||||
"CDE6",
|
||||
"DEP08SIASM",
|
||||
"DEP08SIHTRPLC",
|
||||
"EC",
|
||||
"HGCV1-EDA",
|
||||
"HGCV1-EQPT",
|
||||
"HGCV1",
|
||||
"HGCV2-EDA",
|
||||
"HGCV2-EQPT",
|
||||
"HGCV2",
|
||||
"HGCV3-EDA",
|
||||
"HGCV3-EQPT",
|
||||
"HGCV3",
|
||||
"MET08ANLYSDIFAAST230",
|
||||
"MET08DDUPSFS6420",
|
||||
"MET08DDUPSP1TBI",
|
||||
"MET08RESIHGCV",
|
||||
"MET08RESIMAPCDE",
|
||||
"MET08RESISRP2100",
|
||||
"MET08THFTIRQS408M",
|
||||
"MET08THFTIRSTRATUS",
|
||||
"R34-EDA",
|
||||
"R34-EQPT",
|
||||
"R34",
|
||||
"R47-PLC-EDA",
|
||||
"R47-PLC",
|
||||
"R53-EDA",
|
||||
"R53-EQPT",
|
||||
"R53",
|
||||
"R55-EDA",
|
||||
"R55-EQPT",
|
||||
"R55",
|
||||
"R70-PLC-EDA",
|
||||
"R70-PLC",
|
||||
"R72-PLC-EDA",
|
||||
"R72-PLC",
|
||||
"R73-PLC-EDA",
|
||||
"R73-PLC",
|
||||
"R74-PLC-EDA",
|
||||
"R74-PLC",
|
||||
"SP101-EDA",
|
||||
"SP101-EQPT",
|
||||
"SP101",
|
||||
"SPV01-EDA",
|
||||
"SPV01",
|
||||
"SRP-EDA",
|
||||
"SRP-EQPT",
|
||||
"SRP",
|
||||
"T21",
|
||||
"T27-EDA",
|
||||
"T27",
|
||||
"TENCOR1-EDA",
|
||||
"TENCOR1",
|
||||
"TENCOR2-EDA",
|
||||
"TENCOR2",
|
||||
"TENCOR3-EDA",
|
||||
"TENCOR3",
|
||||
};
|
||||
foreach (string cellInstance in cellInstances.OrderBy(l => l))
|
||||
{
|
||||
if (!cellInstance.Contains('-'))
|
||||
@ -82,109 +161,50 @@ public class EAF : LoggingUnitTesting, IDisposable
|
||||
|
||||
}
|
||||
|
||||
// 553,v2.19.0,R47-PLC-EDA,,,messtec102.EC.local
|
||||
// 553,v2.19.0,R47-PLC,,,messtec102.EC.local
|
||||
// 7589,v2.43.3,CDE5-EQPT,DownloadRsMFile.Communicating,DownloadRsMFile.NotCommunicating,messtec102.EC.local
|
||||
// 8034,v2.43.4,R34-EQPT,DownloadJpegFile.Communicating,DownloadJpegFile.NotCommunicating,
|
||||
// 8034,v2.43.4,R53-EQPT,DownloadJpegFile.Communicating,DownloadJpegFile.NotCommunicating,
|
||||
// 8134,v2.43.4,R34,jpeg.Communicating,jpeg.NotCommunicating,
|
||||
// 8134,v4.15.0,R34-EDA,,,messtec102.EC.local
|
||||
// 8409,v2.43.0,MET08ANLYSDIFAAST230,MoveMatchingFiles.Communicating,MoveMatchingFiles.NotCommunicating,messtec102.EC.local
|
||||
// 8439,v2.43.1,EC,,,messtec102.EC.local
|
||||
// 8500,v2.43.0,BIORAD2,QS408M.Communicating,QS408M.NotCommunicating,messtec102.EC.local
|
||||
// 8500,v4.15.0,BIORAD2-EDA,,,messtec102.EC.local
|
||||
// 8501,v2.43.0,BIORAD3,QS408M.Communicating,QS408M.NotCommunicating,messtec102.EC.local
|
||||
// 8501,v4.15.0,BIORAD3-EDA,,,messtec102.EC.local
|
||||
// 8509,v2.43.2,MET08THFTIRQS408M,MoveMatchingFiles.Communicating,MoveMatchingFiles.NotCommunicating,messtec102.EC.local
|
||||
// 8510,v2.43.0,BIORAD4,QS408M.Communicating,QS408M.NotCommunicating,messtec102.EC.local
|
||||
// 8510,v4.15.0,BIORAD4-EDA,,,messtec102.EC.local
|
||||
// 8511,v2.43.0,BIORAD5,QS408M.Communicating,QS408M.NotCommunicating,messtec102.EC.local
|
||||
// 8511,v4.15.0,BIORAD5-EDA,,,messtec102.EC.local
|
||||
// 8519,v2.43.2,MET08THFTIRSTRATUS,MoveMatchingFiles.Communicating,MoveMatchingFiles.NotCommunicating,messtec102.EC.local
|
||||
// 8520,v2.43.4,CDE2,txt.Communicating,txt.NotCommunicating,MESSA010EC.EC.local
|
||||
// 8520,v4.15.0,CDE2-EDA,,,messtec102.EC.local
|
||||
// 8521,v2.43.4,CDE5,RsM.Communicating,RsM.NotCommunicating,MESSA010EC.EC.local
|
||||
// 8521,v4.15.0,CDE5-EDA,,,messtec102.EC.local
|
||||
// 8524,v2.43.0,BACKLOG,json.Communicating,json.NotCommunicating,
|
||||
// 8524,v2.43.4,CDE3,RsM.Communicating,RsM.NotCommunicating,MESSA010EC.EC.local
|
||||
// 8524,v2.43.4,CDE4,RsM.Communicating,RsM.NotCommunicating,MESSA010EC.EC.local
|
||||
// 8524,v4.15.0,CDE3-EDA,,,messtec102.EC.local
|
||||
// 8524,v4.15.0,CDE4-EDA,,,messtec102.EC.local
|
||||
// 8526,v2.43.0,CDE3-EQPT,DownloadRsMFile.Communicating,DownloadRsMFile.NotCommunicating,messtec102.EC.local
|
||||
// 8526,v2.43.3,CDE4-EQPT,DownloadRsMFile.Communicating,DownloadRsMFile.NotCommunicating,
|
||||
// 8528,v2.43.0,BACKLOG-EQPT,ConvertExcelToJson.Communicating,ConvertExcelToJson.NotCommunicating,
|
||||
// 8529,v2.43.4,MET08RESIMAPCDE,MoveMatchingFiles.Communicating,MoveMatchingFiles.NotCommunicating,
|
||||
// 8530,v2.43.4,HGCV1,pcl.Communicating,pcl.NotCommunicating,MESSA010EC.EC.local
|
||||
// 8530,v4.15.0,HGCV1-EDA,,,messtec102.EC.local
|
||||
// 8531,v2.43.4,HGCV2,pcl.Communicating,pcl.NotCommunicating,MESSA010EC.EC.local
|
||||
// 8531,v4.15.0,HGCV2-EDA,,,messtec102.EC.local
|
||||
// 8532,v2.43.4,HGCV3,pcl.Communicating,pcl.NotCommunicating,MESSA010EC.EC.local
|
||||
// 8532,v4.15.0,HGCV3-EDA,,,messtec102.EC.local
|
||||
// 8537,v2.43.4,DEP08SIASM,MonitorApplication.Communicating,MonitorApplication.NotCommunicating,
|
||||
// 8538,v2.43.0,DEP08SIHTRPLC,ZipFilesByDate.Communicating,ZipFilesByDate.NotCommunicating,
|
||||
// 8539,v2.43.4,MET08RESIHGCV,MoveMatchingFiles.Communicating,MoveMatchingFiles.NotCommunicating,MESSA010EC.EC.local
|
||||
// 8540,v2.43.4,TENCOR1,pcl.Communicating,pcl.NotCommunicating,MESSA010EC.EC.local
|
||||
// 8540,v4.15.0,TENCOR1-EDA,,,messtec102.EC.local
|
||||
// 8541,v2.43.4,TENCOR2,pcl.Communicating,pcl.NotCommunicating,MESSA010EC.EC.local
|
||||
// 8541,v4.15.0,TENCOR2-EDA,,,messtec102.EC.local
|
||||
// 8542,v2.43.4,TENCOR3,pcl.Communicating,pcl.NotCommunicating
|
||||
// 8542,v4.15.0,TENCOR3-EDA,,,messtec102.EC.local
|
||||
// 8549,v2.43.4,MET08DDUPSFS6420,MoveMatchingFiles.Communicating,MoveMatchingFiles.NotCommunicating,
|
||||
// 8550,v4.15.0,SP101-EDA,,,messtec102.EC.local
|
||||
// 8551,v2.43.4,SP101,txt.Communicating,txt.NotCommunicating,MESSA010EC.EC.local
|
||||
// 8555,v2.43.0,SP101-EQPT,MoveAllFiles.Communicating,MoveAllFiles.NotCommunicating,messtec102.EC.local
|
||||
// 8559,v2.43.4,MET08DDUPSP1TBI,MoveMatchingFiles.Communicating,MoveMatchingFiles.NotCommunicating,MESSA010EC.EC.local
|
||||
// 8569,v2.43.0,SPV01,,,messtec102.EC.local
|
||||
// 8569,v4.15.0,SPV01-EDA,,,messtec102.EC.local
|
||||
// 8770,v1.0.1,R70-PLC-EDA,,,messtec102.EC.local
|
||||
// 8770,v2.19.0,R70-PLC,,,messtec102.EC.local
|
||||
// 8772,v1.0.1,R72-PLC-EDA,,,messtec102.EC.local
|
||||
// 8772,v2.19.0,R72-PLC,,,messtec102.EC.local
|
||||
// 8773,v1.0.1,R73-PLC-EDA,,,messtec102.EC.local
|
||||
// 8773,v2.19.0,R73-PLC,,,messtec102.EC.local
|
||||
// 8774,v1.0.1,R74-PLC-EDA,,,messtec102.EC.local
|
||||
// 8774,v2.19.0,R74-PLC,,,messtec102.EC.local
|
||||
|
||||
// p p v i
|
||||
// 553 553 v2.19.0 R47-PLC
|
||||
// 7589 7589 v2.43.3 CDE5-EQPT
|
||||
// 8034 8034 v2.43.4 R34-EQPT
|
||||
// 8034
|
||||
// 8134 8134 v2.43.4 R34
|
||||
// 8409 8409 v2.43.0 MET08ANLYSDIFAAST230
|
||||
// 8439 8439 v2.43.1 EC
|
||||
// 8500 8500 v2.43.0 BIORAD2
|
||||
// 8501 8501 v2.43.0 BIORAD3
|
||||
// 8509 8509 v2.43.2 MET08THFTIRQS408M
|
||||
// 8510 8510 v2.43.0 BIORAD4
|
||||
// 8511 8511 v2.43.0 BIORAD5
|
||||
// 8519 8519 v2.43.2 MET08THFTIRSTRATUS
|
||||
// 8520 8520 v2.43.4 CDE2
|
||||
// 8521 8521 v2.43.4 CDE5
|
||||
// 8524
|
||||
// 8524 8524 v2.43.4 CDE3
|
||||
// 8524 v2.43.4 CDE4
|
||||
// 8526 8526 v2.43.0 CDE3-EQPT
|
||||
// 8526 v2.43.3 CDE4-EQPT
|
||||
// 8528 8528 v2.43.0 BACKLOG-EQPT
|
||||
// 8529 8529 v2.43.4 MET08RESIMAPCDE
|
||||
// 8530 8530 v2.43.4 HGCV1
|
||||
// 8531 8531 v2.43.4 HGCV2
|
||||
// 8532 8532 v2.43.4 HGCV3
|
||||
// 8537 8537 v2.43.4 DEP08SIASM
|
||||
// 8538 8538 v2.43.0 DEP08SIHTRPLC
|
||||
// 8539 8539 v2.43.4 MET08RESIHGCV
|
||||
// 8540 8540 v2.43.4 TENCOR1
|
||||
// 8541 8541 v2.43.4 TENCOR2
|
||||
// 8542 8542 v2.43.4 TENCOR3
|
||||
// 8549 8549 v2.43.4 MET08DDUPSFS6420
|
||||
// 8551 8551 v2.43.4 SP101
|
||||
// 8555 8555 v2.43.0 SP101-EQPT
|
||||
// 8559 8559 v2.43.4 MET08DDUPSP1TBI
|
||||
// 8569 8569 v2.43.0 SPV01
|
||||
// 8770 8770 v2.19.0 R70-PLC
|
||||
// 8772 8772 v2.19.0 R72-PLC
|
||||
// 8773 8773 v2.19.0 R73-PLC
|
||||
// 8774 8774 v2.19.0 R74-PLC
|
||||
// 8775 v2.43.0 BACKLOG
|
||||
// 8653 v2.43.4 R53-EQPT
|
||||
// Staging - Getting configuration
|
||||
// 8500,v4.16.0,BIORAD2-EDA,,,messa010ec
|
||||
// 8501,v4.16.0,BIORAD3-EDA,,,messa010ec
|
||||
// 8510,v4.16.0,BIORAD4-EDA,,,messa010ec
|
||||
// 8511,v4.16.0,BIORAD5-EDA,,,messa010ec
|
||||
// 8520,v4.16.0,CDE2-EDA,,,messa010ec
|
||||
// 8524,v4.16.0,CDE3-EDA,,,messa010ec
|
||||
// 8526,v2.49.2,CDE3-EQPT,DownloadRsMFile.Communicating,DownloadRsMFile.NotCommunicating,mestsa06ec
|
||||
// 8524,v4.16.0,CDE4-EDA,,,messa010ec
|
||||
// 8526,v2.49.2,CDE4-EQPT,DownloadRsMFile.Communicating,DownloadRsMFile.NotCommunicating,mestsa06ec
|
||||
// 8521,v4.16.0,CDE5-EDA,,,messa010ec
|
||||
// 7589,v2.49.2,CDE5-EQPT,DownloadRsMFile.Communicating,DownloadRsMFile.NotCommunicating,mestsa06ec
|
||||
// 8522,v4.16.0,CDE6-EDA,,,messa010ec
|
||||
// 7590,v2.49.2,CDE6-EQPT,DownloadRsMFile.Communicating,DownloadRsMFile.NotCommunicating,mestsa06ec
|
||||
// 8530,v4.16.0,HGCV1-EDA,,,messa010ec
|
||||
// 8536,v2.12.3,HGCV1-EQPT,,,messa010ec
|
||||
// 8531,v4.16.0,HGCV2-EDA,,,messa010ec
|
||||
// 8537,v2.12.3,HGCV2-EQPT,,,messa010ec
|
||||
// 8532,v4.16.0,HGCV3-EDA,,,messa010ec
|
||||
// 8538,v2.12.3,HGCV3-EQPT,,,messa010ec
|
||||
// 8134,v4.16.0,R34-EDA,,,messa010ec
|
||||
// 8034,v2.43.4,R34-EQPT,DownloadJpegFile.Communicating,DownloadJpegFile.NotCommunicating,messa010ec
|
||||
// 553,v2.19.0,R47-PLC,,,messtec102
|
||||
// 553,v2.19.0,R47-PLC-EDA,,,messtec102
|
||||
// 8153,v4.16.0,R53-EDA,,,messa010ec
|
||||
// 8653,v2.43.4,R53-EQPT,DownloadJpegFile.Communicating,DownloadJpegFile.NotCommunicating,messa010ec
|
||||
// 8155,v4.16.0,R55-EDA,,,messa010ec
|
||||
// 8655,v2.43.4,R55-EQPT,DownloadJpegFile.Communicating,DownloadJpegFile.NotCommunicating,messa010ec
|
||||
// 8770,v2.19.0,R70-PLC,,,messtec102
|
||||
// 8770,v1.0.1,R70-PLC-EDA,,,messtec102
|
||||
// 8772,v2.19.0,R72-PLC,,,messtec102
|
||||
// 8772,v1.0.1,R72-PLC-EDA,,,messtec102
|
||||
// 8773,v2.19.0,R73-PLC,,,messtec102
|
||||
// 8773,v1.0.1,R73-PLC-EDA,,,messtec102
|
||||
// 8774,v2.19.0,R74-PLC,,,messtec102
|
||||
// 8774,v1.0.1,R74-PLC-EDA,,,messtec102
|
||||
// 8550,v4.16.0,SP101-EDA,,,messa010ec
|
||||
// 8555,v2.49.3,SP101-EQPT,MoveAllFiles.Communicating,MoveAllFiles.NotCommunicating,
|
||||
// 8569,v4.16.0,SPV01-EDA,,,messa010ec
|
||||
// 8574,v4.16.0,SRP-EDA,,,messa010ec
|
||||
// 8572,v2.49.2,SRP-EQPT,csv.Communicating,csv.NotCommunicating,mestsa06ec
|
||||
// 7627,v4.16.0,T27-EDA,,,messa010ec
|
||||
// 8540,v4.16.0,TENCOR1-EDA,,,messa010ec
|
||||
// 8541,v4.16.0,TENCOR2-EDA,,,messa010ec
|
||||
// 8542,v4.16.0,TENCOR3-EDA,,,messa010ec
|
||||
// Staging - Exit
|
||||
// Cleanup
|
131
Adaptation/_Tests/Static/jpeg.cs
Normal file
131
Adaptation/_Tests/Static/jpeg.cs
Normal file
@ -0,0 +1,131 @@
|
||||
using Adaptation._Tests.Shared;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using System.Text;
|
||||
|
||||
namespace Adaptation._Tests.Static;
|
||||
|
||||
[TestClass]
|
||||
public class JPEG : LoggingUnitTesting, IDisposable
|
||||
{
|
||||
|
||||
#pragma warning disable CA2254
|
||||
#pragma warning disable IDE0060
|
||||
|
||||
internal static JPEG LoggingUnitTesting { get; private set; }
|
||||
|
||||
public JPEG() : base(testContext: null, declaringType: null)
|
||||
{
|
||||
if (LoggingUnitTesting is null)
|
||||
throw new Exception();
|
||||
}
|
||||
|
||||
public JPEG(TestContext testContext) : base(testContext, new StackFrame().GetMethod().DeclaringType)
|
||||
{
|
||||
}
|
||||
|
||||
[ClassInitialize]
|
||||
public static void ClassInitialize(TestContext testContext) => LoggingUnitTesting ??= new JPEG(testContext);
|
||||
|
||||
[ClassCleanup()]
|
||||
public static void ClassCleanup()
|
||||
{
|
||||
LoggingUnitTesting?.Logger?.LogInformation("Cleanup");
|
||||
LoggingUnitTesting?.Dispose();
|
||||
}
|
||||
|
||||
private static void NonThrowTryCatch()
|
||||
{
|
||||
try
|
||||
{ throw new Exception(); }
|
||||
catch (Exception) { }
|
||||
}
|
||||
|
||||
#if DEBUG
|
||||
[Ignore]
|
||||
#endif
|
||||
[TestMethod]
|
||||
public void TestDescriptor()
|
||||
{
|
||||
MethodBase methodBase = new StackFrame().GetMethod();
|
||||
string fileName = "D:/Tmp/phares/R53-EQPT_638005905604624544 - Run Wafer.jpeg";
|
||||
LoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
|
||||
// (float pageMeanConfidence, string text, List<string> blocks) = FileHandlers.jpeg.ProcessData.Parse(fileName, new(), 0, 0, 0, 0, 0, 0);
|
||||
List<(float pageMeanConfidence, string text, List<string> blocks)> collection = FileHandlers.jpeg.ProcessData.Parse(fileName);
|
||||
Assert.IsTrue(collection.Count != 0);
|
||||
foreach ((float pageMeanConfidence, string text, List<string> blocks) in collection)
|
||||
{
|
||||
Assert.IsTrue(pageMeanConfidence > 0);
|
||||
Assert.IsTrue(!string.IsNullOrEmpty(text));
|
||||
Assert.IsTrue(blocks.Count != 0);
|
||||
// Normal images
|
||||
// "RECIPE:\nte end\nte a ee)\nAcne\n"
|
||||
// Grayscale
|
||||
// "RECIPE:\nEee en\nRECIPE e943\n\ncera ke\n"
|
||||
// Grayscale Inverted
|
||||
// "RECIPE:\nOT6_10PH. 60.3.0\nRECIPE e943\nASgMe\n"
|
||||
// BW
|
||||
// "RECIPE\nCTG.}0PH. 60.3.0\nRECIPE #943\nAGM e\n"
|
||||
}
|
||||
LoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
|
||||
}
|
||||
|
||||
#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("R34", "v2.56.0"),
|
||||
new("R53", "v2.56.0"),
|
||||
new("R55", "v2.56.0"),
|
||||
new("R34-EQPT", "v2.56.0"),
|
||||
new("R53-EQPT", "v2.56.0"),
|
||||
new("R55-EQPT", "v2.56.0"),
|
||||
};
|
||||
string staging = "http://mestsa07ec.infineon.com: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}");
|
||||
}
|
||||
string sourceDirectory = "D:/Tmp/cellInstanceVersion.EdaConnection.PortNumber";
|
||||
if (!Directory.Exists(sourceDirectory))
|
||||
_ = Directory.CreateDirectory(sourceDirectory);
|
||||
File.WriteAllText(Path.Combine(sourceDirectory, $"{methodBase.Module.Name}-{methodBase.ReflectedType.Name}-{methodBase.Name}.tsv"), results.ToString());
|
||||
LoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
public void CellInstanceVersionEdaConnectionPortNumber()
|
||||
{
|
||||
MethodBase methodBase = new StackFrame().GetMethod();
|
||||
string sourceDirectory = "D:/Tmp/cellInstanceVersion.EdaConnection.PortNumber";
|
||||
if (Directory.Exists(sourceDirectory))
|
||||
{
|
||||
string destinationDirectory = Path.Combine(sourceDirectory, "All");
|
||||
if (!Directory.Exists(destinationDirectory))
|
||||
_ = Directory.CreateDirectory(destinationDirectory);
|
||||
List<string> lines = new();
|
||||
string[] files = Directory.GetFiles(sourceDirectory, "*.tsv", SearchOption.TopDirectoryOnly);
|
||||
foreach (string file in files)
|
||||
lines.AddRange(File.ReadAllLines(file));
|
||||
File.WriteAllLines(Path.Combine(destinationDirectory, $"{DateTime.Now.Ticks}.tsv"), lines.Distinct().OrderBy(l => l));
|
||||
}
|
||||
LoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
|
||||
NonThrowTryCatch();
|
||||
}
|
||||
|
||||
}
|
@ -27,19 +27,13 @@ public class XML : LoggingUnitTesting, IDisposable
|
||||
{ }
|
||||
|
||||
[ClassInitialize]
|
||||
public static void ClassInitialize(TestContext testContext)
|
||||
{
|
||||
if (LoggingUnitTesting is null)
|
||||
LoggingUnitTesting = new XML(testContext);
|
||||
}
|
||||
public static void ClassInitialize(TestContext testContext) => LoggingUnitTesting ??= new XML(testContext);
|
||||
|
||||
[ClassCleanup()]
|
||||
public static void ClassCleanup()
|
||||
{
|
||||
if (LoggingUnitTesting.Logger is not null)
|
||||
LoggingUnitTesting.Logger.LogInformation("Cleanup");
|
||||
if (LoggingUnitTesting is not null)
|
||||
LoggingUnitTesting.Dispose();
|
||||
LoggingUnitTesting?.Logger?.LogInformation("Cleanup");
|
||||
LoggingUnitTesting?.Dispose();
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
|
Reference in New Issue
Block a user