awaiting-disposition-header-attachment-id

This commit is contained in:
2024-06-18 10:55:12 -07:00
parent da3e839a48
commit e7b721fdb3
35 changed files with 311 additions and 273 deletions

View File

@ -107,4 +107,26 @@ public class UnitAwaitingDispoController
_Logger?.LogInformation("{TestName} completed", _TestContext?.TestName);
}
[TestMethod]
public void GetHeaderAttachmentID()
{
_Logger?.LogInformation("Starting Web Application");
IServiceProvider? serviceProvider = _WebApplicationFactory?.Services.CreateScope().ServiceProvider;
IMetrologyRepository? metrologyRepository = serviceProvider?.GetRequiredService<IMetrologyRepository>();
Guid? guid = metrologyRepository?.GetHeaderAttachmentID(toolTypeId: 1, headerId: 1);
Assert.IsNotNull(guid);
_Logger?.LogInformation("{TestName} completed", _TestContext?.TestName);
}
[TestMethod]
public async Task GetHeaderAttachmentIDApi()
{
HttpClient? httpClient = _WebApplicationFactory?.CreateClient();
_Logger?.LogInformation("Starting Web Application");
Assert.IsTrue(httpClient is not null);
HttpResponseMessage httpResponseMessage = await httpClient.GetAsync($"api/{_ControllerName}/1/header-attachment-id?headerid=1");
Assert.IsNotNull(httpResponseMessage.Content);
_Logger?.LogInformation("{TestName} completed", _TestContext?.TestName);
}
}

View File

@ -50,6 +50,7 @@ public class UnitTestClientSettingsController
_Logger?.LogInformation("{TestName} completed", _TestContext?.TestName);
}
#pragma warning disable CS1998
[TestMethod]
public async Task GetClientSettingsApi()
{
@ -68,6 +69,7 @@ public class UnitTestClientSettingsController
#endif
_Logger?.LogInformation("{TestName} completed", _TestContext?.TestName);
}
#pragma warning restore CS1998
[TestMethod]
public void GetIpAddress()

View File

