Рефаткоринг тестов

This commit is contained in:
Степанов Дмитрий 2024-03-12 10:02:16 +03:00
parent 84564c2a38
commit a53f5c3ac3
2 changed files with 7 additions and 5 deletions

View File

@ -35,5 +35,5 @@ public interface IProcessMapPlanDrillingClient
[Multipart]
[Post(BaseRoute + "/parse")]
Task<IApiResponse<ParserResultDto<ProcessMapPlanDrillingDto>>> Parse(int idWell, [AliasAs("files")] IEnumerable<StreamPart> streams);
Task<IApiResponse<ParserResultDto<ProcessMapPlanDrillingDto>>> Parse(int idWell, [AliasAs("file")] StreamPart stream);
}

View File

@ -11,9 +11,11 @@ public class TrajectoryParserTest
{
private const string UsingTemplateFile = "AsbCloudWebApi.Tests.Services.Trajectory.Templates";
private readonly WellRelatedParserRequest options = new(1);
private readonly TrajectoryPlanParser trajectoryPlanParser = new();
private readonly TrajectoryFactManualParser trajectoryFactManualParser = new();
[Fact]
public void Parse_trajectory_plan()
{
@ -22,8 +24,8 @@ public class TrajectoryParserTest
if (stream is null)
Assert.Fail("Файла для импорта не существует");
var trajectoryRows = trajectoryPlanParser.Parse(stream, IParserOptionsRequest.Empty());
var trajectoryRows = trajectoryPlanParser.Parse(stream, options);
Assert.Equal(3, trajectoryRows.Item.Count());
}
@ -37,7 +39,7 @@ public class TrajectoryParserTest
if (stream is null)
Assert.Fail("Файла для импорта не существует");
var trajectoryRows = trajectoryFactManualParser.Parse(stream, IParserOptionsRequest.Empty());
var trajectoryRows = trajectoryFactManualParser.Parse(stream, options);
Assert.Equal(4, trajectoryRows.Item.Count());
}