private static async Task Qido(Message message, CancellationToken token) { string relativeUrl = Encoding.UTF8.GetString(message.Body); await client.QueryWithBadRequest(relativeUrl, cancellationToken : token); return; }
public async Task GivenSearchRequest_WithUnsupportedTag_ReturnBadRequest() { DicomWebException <string> exception = await Assert.ThrowsAsync <DicomWebException <string> >( () => _client.QueryWithBadRequest("/studies?Modality=CT")); Assert.Equal(HttpStatusCode.BadRequest, exception.StatusCode); Assert.Equal(exception.Value, string.Format(DicomCoreResource.UnsupportedSearchParameter, "Modality")); }
private static void ProcessMessageWithQueryUrl(byte[] message) { DicomWebResponse <string> response = client.QueryWithBadRequest(Encoding.UTF8.GetString(message)).Result; }