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);
}
}