public async Task GivenNoStoredInstances_WhenRetrieveRequestForStudy_ThenNotFoundIsThrown() { await Assert.ThrowsAsync <InstanceNotFoundException>(() => _retrieveResourceService.GetInstanceResourceAsync( new RetrieveResourceRequest(_studyInstanceUid, new[] { AcceptHeaderHelpers.CreateAcceptHeaderForGetStudy() }), _defaultCancellationToken)); }
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)); }