Esempio n. 1
0
            public async Task Throws_exception_on_request_with_invalid_xml_in_multipart_body()
            {
                //Arrange
                var client = GetClientWithRequestValidator(new FakeHttpClientForDataResponse());
                var invalidRequestContent = new FakeHttpClientHandlerForMultipartXml(ContentUtility.GetDirectSignatureJobRequestBodyInvalid()).GetContent();

                //Act
                await Assert.ThrowsAsync <InvalidXmlException>(async() => await client.SendAsync(GetHttpRequestMessage(invalidRequestContent)).ConfigureAwait(false)).ConfigureAwait(false);
            }
Esempio n. 2
0
            public async Task Accepts_request_with_xml_in_multipart()
            {
                //Arrange
                var client = GetClientWithRequestValidator(new FakeHttpClientForDataResponse());
                var validRequestContent = new FakeHttpClientHandlerForMultipartXml(ContentUtility.GetDirectSignatureJobRequestBody()).GetContent();

                //Act
                await client.SendAsync(GetHttpRequestMessage(validRequestContent)).ConfigureAwait(false);

                //Assert
            }