awaiting-disposition-header-attachment-id
This commit is contained in:
@ -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);
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user