Esempio n. 1
0
 public async Task GivenNoStoredInstances_WhenRetrieveRequestForStudy_ThenNotFoundIsThrown()
 {
     await Assert.ThrowsAsync <InstanceNotFoundException>(() => _retrieveResourceService.GetInstanceResourceAsync(
                                                              new RetrieveResourceRequest(_studyInstanceUid, new[] { AcceptHeaderHelpers.CreateAcceptHeaderForGetStudy() }),
                                                              _defaultCancellationToken));
 }
Esempio n. 2
0
        public async Task GivenNoStoredInstances_WhenRetrieveRequestForStudy_ThenNotFoundIsThrown()
        {
            _instanceStore.GetInstanceIdentifiersInStudyAsync(_studyInstanceUid).Returns(new List <VersionedInstanceIdentifier>());

            await Assert.ThrowsAsync <InstanceNotFoundException>(() => _retrieveResourceService.GetInstanceResourceAsync(
                                                                     new RetrieveResourceRequest(_studyInstanceUid, new[] { AcceptHeaderHelpers.CreateAcceptHeaderForGetStudy() }),
                                                                     DefaultCancellationToken));
        }