@ -247,7 +247,7 @@ public class UnitTestExportController
_Logger?.LogInformation("{TestName} completed", _TestContext?.TestName);
}
// [Ignore]
[Ignore]
[TestMethod]
public async Task GetCSVExportDat()
{

View File

@ -205,7 +205,7 @@ public class UnitTestInfinityQSV3Controller
HttpClient? httpClient = _WebApplicationFactory?.CreateClient();
_Logger?.LogInformation("Starting Web Application");
Assert.IsTrue(httpClient is not null);
string? result = await httpClient.GetStringAsync($"api/{_ControllerName}/epi-pro-temp-verification-collection/?night=44&night=46&night=52&night=54");
string? result = await httpClient.GetStringAsync($"api/{_ControllerName}/epi-pro-temp-verification-rows/?night=44&night=46&night=52&night=54");
File.WriteAllText(Path.Combine(AppContext.BaseDirectory, $"{_ControllerName}-{nameof(GetEpiProTempVerificationRows)}.json"), result);
Assert.IsNotNull(result);
_Logger?.LogInformation("{TestName} completed", _TestContext?.TestName);

View File

@ -55,7 +55,7 @@ public class UnitTestInfinityQSV4Controller
_Logger?.LogInformation("Starting Web Application");
IServiceProvider? serviceProvider = _WebApplicationFactory?.Services.CreateScope().ServiceProvider;
IInfinityQSV4Repository? infinityQSV4Repository = serviceProvider?.GetRequiredService<IInfinityQSV4Repository>();
string? result = infinityQSV4Repository?.GetCommandText("1698497987", "61", "CDE5", "5012", "575908", "");
string? result = infinityQSV4Repository?.GetCommandText("1718539249", "61", "CDE5", "5012", "575908", "");
Assert.IsNotNull(result);
_Logger?.LogInformation("{TestName} completed", _TestContext?.TestName);
NonThrowTryCatch();
@ -67,7 +67,7 @@ public class UnitTestInfinityQSV4Controller
HttpClient? httpClient = _WebApplicationFactory?.CreateClient();
_Logger?.LogInformation("Starting Web Application");
Assert.IsTrue(httpClient is not null);
string? json = await httpClient.GetStringAsync($"api/{_ControllerVersion}/{_ControllerName}/1698497987/commandText/?process=61&job=CDE5&part=5012&lot=575908&date_time=2023-02-24 15:15:00");
string? json = await httpClient.GetStringAsync($"api/{_ControllerVersion}/{_ControllerName}/1718539249/commandText/?process=61&job=CDE5&part=5012&lot=575908&date_time=2023-02-24 15:15:00");
File.WriteAllText(Path.Combine(AppContext.BaseDirectory, $"{_ControllerName}-{nameof(GetCommandText)}.sql"), json);
Assert.IsNotNull(json);
_Logger?.LogInformation("{TestName} completed", _TestContext?.TestName);
@ -80,7 +80,7 @@ public class UnitTestInfinityQSV4Controller
_Logger?.LogInformation("Starting Web Application");
IServiceProvider? serviceProvider = _WebApplicationFactory?.Services.CreateScope().ServiceProvider;
IInfinityQSV4Repository? infinityQSV4Repository = serviceProvider?.GetRequiredService<IInfinityQSV4Repository>();
Result<InfinityQSV4[]>? result = infinityQSV4Repository?.GetData("1698497987");
Result<InfinityQSV4[]>? result = infinityQSV4Repository?.GetData("1718539249");
Assert.IsNotNull(result?.Results);
Assert.IsTrue(result?.Results.Length != 0);
Assert.IsNotNull(result?.Results[0].Process);
@ -98,8 +98,8 @@ public class UnitTestInfinityQSV4Controller
HttpClient? httpClient = _WebApplicationFactory?.CreateClient();
_Logger?.LogInformation("Starting Web Application");
Assert.IsTrue(httpClient is not null);
//string? json = await httpClient.GetStringAsync($"api/{_ControllerVersion}/{_ControllerName}/1698497987 575908_2023-02-24 14-18-05.txt/data");
string? json = await httpClient.GetStringAsync($"api/{_ControllerVersion}/{_ControllerName}/1698497987/data");
//string? json = await httpClient.GetStringAsync($"api/{_ControllerVersion}/{_ControllerName}/1718539249 575908_2023-02-24 14-18-05.txt/data");
string? json = await httpClient.GetStringAsync($"api/{_ControllerVersion}/{_ControllerName}/1718539249/data");
File.WriteAllText(Path.Combine(AppContext.BaseDirectory, $"{_ControllerName}-{nameof(GetData)}.json"), json);
Result<InfinityQSV4[]>? result = System.Text.Json.JsonSerializer.Deserialize<Result<InfinityQSV4[]>>(json);
Assert.IsNotNull(result?.Results);
@ -113,7 +113,7 @@ public class UnitTestInfinityQSV4Controller
_Logger?.LogInformation("Starting Web Application");
IServiceProvider? serviceProvider = _WebApplicationFactory?.Services.CreateScope().ServiceProvider;
IInfinityQSV4Repository? infinityQSV4Repository = serviceProvider?.GetRequiredService<IInfinityQSV4Repository>();
Result<InfinityQSDescriptorV4[]>? result = infinityQSV4Repository?.GetDescriptors("1698497987");
Result<InfinityQSDescriptorV4[]>? result = infinityQSV4Repository?.GetDescriptors("1718539249");
Assert.IsNotNull(result?.Results);
Assert.IsTrue(result?.Results.Length != 0);
Assert.IsNotNull(result?.Results[0].SubGroupId);
@ -128,8 +128,8 @@ public class UnitTestInfinityQSV4Controller
HttpClient? httpClient = _WebApplicationFactory?.CreateClient();
_Logger?.LogInformation("Starting Web Application");
Assert.IsTrue(httpClient is not null);
//string? json = await httpClient.GetStringAsync($"api/{_ControllerVersion}/{_ControllerName}/1698497987 575908_2023-02-24 14-18-05.txt/descriptors");
string? json = await httpClient.GetStringAsync($"api/{_ControllerVersion}/{_ControllerName}/1698497987/descriptors");
//string? json = await httpClient.GetStringAsync($"api/{_ControllerVersion}/{_ControllerName}/1718539249 575908_2023-02-24 14-18-05.txt/descriptors");
string? json = await httpClient.GetStringAsync($"api/{_ControllerVersion}/{_ControllerName}/1718539249/descriptors");
File.WriteAllText(Path.Combine(AppContext.BaseDirectory, $"{_ControllerName}-{nameof(GetDescriptors)}.json"), json);
Result<InfinityQSDescriptorV3[]>? result = System.Text.Json.JsonSerializer.Deserialize<Result<InfinityQSDescriptorV3[]>>(json);
Assert.IsNotNull(result?.Results);
@ -143,7 +143,7 @@ public class UnitTestInfinityQSV4Controller
_Logger?.LogInformation("Starting Web Application");
IServiceProvider? serviceProvider = _WebApplicationFactory?.Services.CreateScope().ServiceProvider;
IInfinityQSV4Repository? infinityQSV4Repository = serviceProvider?.GetRequiredService<IInfinityQSV4Repository>();
Result<InfinityQSV4[]>? result = infinityQSV4Repository?.GetHeader("1698497987");
Result<InfinityQSV4[]>? result = infinityQSV4Repository?.GetHeader("1718539249");
Assert.IsNotNull(result?.Results);
Assert.IsNotNull(result?.Results[0].Part);
_Logger?.LogInformation("{TestName} completed", _TestContext?.TestName);
@ -156,7 +156,7 @@ public class UnitTestInfinityQSV4Controller
HttpClient? httpClient = _WebApplicationFactory?.CreateClient();
_Logger?.LogInformation("Starting Web Application");
Assert.IsTrue(httpClient is not null);
string? json = await httpClient.GetStringAsync($"api/{_ControllerVersion}/{_ControllerName}/1698497987/header");
string? json = await httpClient.GetStringAsync($"api/{_ControllerVersion}/{_ControllerName}/1718539249/header");
File.WriteAllText(Path.Combine(AppContext.BaseDirectory, $"{_ControllerName}-{nameof(GetHeader)}.json"), json);
Result<InfinityQSV4[]>? result = System.Text.Json.JsonSerializer.Deserialize<Result<InfinityQSV4[]>>(json);
Assert.IsNotNull(result?.Results);
@ -209,7 +209,7 @@ public class UnitTestInfinityQSV4Controller
HttpClient? httpClient = _WebApplicationFactory?.CreateClient();
_Logger?.LogInformation("Starting Web Application");
Assert.IsTrue(httpClient is not null);
string? result = await httpClient.GetStringAsync($"api/{_ControllerVersion}/{_ControllerName}/epi-pro-temp-verification-collection/?night=44&night=46&night=52&night=54");
string? result = await httpClient.GetStringAsync($"api/{_ControllerVersion}/{_ControllerName}/epi-pro-temp-verification-rows/?night=44&night=46&night=52&night=54");
File.WriteAllText(Path.Combine(AppContext.BaseDirectory, $"{_ControllerName}-{nameof(GetEpiProTempVerificationRows)}.json"), result);
Assert.IsNotNull(result);
_Logger?.LogInformation("{TestName} completed", _TestContext?.TestName);
@ -281,7 +281,11 @@ public class UnitTestInfinityQSV4Controller
List<Reactor>? reactors = infinityQSV4Repository?.GetReactors();
Assert.IsNotNull(reactors);
foreach (Reactor reactor in reactors)
{
if (reactor.LoadedRDS is null)
continue;
rdsCollection.AddRange(reactor.LoadedRDS);
}
List<string> production = new();
foreach (int rds in rdsCollection)
{

View File

@ -253,7 +253,7 @@ public class UnitTestToolTypesController
_Logger?.LogInformation("{TestName} completed", _TestContext?.TestName);
}
// [Ignore]
[Ignore]
[TestMethod]
public void OIExport()
{