public async Task GivenSearchRequest_StudyInstancesLevel_MatchResult() { DicomDataset matchInstance = await PostDicomFileAsync(new DicomDataset() { { DicomTag.Modality, "MRI" }, }); var studyId = matchInstance.GetSingleValue <string>(DicomTag.StudyInstanceUID); await PostDicomFileAsync(new DicomDataset() { { DicomTag.StudyInstanceUID, studyId }, { DicomTag.Modality, "CT" }, }); using DicomWebAsyncEnumerableResponse <DicomDataset> response = await _client.QueryStudyInstanceAsync(studyId, "Modality=MRI"); Assert.Equal(KnownContentTypes.ApplicationDicomJson, response.ContentHeaders.ContentType.MediaType); DicomDataset[] datasets = await response.ToArrayAsync(); Assert.Single(datasets); ValidationHelpers.ValidateResponseDataset(QueryResource.StudyInstances, matchInstance, datasets[0]); }