Esempio n. 1
0
 public RemoraOperation()
 {
     OperationId = Guid.NewGuid();
     Request = new RemoraRequest();
     Response = new RemoraResponse();
     ExecutionProperties = new Dictionary<string, object>();
     CreatedAtUtc = DateTime.UtcNow;
 }
Esempio n. 2
0
        public void It_should_extract_soap_action_name()
        {
            var message = new RemoraRequest
                              {
                                  ContentEncoding = Encoding.UTF8,
                                  Data = LoadSample("SimpleHelloWorldRequest.xml").ReadFully(0)
                              };

            var document = _transformer.LoadSoapDocument(message);
            Assert.That(_transformer.GetSoapActionName(document), Is.EqualTo("HelloWorldRequest"));
        }
Esempio n. 3
0
        public void It_should_get_headers()
        {
            var message = new RemoraRequest
                              {
                                  ContentEncoding = Encoding.UTF8,
                                  Data = LoadSample("SimpleHelloWorldRequest.xml").ReadFully(0)
                              };

            var doc = _transformer.LoadSoapDocument(message);
            var result = _transformer.GetHeaders(doc);
            Assert.That(result.Name.LocalName, Is.EqualTo("Header"));
        }
Esempio n. 4
0
        public void It_should_load_a_soap_document()
        {
            var message = new RemoraRequest
                              {
                                  ContentEncoding = Encoding.UTF8,
                                  Data = LoadSample("SimpleHelloWorldRequest.xml").ReadFully(0)
                              };

            var result = _transformer.LoadSoapDocument(message);
            Assert.That(result.Descendants(SoapTransformer.SoapEnvelopeNamespaceLinq + "Body").Count(), Is.EqualTo(1));
        }
Esempio n. 5
0
        public void It_should_save_a_soap_document()
        {
            var refDoc = XDocument.Load(LoadSample("SimpleHelloWorldRequest.xml"));

            var message = new RemoraRequest
                              {
                                  ContentEncoding = Encoding.UTF8,
                              };

            _transformer.SaveSoapDocument(message, refDoc);
            Assert.That(message.GetDataAsString(), Is.EqualTo(refDoc.ToString()));
        }