Dynamic 5 and 14 point copy
AppSettings alignment with other projects _TestContextTestName over _TestContext
This commit is contained in:
@ -16,7 +16,7 @@ public class UnitTestFileShareController
|
||||
|
||||
private static ILogger? _Logger;
|
||||
private static string _ControllerName;
|
||||
private static TestContext _TestContext;
|
||||
private static string? _TestContextTestName;
|
||||
private static WebApplicationFactory<Wafer.Counter.Program>? _WebApplicationFactory;
|
||||
|
||||
#pragma warning restore
|
||||
@ -24,7 +24,7 @@ public class UnitTestFileShareController
|
||||
[ClassInitialize]
|
||||
public static void ClassInitAsync(TestContext testContext)
|
||||
{
|
||||
_TestContext = testContext;
|
||||
_TestContextTestName = testContext.TestName;
|
||||
_WebApplicationFactory = new WebApplicationFactory<Wafer.Counter.Program>();
|
||||
IServiceProvider serviceProvider = _WebApplicationFactory.Services.CreateScope().ServiceProvider;
|
||||
_Logger = serviceProvider.GetRequiredService<ILogger<Wafer.Counter.Program>>();
|
||||
@ -44,7 +44,7 @@ public class UnitTestFileShareController
|
||||
{
|
||||
_Logger?.LogInformation("Starting Web Application");
|
||||
Assert.AreEqual(IFileShareController<string>.GetRouteName(), _ControllerName);
|
||||
_Logger?.LogInformation("{TestName} completed", _TestContext?.TestName);
|
||||
_Logger?.LogInformation("{TestName} completed", _TestContextTestName);
|
||||
NonThrowTryCatch();
|
||||
}
|
||||
|
||||
@ -57,7 +57,7 @@ public class UnitTestFileShareController
|
||||
Assert.IsTrue(httpClient is not null);
|
||||
string? response = await httpClient.GetStringAsync($"api/v1/file-share/copy-file/?from=\\\\mesfs.infineon.com\\EC_Metrology_Si\\MetrologyAttachments\\CDERunHeader_\\2024\\WW11\\247233\\CDE5_240315162756858.pdsf&to=\\\\messa01ec.infineon.com\\apps\\Metrology\\MET08RESIMAPCDE\\Test\\a.pdsf");
|
||||
Assert.IsNotNull(response);
|
||||
_Logger?.LogInformation("{TestName} completed", _TestContext?.TestName);
|
||||
_Logger?.LogInformation("{TestName} completed", _TestContextTestName);
|
||||
NonThrowTryCatch();
|
||||
}
|
||||
|
||||
@ -70,7 +70,7 @@ public class UnitTestFileShareController
|
||||
Assert.IsTrue(httpClient is not null);
|
||||
string? response = await httpClient.GetStringAsync($"api/v1/file-share/move-file/?from=\\\\mesfs.infineon.com\\EC_Metrology_Si\\MetrologyAttachments\\CDERunHeader_\\2024\\WW11\\247233\\CDE5_240315162756858.pdsf&to=\\\\messa01ec.infineon.com\\apps\\Metrology\\MET08RESIMAPCDE\\Test\\a.pdsf");
|
||||
Assert.IsNotNull(response);
|
||||
_Logger?.LogInformation("{TestName} completed", _TestContext?.TestName);
|
||||
_Logger?.LogInformation("{TestName} completed", _TestContextTestName);
|
||||
NonThrowTryCatch();
|
||||
}
|
||||
|
||||
@ -82,7 +82,7 @@ public class UnitTestFileShareController
|
||||
Assert.IsTrue(httpClient is not null);
|
||||
string? response = await httpClient.GetStringAsync($"api/v1/file-share/file-write/?path=\\\\messa01ec.infineon.com\\apps\\Metrology\\MET08RESIMAPCDE\\Test\\b.pdsf&contents=b");
|
||||
Assert.IsNotNull(response);
|
||||
_Logger?.LogInformation("{TestName} completed", _TestContext?.TestName);
|
||||
_Logger?.LogInformation("{TestName} completed", _TestContextTestName);
|
||||
NonThrowTryCatch();
|
||||
}
|
||||
|
||||
@ -103,7 +103,7 @@ public class UnitTestFileShareController
|
||||
characterizationParameters = new(string.Empty, "CDE5", "CDE*.json", null, null, "8INCH");
|
||||
result = fileShareRepository?.GetArchiveData(characterizationParameters);
|
||||
Assert.IsNotNull(result);
|
||||
_Logger?.LogInformation("{TestName} completed", _TestContext?.TestName);
|
||||
_Logger?.LogInformation("{TestName} completed", _TestContextTestName);
|
||||
NonThrowTryCatch();
|
||||
}
|
||||
|
||||
@ -115,7 +115,7 @@ public class UnitTestFileShareController
|
||||
Assert.IsTrue(httpClient is not null);
|
||||
string? response = await httpClient.GetStringAsync($"api/v1/file-share/archive-data/?area=FQA&equipment-id=FQA-8INCH&search-pattern=*.wc&wafer-size=8INCH");
|
||||
Assert.IsNotNull(response);
|
||||
_Logger?.LogInformation("{TestName} completed", _TestContext?.TestName);
|
||||
_Logger?.LogInformation("{TestName} completed", _TestContextTestName);
|
||||
NonThrowTryCatch();
|
||||
}
|
||||
|
||||
@ -127,7 +127,7 @@ public class UnitTestFileShareController
|
||||
IFileShareRepository? fileShareRepository = serviceProvider?.GetRequiredService<IFileShareRepository>();
|
||||
ReadOnlyCollection<ToolTypeNameId>? result = fileShareRepository?.GetEquipmentIds();
|
||||
Assert.IsNotNull(result);
|
||||
_Logger?.LogInformation("{TestName} completed", _TestContext?.TestName);
|
||||
_Logger?.LogInformation("{TestName} completed", _TestContextTestName);
|
||||
NonThrowTryCatch();
|
||||
}
|
||||
|
||||
@ -139,7 +139,7 @@ public class UnitTestFileShareController
|
||||
Assert.IsTrue(httpClient is not null);
|
||||
string? response = await httpClient.GetStringAsync($"api/v1/file-share/equipment-ids");
|
||||
Assert.IsNotNull(response);
|
||||
_Logger?.LogInformation("{TestName} completed", _TestContext?.TestName);
|
||||
_Logger?.LogInformation("{TestName} completed", _TestContextTestName);
|
||||
NonThrowTryCatch();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user