|
|
|
@ -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)
|
|
|
|
|
{
|
|
|
|
|