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);
Пример #2
0
        public async Task <IActionResult> GetTagsAsync([FromQuery] PaginationOptions options)
        {
            // TODO: Enforce the above data annotations with ModelState.IsValid or use the [ApiController] attribute
            // for automatic error generation. However, we should change all errors across the API surface.
            _logger.LogInformation("DICOM Web Get Extended Query Tag request received for all extended query tags");

            EnsureArg.IsNotNull(options, nameof(options));
            EnsureFeatureIsEnabled();
            GetExtendedQueryTagsResponse response = await _mediator.GetExtendedQueryTagsAsync(
                options.Limit,
                options.Offset,
                HttpContext.RequestAborted);

            return(StatusCode(
                       (int)HttpStatusCode.OK, response.ExtendedQueryTags));
        }