public async Task GivenValidInput_WhenAddExtendedQueryTagIsInvoked_ThenShouldSucceed() { DicomTag tag = DicomTag.DeviceSerialNumber; AddExtendedQueryTagEntry entry = tag.BuildAddExtendedQueryTagEntry(); await _extendedQueryTagService.AddExtendedQueryTagAsync(new AddExtendedQueryTagEntry[] { entry }, default); _extendedQueryTagEntryValidator.ReceivedWithAnyArgs().ValidateExtendedQueryTags(default);
public async Task <AddExtendedQueryTagResponse> Handle(AddExtendedQueryTagRequest request, CancellationToken cancellationToken) { EnsureArg.IsNotNull(request, nameof(request)); if (await AuthorizationService.CheckAccess(DataActions.ManageExtendedQueryTags, cancellationToken) != DataActions.ManageExtendedQueryTags) { throw new UnauthorizedDicomActionException(DataActions.ManageExtendedQueryTags); } return(await _addExtendedQueryTagService.AddExtendedQueryTagAsync(request.ExtendedQueryTags, cancellationToken)); }