Skip to content

Commit

Permalink
fix: validation message when uploading 2nd time for extract (#1542)
Browse files Browse the repository at this point in the history
  • Loading branch information
rikdepeuter authored Sep 23, 2024
1 parent b91cb10 commit 0ef3d8f
Show file tree
Hide file tree
Showing 32 changed files with 355 additions and 64 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public override async Task<TResponse> Handle(TRequest request, CancellationToken
Dispatch = async (command, token) => await HandleInitializer(command, token);
Queue = async (command, token) => await HandleInitializer(command, token);

var response = await HandleAsync(request, cancellationToken);
var response = await InnerHandleAsync(request, cancellationToken);
return response;

async Task HandleInitializer(Command command, CancellationToken token)
Expand Down
4 changes: 2 additions & 2 deletions src/RoadRegistry.BackOffice.Abstractions/RequestHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ protected RequestHandler(ILogger logger)

public virtual async Task<TResponse> Handle(TRequest request, CancellationToken cancellationToken)
{
var response = await HandleAsync(request, cancellationToken);
var response = await InnerHandleAsync(request, cancellationToken);
return response;
}

public abstract Task<TResponse> HandleAsync(TRequest request, CancellationToken cancellationToken);
protected abstract Task<TResponse> InnerHandleAsync(TRequest request, CancellationToken cancellationToken);
}
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public DownloadEditorRequestHandler(
_cache = cache;
}

public override async Task<DownloadEditorResponse> HandleAsync(DownloadEditorRequest request, CancellationToken cancellationToken)
protected override async Task<DownloadEditorResponse> InnerHandleAsync(DownloadEditorRequest request, CancellationToken cancellationToken)
{
var info = await _context.RoadNetworkInfo.SingleOrDefaultAsync(cancellationToken);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public DownloadProductRequestHandler(
_cache = cache;
}

public override async Task<DownloadProductResponse> HandleAsync(DownloadProductRequest request, CancellationToken cancellationToken)
protected override async Task<DownloadProductResponse> InnerHandleAsync(DownloadProductRequest request, CancellationToken cancellationToken)
{
var info = await _context.RoadNetworkInfo.SingleOrDefaultAsync(cancellationToken);
if (info is null || !info.CompletedImport)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public CloseRoadNetworkExtractRequestHandler(
_editorContext = editorContext;
}

public override async Task<CloseRoadNetworkExtractResponse> HandleAsync(CloseRoadNetworkExtractRequest request, CancellationToken cancellationToken)
protected override async Task<CloseRoadNetworkExtractResponse> InnerHandleAsync(CloseRoadNetworkExtractRequest request, CancellationToken cancellationToken)
{
var extractRequest = await _editorContext.ExtractRequests.FindAsync(request.DownloadId.ToGuid(), cancellationToken: cancellationToken);
if (extractRequest is null)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public DownloadExtractByContourRequestHandler(
_reader = reader ?? throw new ArgumentNullException(nameof(reader));
}

public override async Task<DownloadExtractByContourResponse> HandleRequestAsync(DownloadExtractByContourRequest request, DownloadId downloadId, string randomExternalRequestId, CancellationToken cancellationToken)
protected override async Task<DownloadExtractByContourResponse> HandleRequestAsync(DownloadExtractByContourRequest request, DownloadId downloadId, string randomExternalRequestId, CancellationToken cancellationToken)
{
var geometry = _reader.Read(request.Contour).ToMultiPolygon();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public DownloadExtractByFileRequestHandler(
_translator = translator;
}

public override async Task<DownloadExtractByFileResponse> HandleRequestAsync(DownloadExtractByFileRequest request, DownloadId downloadId, string randomExternalRequestId, CancellationToken cancellationToken)
protected override async Task<DownloadExtractByFileResponse> HandleRequestAsync(DownloadExtractByFileRequest request, DownloadId downloadId, string randomExternalRequestId, CancellationToken cancellationToken)
{
var contour = _translator.Translate(request.ShpFile, request.Buffer);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public DownloadExtractByNisCodeRequestHandler(
{
}

public override async Task<DownloadExtractByNisCodeResponse> HandleRequestAsync(DownloadExtractByNisCodeRequest request, DownloadId downloadId, string randomExternalRequestId, CancellationToken cancellationToken)
protected override async Task<DownloadExtractByNisCodeResponse> HandleRequestAsync(DownloadExtractByNisCodeRequest request, DownloadId downloadId, string randomExternalRequestId, CancellationToken cancellationToken)
{
var municipalityGeometry = await _context.MunicipalityGeometries.SingleOrDefaultAsync(x => x.NisCode == request.NisCode, cancellationToken)
?? throw new DownloadExtractByNisCodeNotFoundException("Could not find details about the supplied NIS code");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public DownloadExtractRequestHandler(
_reader = reader ?? throw new ArgumentNullException(nameof(reader));
}

public override async Task<DownloadExtractResponse> HandleRequestAsync(DownloadExtractRequest request, DownloadId downloadId, string randomExternalRequestId, CancellationToken cancellationToken)
protected override async Task<DownloadExtractResponse> HandleRequestAsync(DownloadExtractRequest request, DownloadId downloadId, string randomExternalRequestId, CancellationToken cancellationToken)
{
var message = new RequestRoadNetworkExtract
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public DownloadFileContentRequestHandler(
_client = client ?? throw new ArgumentNullException(nameof(client));
}

public override async Task<DownloadFileContentResponse> HandleAsync(DownloadFileContentRequest request, CancellationToken cancellationToken)
protected override async Task<DownloadFileContentResponse> InnerHandleAsync(DownloadFileContentRequest request, CancellationToken cancellationToken)
{
if (request.DownloadId is null)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public ExtractDetailsRequestHandler(
{
}

public override async Task<ExtractDetailsResponse> HandleAsync(ExtractDetailsRequest request, CancellationToken cancellationToken)
protected override async Task<ExtractDetailsResponse> InnerHandleAsync(ExtractDetailsRequest request, CancellationToken cancellationToken)
{
var record = await Context.ExtractRequests.FindAsync(new object[] { request.DownloadId.ToGuid() }, cancellationToken);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ namespace RoadRegistry.BackOffice.Handlers.Extracts;

using Abstractions;
using Editor.Schema;
using Editor.Schema.Extracts;
using Framework;
using Microsoft.Extensions.Logging;

Expand All @@ -20,13 +19,13 @@ protected ExtractRequestHandler(
_context = context ?? throw new ArgumentNullException(nameof(context));
}

public override async Task<TResponse> HandleAsync(TRequest request, CancellationToken cancellationToken)
protected override async Task<TResponse> InnerHandleAsync(TRequest request, CancellationToken cancellationToken)
{
var downloadId = new DownloadId(Guid.NewGuid());
var randomExternalRequestId = Guid.NewGuid().ToString("N");

return await HandleRequestAsync(request, downloadId, randomExternalRequestId, cancellationToken);
}

public abstract Task<TResponse> HandleRequestAsync(TRequest request, DownloadId downloadId, string randomExternalRequestId, CancellationToken cancellationToken);
protected abstract Task<TResponse> HandleRequestAsync(TRequest request, DownloadId downloadId, string randomExternalRequestId, CancellationToken cancellationToken);
}
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public GetOverlappingTransactionZonesByContourRequestHandler(
_context = context;
}

public override async Task<GetOverlappingTransactionZonesByContourResponse> HandleAsync(GetOverlappingTransactionZonesByContourRequest request, CancellationToken cancellationToken)
protected override async Task<GetOverlappingTransactionZonesByContourResponse> InnerHandleAsync(GetOverlappingTransactionZonesByContourRequest request, CancellationToken cancellationToken)
{
var geometry = new WKTReader().Read(request.Contour);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public GetOverlappingTransactionZonesByNisCodeRequestHandler(

private record ExtractRequestIntersection(ExtractRequestRecord ExtractRequest, Geometry Intersection);

public override async Task<GetOverlappingTransactionZonesByNisCodeResponse> HandleAsync(GetOverlappingTransactionZonesByNisCodeRequest request, CancellationToken cancellationToken)
protected override async Task<GetOverlappingTransactionZonesByNisCodeResponse> InnerHandleAsync(GetOverlappingTransactionZonesByNisCodeRequest request, CancellationToken cancellationToken)
{
var extractRequestsQuery = _context.ExtractRequests.Where(x => !x.IsInformative);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public GetOverlappingTransactionZonesGeoJsonRequestHandler(
_context = context;
}

public override async Task<GetOverlappingTransactionZonesGeoJsonResponse> HandleAsync(GetOverlappingTransactionZonesGeoJsonRequest request, CancellationToken cancellationToken)
protected override async Task<GetOverlappingTransactionZonesGeoJsonResponse> InnerHandleAsync(GetOverlappingTransactionZonesGeoJsonRequest request, CancellationToken cancellationToken)
{
var availableOverlaps = await (
from overlap in _context.ExtractRequestOverlaps
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,12 @@ public GetTransactionZonesGeoJsonRequestHandler(
_context = context;
}

public override async Task<GetTransactionZonesGeoJsonResponse> HandleAsync(GetTransactionZonesGeoJsonRequest request, CancellationToken cancellationToken)
protected override async Task<GetTransactionZonesGeoJsonResponse> InnerHandleAsync(GetTransactionZonesGeoJsonRequest request, CancellationToken cancellationToken)
{
var transactionZones = await _context.ExtractRequests
.Where(x => !x.IsInformative)
.ToListAsync(cancellationToken);

return new GetTransactionZonesGeoJsonResponse
{
FeatureCollection = new FeatureCollection(transactionZones
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public UploadExtractRequestHandler(
_context = context ?? throw new EditorContextNotFoundException(nameof(context));
}

public override async Task<UploadExtractResponse> HandleAsync(UploadExtractRequest request, CancellationToken cancellationToken)
protected override async Task<UploadExtractResponse> InnerHandleAsync(UploadExtractRequest request, CancellationToken cancellationToken)
{
if (!ContentType.TryParse(request.Archive.ContentType, out var parsedContentType) || !SupportedContentTypes.Contains(parsedContentType))
{
Expand All @@ -61,20 +61,21 @@ public override async Task<UploadExtractResponse> HandleAsync(UploadExtractReque
throw new InvalidGuidValidationException(nameof(request.DownloadId));
}

var extractRequest = await _context.ExtractRequests.FindAsync(new object[] { downloadId.ToGuid() }, cancellationToken);
if (extractRequest is null)
var download = await _context.ExtractDownloads.FindAsync(new object[] { downloadId.ToGuid() }, cancellationToken);
if (download is null)
{
throw new ExtractDownloadNotFoundException(downloadId);
}
if (extractRequest.IsInformative)

var previousUpload = await _context.ExtractUploads.IncludeLocalSingleOrDefaultAsync(x => x.RequestId == download.RequestId, cancellationToken);
if (previousUpload is not null)
{
throw new ExtractRequestMarkedInformativeException(downloadId);
throw new CanNotUploadRoadNetworkExtractChangesArchiveForSameDownloadMoreThanOnceException();
}

var download = await _context.ExtractDownloads.FindAsync(new object[] { downloadId.ToGuid() }, cancellationToken);
if (download is null)
if (download.IsInformative)
{
throw new ExtractDownloadNotFoundException(downloadId);
throw new ExtractRequestMarkedInformativeException(downloadId);
}

await using var readStream = await request.Archive.ReadStream.CopyToNewMemoryStream(cancellationToken);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public UploadStatusRequestHandler(
{
}

public override async Task<UploadStatusResponse> HandleAsync(UploadStatusRequest request, CancellationToken cancellationToken)
protected override async Task<UploadStatusResponse> InnerHandleAsync(UploadStatusRequest request, CancellationToken cancellationToken)
{
if (!Guid.TryParseExact(request.UploadId, "N", out var parsedUploadId))
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public ValidateWktContourRequestHandler(
_reader = reader ?? throw new ArgumentNullException(nameof(reader));
}

public override Task<ValidateWktContourResponse> HandleAsync(ValidateWktContourRequest request, CancellationToken cancellationToken)
protected override Task<ValidateWktContourResponse> InnerHandleAsync(ValidateWktContourRequest request, CancellationToken cancellationToken)
{
var geometry = _reader.Read(request.Contour);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public GetOrganizationsRequestHandler(CommandHandlerDispatcher dispatcher,
_fileEncoding = fileEncoding;
}

public override async Task<GetOrganizationsResponse> HandleAsync(GetOrganizationsRequest request, CancellationToken cancellationToken)
protected override async Task<GetOrganizationsResponse> InnerHandleAsync(GetOrganizationsRequest request, CancellationToken cancellationToken)
{
var organizationRecordReader = new OrganizationDbaseRecordReader(_manager, _fileEncoding);

Expand All @@ -38,7 +38,7 @@ await _editorContext.Organizations
)
.Select(organization => organizationRecordReader.Read(organization.DbaseRecord, organization.DbaseSchemaVersion))
.ToList();

return new GetOrganizationsResponse(organizations);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public RoadSegmentDetailRequestHandler(CommandHandlerDispatcher dispatcher,
_streetNameCache = streetNameCache;
}

public override async Task<RoadSegmentDetailResponse> HandleAsync(RoadSegmentDetailRequest request, CancellationToken cancellationToken)
protected override async Task<RoadSegmentDetailResponse> InnerHandleAsync(RoadSegmentDetailRequest request, CancellationToken cancellationToken)
{
var roadSegment = await _editorContext.RoadSegments
.IgnoreQueryFilters()
Expand Down Expand Up @@ -68,7 +68,7 @@ string GetStreetName(int? id)
.ToListAsync(cancellationToken: cancellationToken))
.Select(x => new RoadSegmentSurfaceAttributeDbaseRecord().FromBytes(x.DbaseRecord, _manager, _fileEncoding))
.ToList();

var widths = (await _editorContext.RoadSegmentWidthAttributes
.Where(x => x.RoadSegmentId == roadSegment.Id)
.ToListAsync(cancellationToken: cancellationToken))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public DownloadExtractRequestHandler(
_client = client ?? throw new BlobClientNotFoundException(nameof(client));
}

public override async Task<DownloadExtractResponse> HandleAsync(DownloadExtractRequest request, CancellationToken cancellationToken)
protected override async Task<DownloadExtractResponse> InnerHandleAsync(DownloadExtractRequest request, CancellationToken cancellationToken)
{
if (!ArchiveId.Accepts(request.Identifier))
throw new ValidationException(new[]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public UploadExtractRequestHandler(
_beforeFeatureCompareZipArchiveCleaner = beforeFeatureCompareZipArchiveCleaner.ThrowIfNull();
}

public override async Task<UploadExtractResponse> HandleAsync(UploadExtractRequest request, CancellationToken cancellationToken)
protected override async Task<UploadExtractResponse> InnerHandleAsync(UploadExtractRequest request, CancellationToken cancellationToken)
{
if (!ContentType.TryParse(request.Archive.ContentType, out var parsed) || !SupportedContentTypes.Contains(parsed))
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,22 +6,13 @@ namespace RoadRegistry.BackOffice.Extracts;
[Serializable]
public class CanNotUploadRoadNetworkExtractChangesArchiveForSameDownloadMoreThanOnceException : Exception
{
public CanNotUploadRoadNetworkExtractChangesArchiveForSameDownloadMoreThanOnceException(ExternalExtractRequestId externalRequestId, ExtractRequestId requestId, DownloadId downloadId, UploadId uploadId)
public CanNotUploadRoadNetworkExtractChangesArchiveForSameDownloadMoreThanOnceException()
: base("Can not upload a road network extract changes archive for the same download more than once.")
{
ExternalRequestId = externalRequestId;
RequestId = requestId;
DownloadId = downloadId;
UploadId = uploadId;
}

protected CanNotUploadRoadNetworkExtractChangesArchiveForSameDownloadMoreThanOnceException(SerializationInfo serializationInfo, StreamingContext streamingContext)
: base(serializationInfo, streamingContext)

Check warning on line 15 in src/RoadRegistry.BackOffice/Extracts/CanNotUploadRoadNetworkExtractChangesArchiveForSameDownloadMoreThanOnceException.cs

View workflow job for this annotation

GitHub Actions / Build BackOffice Command Host / build-image

'Exception.Exception(SerializationInfo, StreamingContext)' is obsolete: 'This API supports obsolete formatter-based serialization. It should not be called or extended by application code.' (https://aka.ms/dotnet-warnings/SYSLIB0051)

Check warning on line 15 in src/RoadRegistry.BackOffice/Extracts/CanNotUploadRoadNetworkExtractChangesArchiveForSameDownloadMoreThanOnceException.cs

View workflow job for this annotation

GitHub Actions / Build BackOffice Event Host / build-image

'Exception.Exception(SerializationInfo, StreamingContext)' is obsolete: 'This API supports obsolete formatter-based serialization. It should not be called or extended by application code.' (https://aka.ms/dotnet-warnings/SYSLIB0051)

Check warning on line 15 in src/RoadRegistry.BackOffice/Extracts/CanNotUploadRoadNetworkExtractChangesArchiveForSameDownloadMoreThanOnceException.cs

View workflow job for this annotation

GitHub Actions / Build BackOffice Event Host / build-image

'Exception.Exception(SerializationInfo, StreamingContext)' is obsolete: 'This API supports obsolete formatter-based serialization. It should not be called or extended by application code.' (https://aka.ms/dotnet-warnings/SYSLIB0051)

Check warning on line 15 in src/RoadRegistry.BackOffice/Extracts/CanNotUploadRoadNetworkExtractChangesArchiveForSameDownloadMoreThanOnceException.cs

View workflow job for this annotation

GitHub Actions / Build BackOffice Extract Host / build-image

'Exception.Exception(SerializationInfo, StreamingContext)' is obsolete: 'This API supports obsolete formatter-based serialization. It should not be called or extended by application code.' (https://aka.ms/dotnet-warnings/SYSLIB0051)

Check warning on line 15 in src/RoadRegistry.BackOffice/Extracts/CanNotUploadRoadNetworkExtractChangesArchiveForSameDownloadMoreThanOnceException.cs

View workflow job for this annotation

GitHub Actions / Build Lambda Snapshot / build-lambda

'Exception.Exception(SerializationInfo, StreamingContext)' is obsolete: 'This API supports obsolete formatter-based serialization. It should not be called or extended by application code.' (https://aka.ms/dotnet-warnings/SYSLIB0051)

Check warning on line 15 in src/RoadRegistry.BackOffice/Extracts/CanNotUploadRoadNetworkExtractChangesArchiveForSameDownloadMoreThanOnceException.cs

View workflow job for this annotation

GitHub Actions / Build Lambda Snapshot / build-lambda

'Exception.Exception(SerializationInfo, StreamingContext)' is obsolete: 'This API supports obsolete formatter-based serialization. It should not be called or extended by application code.' (https://aka.ms/dotnet-warnings/SYSLIB0051)

Check warning on line 15 in src/RoadRegistry.BackOffice/Extracts/CanNotUploadRoadNetworkExtractChangesArchiveForSameDownloadMoreThanOnceException.cs

View workflow job for this annotation

GitHub Actions / Build Producer Snapshot Projection Host / build-image

'Exception.Exception(SerializationInfo, StreamingContext)' is obsolete: 'This API supports obsolete formatter-based serialization. It should not be called or extended by application code.' (https://aka.ms/dotnet-warnings/SYSLIB0051)

Check warning on line 15 in src/RoadRegistry.BackOffice/Extracts/CanNotUploadRoadNetworkExtractChangesArchiveForSameDownloadMoreThanOnceException.cs

View workflow job for this annotation

GitHub Actions / Build Product Projection Host / build-image

'Exception.Exception(SerializationInfo, StreamingContext)' is obsolete: 'This API supports obsolete formatter-based serialization. It should not be called or extended by application code.' (https://aka.ms/dotnet-warnings/SYSLIB0051)

Check warning on line 15 in src/RoadRegistry.BackOffice/Extracts/CanNotUploadRoadNetworkExtractChangesArchiveForSameDownloadMoreThanOnceException.cs

View workflow job for this annotation

GitHub Actions / Build WMS Projection Host / build-image

'Exception.Exception(SerializationInfo, StreamingContext)' is obsolete: 'This API supports obsolete formatter-based serialization. It should not be called or extended by application code.' (https://aka.ms/dotnet-warnings/SYSLIB0051)

Check warning on line 15 in src/RoadRegistry.BackOffice/Extracts/CanNotUploadRoadNetworkExtractChangesArchiveForSameDownloadMoreThanOnceException.cs

View workflow job for this annotation

GitHub Actions / Build WMS Projection Host / build-image

'Exception.Exception(SerializationInfo, StreamingContext)' is obsolete: 'This API supports obsolete formatter-based serialization. It should not be called or extended by application code.' (https://aka.ms/dotnet-warnings/SYSLIB0051)

Check warning on line 15 in src/RoadRegistry.BackOffice/Extracts/CanNotUploadRoadNetworkExtractChangesArchiveForSameDownloadMoreThanOnceException.cs

View workflow job for this annotation

GitHub Actions / Build Sync Host / build-image

'Exception.Exception(SerializationInfo, StreamingContext)' is obsolete: 'This API supports obsolete formatter-based serialization. It should not be called or extended by application code.' (https://aka.ms/dotnet-warnings/SYSLIB0051)
{
}

public DownloadId DownloadId { get; }
public ExternalExtractRequestId ExternalRequestId { get; }
public ExtractRequestId RequestId { get; }
public UploadId UploadId { get; }
}
}
3 changes: 1 addition & 2 deletions src/RoadRegistry.BackOffice/Extracts/RoadNetworkExtract.cs
Original file line number Diff line number Diff line change
Expand Up @@ -155,8 +155,7 @@ public RoadNetworkExtractUpload Upload(DownloadId downloadId, UploadId uploadId,
_externalExtractRequestId, Id, downloadId, _requestedDownloads[^1], uploadId);

if (_knownUploads.Count == 1)
throw new CanNotUploadRoadNetworkExtractChangesArchiveForSameDownloadMoreThanOnceException(
_externalExtractRequestId, Id, downloadId, uploadId);
throw new CanNotUploadRoadNetworkExtractChangesArchiveForSameDownloadMoreThanOnceException();

Apply(new RoadNetworkExtractChangesArchiveUploaded
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public async Task WhenOverlap_ThenReturnExpectedResult()

// Act
var handler = new GetOverlappingTransactionZonesByContourRequestHandler(editorContext, null, new NullLogger<DownloadExtractByContourRequestHandler>());
var result = await handler.HandleAsync(request, CancellationToken.None);
var result = await handler.Handle(request, CancellationToken.None);

// Assert
result.DownloadIds.Should().HaveCount(1);
Expand Down Expand Up @@ -81,7 +81,7 @@ public async Task WhenOverlapWithInformativeExtract_ThenReturnExpectedResult()

// Act
var handler = new GetOverlappingTransactionZonesByContourRequestHandler(editorContext, null, new NullLogger<DownloadExtractByContourRequestHandler>());
var result = await handler.HandleAsync(request, CancellationToken.None);
var result = await handler.Handle(request, CancellationToken.None);

// Assert
result.DownloadIds.Should().HaveCount(1);
Expand Down Expand Up @@ -112,7 +112,7 @@ public async Task WhenNoOverlap_ThenNone()

// Act
var handler = new GetOverlappingTransactionZonesByContourRequestHandler(editorContext, null, new NullLogger<DownloadExtractByContourRequestHandler>());
var result = await handler.HandleAsync(request, CancellationToken.None);
var result = await handler.Handle(request, CancellationToken.None);

// Assert
result.DownloadIds.Should().BeEmpty();
Expand Down Expand Up @@ -142,7 +142,7 @@ public async Task WhenOverlapOnlyOnTheBorder_ThenNone()

// Act
var handler = new GetOverlappingTransactionZonesByContourRequestHandler(editorContext, null, new NullLogger<DownloadExtractByContourRequestHandler>());
var result = await handler.HandleAsync(request, CancellationToken.None);
var result = await handler.Handle(request, CancellationToken.None);

// Assert
result.DownloadIds.Should().BeEmpty();
Expand Down
Loading

0 comments on commit 0ef3d8f

Please sign in to comment.