Layer with EpiProTempVerificationRows

This commit is contained in:
2023-11-14 10:27:21 -07:00
parent cff2e06f68
commit 7e16ee7f98
8 changed files with 182 additions and 49 deletions

View File

@ -186,6 +186,32 @@ public class UnitTestInfinityQSV3Controller
NonThrowTryCatch();
}
[TestMethod]
public void GetEpiProTempVerificationRows()
{
_Logger?.LogInformation("Starting Web Application");
int[] night = new int[] { 44, 46, 52, 54 };
IServiceProvider? serviceProvider = _WebApplicationFactory?.Services.CreateScope().ServiceProvider;
IInfinityQSV3Repository? infinityQSV3Repository = serviceProvider?.GetRequiredService<IInfinityQSV3Repository>();
List<string[]>? results = infinityQSV3Repository?.GetEpiProTempVerificationRows(night);
Assert.IsNotNull(results);
_Logger?.LogInformation("{TestName} completed", _TestContext?.TestName);
NonThrowTryCatch();
}
[TestMethod]
public async Task GetEpiProTempVerificationRowsApi()
{
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");
File.WriteAllText(Path.Combine(AppContext.BaseDirectory, $"{_ControllerName}-{nameof(GetEpiProTempVerificationRows)}.json"), result);
Assert.IsNotNull(result);
_Logger?.LogInformation("{TestName} completed", _TestContext?.TestName);
NonThrowTryCatch();
}
[TestMethod]
public void GetEpiProTempVerification()
{