public void ConfigureServicePrefix_ThrowsIfBaseAddressIsNotConfigured() { var httpClient = new HttpClient(); var dicomWebClient = new DicomWebClientClass(httpClient, null); var rootUri = new Uri(BaseUri); Assert.Throws <InvalidOperationException>(() => dicomWebClient.ConfigureServicePrefix(DicomWebServiceType.Qido, "/prefix")); }
public void ConfigureServicePrefix_SetsServicePrefix(DicomWebServiceType serviceType, string prefix) { var httpClient = new HttpClient(); var dicomWebClient = new DicomWebClientClass(httpClient, null); var rootUri = new Uri(BaseUri); dicomWebClient.ConfigureServiceUris(rootUri); dicomWebClient.ConfigureServicePrefix(serviceType, prefix); }
public void ConfigureServicePrefix_ThrowsMalformedPrefixes(DicomWebServiceType serviceType, string prefix) { var httpClient = new HttpClient(); var dicomWebClient = new DicomWebClientClass(httpClient, null); var rootUri = new Uri(BaseUri); dicomWebClient.ConfigureServiceUris(rootUri); Assert.Throws <ArgumentException>(() => dicomWebClient.ConfigureServicePrefix(serviceType, prefix)); }