Exemplo n.º 1
0
        public void InvokeWithActionSucceeds()
        {
            _soapStub.As <IWork>()
            .Setup(s => s.Perform(It.IsAny <System.ServiceModel.Channels.Message>()))
            .Returns(new StringStream("<response />"));

            using (var response = SoapClient.Invoke(_soapStubHost.Endpoint, "urn:services.stateless.be:unit:work:perform:request", new StringStream("<request />")))
            {
                new StreamReader(response).ReadToEnd().Should().Be("<response />");
            }
        }
Exemplo n.º 2
0
        public void InvokeSucceeds()
        {
            _soapStub.As <ISolicitResponse>()
            .Setup(s => s.Request(SchemaMetadata.For <btf2_services_header>().DocumentSpec))
            .Returns(new StringStream("<response />"));

            using (var response = SoapClient.Invoke(_soapStubHost.Endpoint, new StringStream(MessageBodyFactory.Create <btf2_services_header>().OuterXml)))
            {
                new StreamReader(response).ReadToEnd().Should().Be("<response />");
            }
        }