public async Task GivenRequestForMultipleTags_WhenNoTagsAreStored_ThenReturnEmptyResult() { _extendedQueryTagStore.GetExtendedQueryTagsAsync(7, 0).Returns(Array.Empty <ExtendedQueryTagStoreJoinEntry>()); GetExtendedQueryTagsResponse response = await _getExtendedQueryTagsService.GetExtendedQueryTagsAsync(7, 0); await _extendedQueryTagStore.Received(1).GetExtendedQueryTagsAsync(7, 0); _urlResolver.DidNotReceiveWithAnyArgs().ResolveQueryTagErrorsUri(default);
public async Task <GetExtendedQueryTagsResponse> Handle(GetExtendedQueryTagsRequest request, CancellationToken cancellationToken) { EnsureArg.IsNotNull(request, nameof(request)); if (await AuthorizationService.CheckAccess(DataActions.Read, cancellationToken) != DataActions.Read) { throw new UnauthorizedDicomActionException(DataActions.Read); } return(await _getExtendedQueryTagsService.GetExtendedQueryTagsAsync(request.Limit, request.Offset, cancellationToken)); }