Пример #1
0
        public void TestOperationMarshallTest()
        {
            var operation = service_model.FindOperation("TestOperation");

            var request    = InstantiateClassGenerator.Execute <TestOperationRequest>();
            var marshaller = new TestOperationRequestMarshaller();

            var internalRequest = marshaller.Marshall(request);

            TestTools.RequestValidator.Validate("TestOperation", request, internalRequest, service_model);
        }
Пример #2
0
        public void EscapedStrings()
        {
            var marshaller = new TestOperationRequestMarshaller();
            var request    = new TestOperationRequest();

            request.ContentLanguage = new List <string>(new[] { "\"English\"", "French,German", "'German'" });

            var internalRequest = marshaller.Marshall(request);

            Assert.IsTrue(internalRequest.Headers.ContainsKey(ExpectedStringHeaderKey));
            Assert.AreEqual("\"English\",\"French,German\",'German'", internalRequest.Headers[ExpectedStringHeaderKey]);
        }
Пример #3
0
        public void Enums()
        {
            var marshaller = new TestOperationRequestMarshaller();
            var request    = new TestOperationRequest();

            request.ContentLanguageEnums = new List <string> {
                LanguageEnum.English, LanguageEnum.French, LanguageEnum.German
            };

            var internalRequest = marshaller.Marshall(request);

            Assert.IsTrue(internalRequest.Headers.ContainsKey(ExpectedEnumHeaderKey));
            Assert.AreEqual("English,French,German", internalRequest.Headers[ExpectedEnumHeaderKey]);
        }