Testing I
This commit is contained in:
@ -32,7 +32,7 @@
|
||||
<PackageReference Include="Microsoft.Extensions.Configuration.UserSecrets" Version="7.0.0" />
|
||||
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="7.0.0" />
|
||||
<PackageReference Include="Microsoft.Extensions.Hosting" Version="7.0.0" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Mvc.Testing" Version="7.0.2" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Mvc.Testing" Version="7.0.1" />
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.4.1" />
|
||||
<PackageReference Include="MSTest.TestAdapter" Version="3.0.2" />
|
||||
<PackageReference Include="MSTest.TestFramework" Version="3.0.2" />
|
||||
|
@ -43,9 +43,9 @@ public class UnitTestPinController
|
||||
IServiceProvider serviceProvider = _WebApplicationFactory.Services.CreateScope().ServiceProvider;
|
||||
IMetrologyRepository metrologyRepository = serviceProvider.GetRequiredService<IMetrologyRepository>();
|
||||
IPinRepository pinRepository = serviceProvider.GetRequiredService<IPinRepository>();
|
||||
string? cde = System.Text.Json.JsonSerializer.Serialize(new HeaderCommon { ID = 0, ToolTypeID = 0 });
|
||||
string? bioRad = System.Text.Json.JsonSerializer.Serialize(new HeaderCommon { ID = 0, ToolTypeID = 0 });
|
||||
Result<HeaderCommond[]> result = pinRepository.GetPinnedTable(metrologyRepository, id: 0, bioRad, cde);
|
||||
string? cde = System.Text.Json.JsonSerializer.Serialize(new HeaderCommon { ID = 196984, ToolTypeID = 2 });
|
||||
string? bioRad = System.Text.Json.JsonSerializer.Serialize(new HeaderCommon { ID = 321568, ToolTypeID = 1 });
|
||||
Result<HeaderCommond[]> result = pinRepository.GetPinnedTable(metrologyRepository, id: 1, bioRad, cde);
|
||||
Assert.IsNotNull(result?.Results);
|
||||
Assert.IsTrue(result.Results.Any());
|
||||
_Logger.Information($"{_TestContext?.TestName} completed");
|
||||
|
Reference in New Issue
Block a user