ready to test

This commit is contained in:
2023-11-07 09:33:57 -07:00
parent 03bd20fc8c
commit 81a0ef2adc
16 changed files with 282 additions and 36 deletions

View File

@ -213,4 +213,35 @@ public class UnitTestInfinityQSV3Controller
NonThrowTryCatch();
}
#if (!DEBUG)
[Ignore]
#endif
[TestMethod]
public void GetEpiProTempVerification()
{
_Logger?.LogInformation("Starting Web Application");
IServiceProvider? serviceProvider = _WebApplicationFactory?.Services.CreateScope().ServiceProvider;
IInfinityQSV3Repository? infinityQSV3Repository = serviceProvider?.GetRequiredService<IInfinityQSV3Repository>();
string? result = infinityQSV3Repository?.GetEpiProTempVerification();
Assert.IsNotNull(result);
_Logger?.LogInformation("{TestName} completed", _TestContext?.TestName);
NonThrowTryCatch();
}
#if (!DEBUG)
[Ignore]
#endif
[TestMethod]
public async Task GetEpiProTempVerificationApi()
{
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");
File.WriteAllText(Path.Combine(AppContext.BaseDirectory, $"{_ControllerName}-{nameof(GetEpiProTempVerification)}.html"), result);
Assert.IsNotNull(result);
_Logger?.LogInformation("{TestName} completed", _TestContext?.TestName);
NonThrowTryCatch();
}
}