/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the route53-2013-04-01.normal.json service model. */ using System; using System.Globalization; using System.IO; using System.Linq; using System.Text; using Microsoft.VisualStudio.TestTools.UnitTesting; using Amazon.Route53; using Amazon.Route53.Model; using Amazon.Route53.Model.Internal.MarshallTransformations; using Amazon.Runtime.Internal.Transform; using Amazon.Util; using ServiceClientGenerator; using AWSSDK_DotNet35.UnitTests.TestTools; namespace AWSSDK_DotNet35.UnitTests.Marshalling { [TestClass] public partial class Route53MarshallingTests { static readonly ServiceModel service_model = Utils.LoadServiceModel("route53"); [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void ActivateKeySigningKeyMarshallTest() { var operation = service_model.FindOperation("ActivateKeySigningKey"); var request = InstantiateClassGenerator.Execute(); var marshaller = new ActivateKeySigningKeyRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("ActivateKeySigningKey", request, internalRequest, service_model); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"} } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(); webResponse.ContentLength = payloadResponse.Length; var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), false, webResponse); ResponseUnmarshaller unmarshaller = ActivateKeySigningKeyResponseUnmarshaller.Instance; var response = unmarshaller.Unmarshall(context) as ActivateKeySigningKeyResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void ActivateKeySigningKey_ConcurrentModificationExceptionMarshallTest() { var operation = service_model.FindOperation("ActivateKeySigningKey"); var request = InstantiateClassGenerator.Execute(); var marshaller = new ActivateKeySigningKeyRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("ActivateKeySigningKey", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("ConcurrentModificationException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = ActivateKeySigningKeyResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void ActivateKeySigningKey_InvalidInputExceptionMarshallTest() { var operation = service_model.FindOperation("ActivateKeySigningKey"); var request = InstantiateClassGenerator.Execute(); var marshaller = new ActivateKeySigningKeyRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("ActivateKeySigningKey", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("InvalidInputException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = ActivateKeySigningKeyResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void ActivateKeySigningKey_InvalidKeySigningKeyStatusExceptionMarshallTest() { var operation = service_model.FindOperation("ActivateKeySigningKey"); var request = InstantiateClassGenerator.Execute(); var marshaller = new ActivateKeySigningKeyRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("ActivateKeySigningKey", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("InvalidKeySigningKeyStatusException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = ActivateKeySigningKeyResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void ActivateKeySigningKey_InvalidKMSArnExceptionMarshallTest() { var operation = service_model.FindOperation("ActivateKeySigningKey"); var request = InstantiateClassGenerator.Execute(); var marshaller = new ActivateKeySigningKeyRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("ActivateKeySigningKey", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("InvalidKMSArnException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = ActivateKeySigningKeyResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void ActivateKeySigningKey_InvalidSigningStatusExceptionMarshallTest() { var operation = service_model.FindOperation("ActivateKeySigningKey"); var request = InstantiateClassGenerator.Execute(); var marshaller = new ActivateKeySigningKeyRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("ActivateKeySigningKey", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("InvalidSigningStatusException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = ActivateKeySigningKeyResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void ActivateKeySigningKey_NoSuchKeySigningKeyExceptionMarshallTest() { var operation = service_model.FindOperation("ActivateKeySigningKey"); var request = InstantiateClassGenerator.Execute(); var marshaller = new ActivateKeySigningKeyRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("ActivateKeySigningKey", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("NoSuchKeySigningKeyException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = ActivateKeySigningKeyResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void AssociateVPCWithHostedZoneMarshallTest() { var operation = service_model.FindOperation("AssociateVPCWithHostedZone"); var request = InstantiateClassGenerator.Execute(); var marshaller = new AssociateVPCWithHostedZoneRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("AssociateVPCWithHostedZone", request, internalRequest, service_model); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"} } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(); webResponse.ContentLength = payloadResponse.Length; var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), false, webResponse); ResponseUnmarshaller unmarshaller = AssociateVPCWithHostedZoneResponseUnmarshaller.Instance; var response = unmarshaller.Unmarshall(context) as AssociateVPCWithHostedZoneResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void AssociateVPCWithHostedZone_ConflictingDomainExistsExceptionMarshallTest() { var operation = service_model.FindOperation("AssociateVPCWithHostedZone"); var request = InstantiateClassGenerator.Execute(); var marshaller = new AssociateVPCWithHostedZoneRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("AssociateVPCWithHostedZone", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("ConflictingDomainExistsException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = AssociateVPCWithHostedZoneResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void AssociateVPCWithHostedZone_InvalidInputExceptionMarshallTest() { var operation = service_model.FindOperation("AssociateVPCWithHostedZone"); var request = InstantiateClassGenerator.Execute(); var marshaller = new AssociateVPCWithHostedZoneRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("AssociateVPCWithHostedZone", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("InvalidInputException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = AssociateVPCWithHostedZoneResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void AssociateVPCWithHostedZone_InvalidVPCIdExceptionMarshallTest() { var operation = service_model.FindOperation("AssociateVPCWithHostedZone"); var request = InstantiateClassGenerator.Execute(); var marshaller = new AssociateVPCWithHostedZoneRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("AssociateVPCWithHostedZone", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("InvalidVPCIdException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = AssociateVPCWithHostedZoneResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void AssociateVPCWithHostedZone_LimitsExceededExceptionMarshallTest() { var operation = service_model.FindOperation("AssociateVPCWithHostedZone"); var request = InstantiateClassGenerator.Execute(); var marshaller = new AssociateVPCWithHostedZoneRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("AssociateVPCWithHostedZone", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("LimitsExceededException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = AssociateVPCWithHostedZoneResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void AssociateVPCWithHostedZone_NoSuchHostedZoneExceptionMarshallTest() { var operation = service_model.FindOperation("AssociateVPCWithHostedZone"); var request = InstantiateClassGenerator.Execute(); var marshaller = new AssociateVPCWithHostedZoneRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("AssociateVPCWithHostedZone", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("NoSuchHostedZoneException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = AssociateVPCWithHostedZoneResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void AssociateVPCWithHostedZone_NotAuthorizedExceptionMarshallTest() { var operation = service_model.FindOperation("AssociateVPCWithHostedZone"); var request = InstantiateClassGenerator.Execute(); var marshaller = new AssociateVPCWithHostedZoneRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("AssociateVPCWithHostedZone", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("NotAuthorizedException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = AssociateVPCWithHostedZoneResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void AssociateVPCWithHostedZone_PriorRequestNotCompleteExceptionMarshallTest() { var operation = service_model.FindOperation("AssociateVPCWithHostedZone"); var request = InstantiateClassGenerator.Execute(); var marshaller = new AssociateVPCWithHostedZoneRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("AssociateVPCWithHostedZone", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("PriorRequestNotCompleteException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = AssociateVPCWithHostedZoneResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void AssociateVPCWithHostedZone_PublicZoneVPCAssociationExceptionMarshallTest() { var operation = service_model.FindOperation("AssociateVPCWithHostedZone"); var request = InstantiateClassGenerator.Execute(); var marshaller = new AssociateVPCWithHostedZoneRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("AssociateVPCWithHostedZone", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("PublicZoneVPCAssociationException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = AssociateVPCWithHostedZoneResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void ChangeCidrCollectionMarshallTest() { var operation = service_model.FindOperation("ChangeCidrCollection"); var request = InstantiateClassGenerator.Execute(); var marshaller = new ChangeCidrCollectionRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("ChangeCidrCollection", request, internalRequest, service_model); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"} } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(); webResponse.ContentLength = payloadResponse.Length; var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), false, webResponse); ResponseUnmarshaller unmarshaller = ChangeCidrCollectionResponseUnmarshaller.Instance; var response = unmarshaller.Unmarshall(context) as ChangeCidrCollectionResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void ChangeCidrCollection_CidrBlockInUseExceptionMarshallTest() { var operation = service_model.FindOperation("ChangeCidrCollection"); var request = InstantiateClassGenerator.Execute(); var marshaller = new ChangeCidrCollectionRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("ChangeCidrCollection", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("CidrBlockInUseException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = ChangeCidrCollectionResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void ChangeCidrCollection_CidrCollectionVersionMismatchExceptionMarshallTest() { var operation = service_model.FindOperation("ChangeCidrCollection"); var request = InstantiateClassGenerator.Execute(); var marshaller = new ChangeCidrCollectionRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("ChangeCidrCollection", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("CidrCollectionVersionMismatchException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = ChangeCidrCollectionResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void ChangeCidrCollection_ConcurrentModificationExceptionMarshallTest() { var operation = service_model.FindOperation("ChangeCidrCollection"); var request = InstantiateClassGenerator.Execute(); var marshaller = new ChangeCidrCollectionRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("ChangeCidrCollection", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("ConcurrentModificationException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = ChangeCidrCollectionResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void ChangeCidrCollection_InvalidInputExceptionMarshallTest() { var operation = service_model.FindOperation("ChangeCidrCollection"); var request = InstantiateClassGenerator.Execute(); var marshaller = new ChangeCidrCollectionRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("ChangeCidrCollection", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("InvalidInputException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = ChangeCidrCollectionResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void ChangeCidrCollection_LimitsExceededExceptionMarshallTest() { var operation = service_model.FindOperation("ChangeCidrCollection"); var request = InstantiateClassGenerator.Execute(); var marshaller = new ChangeCidrCollectionRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("ChangeCidrCollection", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("LimitsExceededException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = ChangeCidrCollectionResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void ChangeCidrCollection_NoSuchCidrCollectionExceptionMarshallTest() { var operation = service_model.FindOperation("ChangeCidrCollection"); var request = InstantiateClassGenerator.Execute(); var marshaller = new ChangeCidrCollectionRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("ChangeCidrCollection", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("NoSuchCidrCollectionException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = ChangeCidrCollectionResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void ChangeResourceRecordSetsMarshallTest() { var operation = service_model.FindOperation("ChangeResourceRecordSets"); var request = InstantiateClassGenerator.Execute(); var marshaller = new ChangeResourceRecordSetsRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("ChangeResourceRecordSets", request, internalRequest, service_model); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"} } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(); webResponse.ContentLength = payloadResponse.Length; var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), false, webResponse); ResponseUnmarshaller unmarshaller = ChangeResourceRecordSetsResponseUnmarshaller.Instance; var response = unmarshaller.Unmarshall(context) as ChangeResourceRecordSetsResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void ChangeResourceRecordSets_InvalidChangeBatchExceptionMarshallTest() { var operation = service_model.FindOperation("ChangeResourceRecordSets"); var request = InstantiateClassGenerator.Execute(); var marshaller = new ChangeResourceRecordSetsRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("ChangeResourceRecordSets", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("InvalidChangeBatchException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = ChangeResourceRecordSetsResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void ChangeResourceRecordSets_InvalidInputExceptionMarshallTest() { var operation = service_model.FindOperation("ChangeResourceRecordSets"); var request = InstantiateClassGenerator.Execute(); var marshaller = new ChangeResourceRecordSetsRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("ChangeResourceRecordSets", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("InvalidInputException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = ChangeResourceRecordSetsResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void ChangeResourceRecordSets_NoSuchHealthCheckExceptionMarshallTest() { var operation = service_model.FindOperation("ChangeResourceRecordSets"); var request = InstantiateClassGenerator.Execute(); var marshaller = new ChangeResourceRecordSetsRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("ChangeResourceRecordSets", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("NoSuchHealthCheckException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = ChangeResourceRecordSetsResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void ChangeResourceRecordSets_NoSuchHostedZoneExceptionMarshallTest() { var operation = service_model.FindOperation("ChangeResourceRecordSets"); var request = InstantiateClassGenerator.Execute(); var marshaller = new ChangeResourceRecordSetsRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("ChangeResourceRecordSets", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("NoSuchHostedZoneException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = ChangeResourceRecordSetsResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void ChangeResourceRecordSets_PriorRequestNotCompleteExceptionMarshallTest() { var operation = service_model.FindOperation("ChangeResourceRecordSets"); var request = InstantiateClassGenerator.Execute(); var marshaller = new ChangeResourceRecordSetsRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("ChangeResourceRecordSets", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("PriorRequestNotCompleteException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = ChangeResourceRecordSetsResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void ChangeTagsForResourceMarshallTest() { var operation = service_model.FindOperation("ChangeTagsForResource"); var request = InstantiateClassGenerator.Execute(); var marshaller = new ChangeTagsForResourceRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("ChangeTagsForResource", request, internalRequest, service_model); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"} } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(); webResponse.ContentLength = payloadResponse.Length; var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), false, webResponse); ResponseUnmarshaller unmarshaller = ChangeTagsForResourceResponseUnmarshaller.Instance; var response = unmarshaller.Unmarshall(context) as ChangeTagsForResourceResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void ChangeTagsForResource_InvalidInputExceptionMarshallTest() { var operation = service_model.FindOperation("ChangeTagsForResource"); var request = InstantiateClassGenerator.Execute(); var marshaller = new ChangeTagsForResourceRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("ChangeTagsForResource", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("InvalidInputException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = ChangeTagsForResourceResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void ChangeTagsForResource_NoSuchHealthCheckExceptionMarshallTest() { var operation = service_model.FindOperation("ChangeTagsForResource"); var request = InstantiateClassGenerator.Execute(); var marshaller = new ChangeTagsForResourceRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("ChangeTagsForResource", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("NoSuchHealthCheckException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = ChangeTagsForResourceResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void ChangeTagsForResource_NoSuchHostedZoneExceptionMarshallTest() { var operation = service_model.FindOperation("ChangeTagsForResource"); var request = InstantiateClassGenerator.Execute(); var marshaller = new ChangeTagsForResourceRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("ChangeTagsForResource", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("NoSuchHostedZoneException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = ChangeTagsForResourceResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void ChangeTagsForResource_PriorRequestNotCompleteExceptionMarshallTest() { var operation = service_model.FindOperation("ChangeTagsForResource"); var request = InstantiateClassGenerator.Execute(); var marshaller = new ChangeTagsForResourceRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("ChangeTagsForResource", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("PriorRequestNotCompleteException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = ChangeTagsForResourceResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void ChangeTagsForResource_ThrottlingExceptionMarshallTest() { var operation = service_model.FindOperation("ChangeTagsForResource"); var request = InstantiateClassGenerator.Execute(); var marshaller = new ChangeTagsForResourceRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("ChangeTagsForResource", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("ThrottlingException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = ChangeTagsForResourceResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void CreateCidrCollectionMarshallTest() { var operation = service_model.FindOperation("CreateCidrCollection"); var request = InstantiateClassGenerator.Execute(); var marshaller = new CreateCidrCollectionRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("CreateCidrCollection", request, internalRequest, service_model); var webResponse = new WebResponseData { Headers = { {"Location","Location_Value"}, {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"} } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(); webResponse.ContentLength = payloadResponse.Length; var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), false, webResponse); ResponseUnmarshaller unmarshaller = CreateCidrCollectionResponseUnmarshaller.Instance; var response = unmarshaller.Unmarshall(context) as CreateCidrCollectionResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void CreateCidrCollection_CidrCollectionAlreadyExistsExceptionMarshallTest() { var operation = service_model.FindOperation("CreateCidrCollection"); var request = InstantiateClassGenerator.Execute(); var marshaller = new CreateCidrCollectionRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("CreateCidrCollection", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("CidrCollectionAlreadyExistsException")); var webResponse = new WebResponseData { Headers = { {"Location","Location_Value"}, {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = CreateCidrCollectionResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void CreateCidrCollection_ConcurrentModificationExceptionMarshallTest() { var operation = service_model.FindOperation("CreateCidrCollection"); var request = InstantiateClassGenerator.Execute(); var marshaller = new CreateCidrCollectionRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("CreateCidrCollection", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("ConcurrentModificationException")); var webResponse = new WebResponseData { Headers = { {"Location","Location_Value"}, {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = CreateCidrCollectionResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void CreateCidrCollection_InvalidInputExceptionMarshallTest() { var operation = service_model.FindOperation("CreateCidrCollection"); var request = InstantiateClassGenerator.Execute(); var marshaller = new CreateCidrCollectionRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("CreateCidrCollection", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("InvalidInputException")); var webResponse = new WebResponseData { Headers = { {"Location","Location_Value"}, {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = CreateCidrCollectionResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void CreateCidrCollection_LimitsExceededExceptionMarshallTest() { var operation = service_model.FindOperation("CreateCidrCollection"); var request = InstantiateClassGenerator.Execute(); var marshaller = new CreateCidrCollectionRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("CreateCidrCollection", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("LimitsExceededException")); var webResponse = new WebResponseData { Headers = { {"Location","Location_Value"}, {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = CreateCidrCollectionResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void CreateHealthCheckMarshallTest() { var operation = service_model.FindOperation("CreateHealthCheck"); var request = InstantiateClassGenerator.Execute(); var marshaller = new CreateHealthCheckRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("CreateHealthCheck", request, internalRequest, service_model); var webResponse = new WebResponseData { Headers = { {"Location","Location_Value"}, {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"} } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(); webResponse.ContentLength = payloadResponse.Length; var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), false, webResponse); ResponseUnmarshaller unmarshaller = CreateHealthCheckResponseUnmarshaller.Instance; var response = unmarshaller.Unmarshall(context) as CreateHealthCheckResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void CreateHealthCheck_HealthCheckAlreadyExistsExceptionMarshallTest() { var operation = service_model.FindOperation("CreateHealthCheck"); var request = InstantiateClassGenerator.Execute(); var marshaller = new CreateHealthCheckRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("CreateHealthCheck", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("HealthCheckAlreadyExistsException")); var webResponse = new WebResponseData { Headers = { {"Location","Location_Value"}, {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = CreateHealthCheckResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void CreateHealthCheck_InvalidInputExceptionMarshallTest() { var operation = service_model.FindOperation("CreateHealthCheck"); var request = InstantiateClassGenerator.Execute(); var marshaller = new CreateHealthCheckRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("CreateHealthCheck", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("InvalidInputException")); var webResponse = new WebResponseData { Headers = { {"Location","Location_Value"}, {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = CreateHealthCheckResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void CreateHealthCheck_TooManyHealthChecksExceptionMarshallTest() { var operation = service_model.FindOperation("CreateHealthCheck"); var request = InstantiateClassGenerator.Execute(); var marshaller = new CreateHealthCheckRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("CreateHealthCheck", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("TooManyHealthChecksException")); var webResponse = new WebResponseData { Headers = { {"Location","Location_Value"}, {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = CreateHealthCheckResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void CreateHostedZoneMarshallTest() { var operation = service_model.FindOperation("CreateHostedZone"); var request = InstantiateClassGenerator.Execute(); var marshaller = new CreateHostedZoneRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("CreateHostedZone", request, internalRequest, service_model); var webResponse = new WebResponseData { Headers = { {"Location","Location_Value"}, {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"} } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(); webResponse.ContentLength = payloadResponse.Length; var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), false, webResponse); ResponseUnmarshaller unmarshaller = CreateHostedZoneResponseUnmarshaller.Instance; var response = unmarshaller.Unmarshall(context) as CreateHostedZoneResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void CreateHostedZone_ConflictingDomainExistsExceptionMarshallTest() { var operation = service_model.FindOperation("CreateHostedZone"); var request = InstantiateClassGenerator.Execute(); var marshaller = new CreateHostedZoneRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("CreateHostedZone", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("ConflictingDomainExistsException")); var webResponse = new WebResponseData { Headers = { {"Location","Location_Value"}, {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = CreateHostedZoneResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void CreateHostedZone_DelegationSetNotAvailableExceptionMarshallTest() { var operation = service_model.FindOperation("CreateHostedZone"); var request = InstantiateClassGenerator.Execute(); var marshaller = new CreateHostedZoneRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("CreateHostedZone", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("DelegationSetNotAvailableException")); var webResponse = new WebResponseData { Headers = { {"Location","Location_Value"}, {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = CreateHostedZoneResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void CreateHostedZone_DelegationSetNotReusableExceptionMarshallTest() { var operation = service_model.FindOperation("CreateHostedZone"); var request = InstantiateClassGenerator.Execute(); var marshaller = new CreateHostedZoneRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("CreateHostedZone", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("DelegationSetNotReusableException")); var webResponse = new WebResponseData { Headers = { {"Location","Location_Value"}, {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = CreateHostedZoneResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void CreateHostedZone_HostedZoneAlreadyExistsExceptionMarshallTest() { var operation = service_model.FindOperation("CreateHostedZone"); var request = InstantiateClassGenerator.Execute(); var marshaller = new CreateHostedZoneRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("CreateHostedZone", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("HostedZoneAlreadyExistsException")); var webResponse = new WebResponseData { Headers = { {"Location","Location_Value"}, {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = CreateHostedZoneResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void CreateHostedZone_InvalidDomainNameExceptionMarshallTest() { var operation = service_model.FindOperation("CreateHostedZone"); var request = InstantiateClassGenerator.Execute(); var marshaller = new CreateHostedZoneRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("CreateHostedZone", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("InvalidDomainNameException")); var webResponse = new WebResponseData { Headers = { {"Location","Location_Value"}, {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = CreateHostedZoneResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void CreateHostedZone_InvalidInputExceptionMarshallTest() { var operation = service_model.FindOperation("CreateHostedZone"); var request = InstantiateClassGenerator.Execute(); var marshaller = new CreateHostedZoneRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("CreateHostedZone", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("InvalidInputException")); var webResponse = new WebResponseData { Headers = { {"Location","Location_Value"}, {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = CreateHostedZoneResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void CreateHostedZone_InvalidVPCIdExceptionMarshallTest() { var operation = service_model.FindOperation("CreateHostedZone"); var request = InstantiateClassGenerator.Execute(); var marshaller = new CreateHostedZoneRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("CreateHostedZone", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("InvalidVPCIdException")); var webResponse = new WebResponseData { Headers = { {"Location","Location_Value"}, {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = CreateHostedZoneResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void CreateHostedZone_NoSuchDelegationSetExceptionMarshallTest() { var operation = service_model.FindOperation("CreateHostedZone"); var request = InstantiateClassGenerator.Execute(); var marshaller = new CreateHostedZoneRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("CreateHostedZone", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("NoSuchDelegationSetException")); var webResponse = new WebResponseData { Headers = { {"Location","Location_Value"}, {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = CreateHostedZoneResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void CreateHostedZone_TooManyHostedZonesExceptionMarshallTest() { var operation = service_model.FindOperation("CreateHostedZone"); var request = InstantiateClassGenerator.Execute(); var marshaller = new CreateHostedZoneRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("CreateHostedZone", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("TooManyHostedZonesException")); var webResponse = new WebResponseData { Headers = { {"Location","Location_Value"}, {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = CreateHostedZoneResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void CreateKeySigningKeyMarshallTest() { var operation = service_model.FindOperation("CreateKeySigningKey"); var request = InstantiateClassGenerator.Execute(); var marshaller = new CreateKeySigningKeyRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("CreateKeySigningKey", request, internalRequest, service_model); var webResponse = new WebResponseData { Headers = { {"Location","Location_Value"}, {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"} } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(); webResponse.ContentLength = payloadResponse.Length; var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), false, webResponse); ResponseUnmarshaller unmarshaller = CreateKeySigningKeyResponseUnmarshaller.Instance; var response = unmarshaller.Unmarshall(context) as CreateKeySigningKeyResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void CreateKeySigningKey_ConcurrentModificationExceptionMarshallTest() { var operation = service_model.FindOperation("CreateKeySigningKey"); var request = InstantiateClassGenerator.Execute(); var marshaller = new CreateKeySigningKeyRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("CreateKeySigningKey", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("ConcurrentModificationException")); var webResponse = new WebResponseData { Headers = { {"Location","Location_Value"}, {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = CreateKeySigningKeyResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void CreateKeySigningKey_InvalidArgumentExceptionMarshallTest() { var operation = service_model.FindOperation("CreateKeySigningKey"); var request = InstantiateClassGenerator.Execute(); var marshaller = new CreateKeySigningKeyRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("CreateKeySigningKey", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("InvalidArgumentException")); var webResponse = new WebResponseData { Headers = { {"Location","Location_Value"}, {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = CreateKeySigningKeyResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void CreateKeySigningKey_InvalidInputExceptionMarshallTest() { var operation = service_model.FindOperation("CreateKeySigningKey"); var request = InstantiateClassGenerator.Execute(); var marshaller = new CreateKeySigningKeyRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("CreateKeySigningKey", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("InvalidInputException")); var webResponse = new WebResponseData { Headers = { {"Location","Location_Value"}, {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = CreateKeySigningKeyResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void CreateKeySigningKey_InvalidKeySigningKeyNameExceptionMarshallTest() { var operation = service_model.FindOperation("CreateKeySigningKey"); var request = InstantiateClassGenerator.Execute(); var marshaller = new CreateKeySigningKeyRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("CreateKeySigningKey", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("InvalidKeySigningKeyNameException")); var webResponse = new WebResponseData { Headers = { {"Location","Location_Value"}, {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = CreateKeySigningKeyResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void CreateKeySigningKey_InvalidKeySigningKeyStatusExceptionMarshallTest() { var operation = service_model.FindOperation("CreateKeySigningKey"); var request = InstantiateClassGenerator.Execute(); var marshaller = new CreateKeySigningKeyRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("CreateKeySigningKey", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("InvalidKeySigningKeyStatusException")); var webResponse = new WebResponseData { Headers = { {"Location","Location_Value"}, {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = CreateKeySigningKeyResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void CreateKeySigningKey_InvalidKMSArnExceptionMarshallTest() { var operation = service_model.FindOperation("CreateKeySigningKey"); var request = InstantiateClassGenerator.Execute(); var marshaller = new CreateKeySigningKeyRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("CreateKeySigningKey", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("InvalidKMSArnException")); var webResponse = new WebResponseData { Headers = { {"Location","Location_Value"}, {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = CreateKeySigningKeyResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void CreateKeySigningKey_InvalidSigningStatusExceptionMarshallTest() { var operation = service_model.FindOperation("CreateKeySigningKey"); var request = InstantiateClassGenerator.Execute(); var marshaller = new CreateKeySigningKeyRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("CreateKeySigningKey", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("InvalidSigningStatusException")); var webResponse = new WebResponseData { Headers = { {"Location","Location_Value"}, {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = CreateKeySigningKeyResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void CreateKeySigningKey_KeySigningKeyAlreadyExistsExceptionMarshallTest() { var operation = service_model.FindOperation("CreateKeySigningKey"); var request = InstantiateClassGenerator.Execute(); var marshaller = new CreateKeySigningKeyRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("CreateKeySigningKey", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("KeySigningKeyAlreadyExistsException")); var webResponse = new WebResponseData { Headers = { {"Location","Location_Value"}, {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = CreateKeySigningKeyResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void CreateKeySigningKey_NoSuchHostedZoneExceptionMarshallTest() { var operation = service_model.FindOperation("CreateKeySigningKey"); var request = InstantiateClassGenerator.Execute(); var marshaller = new CreateKeySigningKeyRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("CreateKeySigningKey", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("NoSuchHostedZoneException")); var webResponse = new WebResponseData { Headers = { {"Location","Location_Value"}, {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = CreateKeySigningKeyResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void CreateKeySigningKey_TooManyKeySigningKeysExceptionMarshallTest() { var operation = service_model.FindOperation("CreateKeySigningKey"); var request = InstantiateClassGenerator.Execute(); var marshaller = new CreateKeySigningKeyRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("CreateKeySigningKey", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("TooManyKeySigningKeysException")); var webResponse = new WebResponseData { Headers = { {"Location","Location_Value"}, {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = CreateKeySigningKeyResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void CreateQueryLoggingConfigMarshallTest() { var operation = service_model.FindOperation("CreateQueryLoggingConfig"); var request = InstantiateClassGenerator.Execute(); var marshaller = new CreateQueryLoggingConfigRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("CreateQueryLoggingConfig", request, internalRequest, service_model); var webResponse = new WebResponseData { Headers = { {"Location","Location_Value"}, {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"} } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(); webResponse.ContentLength = payloadResponse.Length; var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), false, webResponse); ResponseUnmarshaller unmarshaller = CreateQueryLoggingConfigResponseUnmarshaller.Instance; var response = unmarshaller.Unmarshall(context) as CreateQueryLoggingConfigResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void CreateQueryLoggingConfig_ConcurrentModificationExceptionMarshallTest() { var operation = service_model.FindOperation("CreateQueryLoggingConfig"); var request = InstantiateClassGenerator.Execute(); var marshaller = new CreateQueryLoggingConfigRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("CreateQueryLoggingConfig", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("ConcurrentModificationException")); var webResponse = new WebResponseData { Headers = { {"Location","Location_Value"}, {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = CreateQueryLoggingConfigResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void CreateQueryLoggingConfig_InsufficientCloudWatchLogsResourcePolicyExceptionMarshallTest() { var operation = service_model.FindOperation("CreateQueryLoggingConfig"); var request = InstantiateClassGenerator.Execute(); var marshaller = new CreateQueryLoggingConfigRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("CreateQueryLoggingConfig", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("InsufficientCloudWatchLogsResourcePolicyException")); var webResponse = new WebResponseData { Headers = { {"Location","Location_Value"}, {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = CreateQueryLoggingConfigResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void CreateQueryLoggingConfig_InvalidInputExceptionMarshallTest() { var operation = service_model.FindOperation("CreateQueryLoggingConfig"); var request = InstantiateClassGenerator.Execute(); var marshaller = new CreateQueryLoggingConfigRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("CreateQueryLoggingConfig", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("InvalidInputException")); var webResponse = new WebResponseData { Headers = { {"Location","Location_Value"}, {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = CreateQueryLoggingConfigResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void CreateQueryLoggingConfig_NoSuchCloudWatchLogsLogGroupExceptionMarshallTest() { var operation = service_model.FindOperation("CreateQueryLoggingConfig"); var request = InstantiateClassGenerator.Execute(); var marshaller = new CreateQueryLoggingConfigRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("CreateQueryLoggingConfig", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("NoSuchCloudWatchLogsLogGroupException")); var webResponse = new WebResponseData { Headers = { {"Location","Location_Value"}, {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = CreateQueryLoggingConfigResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void CreateQueryLoggingConfig_NoSuchHostedZoneExceptionMarshallTest() { var operation = service_model.FindOperation("CreateQueryLoggingConfig"); var request = InstantiateClassGenerator.Execute(); var marshaller = new CreateQueryLoggingConfigRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("CreateQueryLoggingConfig", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("NoSuchHostedZoneException")); var webResponse = new WebResponseData { Headers = { {"Location","Location_Value"}, {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = CreateQueryLoggingConfigResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void CreateQueryLoggingConfig_QueryLoggingConfigAlreadyExistsExceptionMarshallTest() { var operation = service_model.FindOperation("CreateQueryLoggingConfig"); var request = InstantiateClassGenerator.Execute(); var marshaller = new CreateQueryLoggingConfigRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("CreateQueryLoggingConfig", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("QueryLoggingConfigAlreadyExistsException")); var webResponse = new WebResponseData { Headers = { {"Location","Location_Value"}, {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = CreateQueryLoggingConfigResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void CreateReusableDelegationSetMarshallTest() { var operation = service_model.FindOperation("CreateReusableDelegationSet"); var request = InstantiateClassGenerator.Execute(); var marshaller = new CreateReusableDelegationSetRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("CreateReusableDelegationSet", request, internalRequest, service_model); var webResponse = new WebResponseData { Headers = { {"Location","Location_Value"}, {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"} } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(); webResponse.ContentLength = payloadResponse.Length; var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), false, webResponse); ResponseUnmarshaller unmarshaller = CreateReusableDelegationSetResponseUnmarshaller.Instance; var response = unmarshaller.Unmarshall(context) as CreateReusableDelegationSetResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void CreateReusableDelegationSet_DelegationSetAlreadyCreatedExceptionMarshallTest() { var operation = service_model.FindOperation("CreateReusableDelegationSet"); var request = InstantiateClassGenerator.Execute(); var marshaller = new CreateReusableDelegationSetRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("CreateReusableDelegationSet", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("DelegationSetAlreadyCreatedException")); var webResponse = new WebResponseData { Headers = { {"Location","Location_Value"}, {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = CreateReusableDelegationSetResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void CreateReusableDelegationSet_DelegationSetAlreadyReusableExceptionMarshallTest() { var operation = service_model.FindOperation("CreateReusableDelegationSet"); var request = InstantiateClassGenerator.Execute(); var marshaller = new CreateReusableDelegationSetRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("CreateReusableDelegationSet", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("DelegationSetAlreadyReusableException")); var webResponse = new WebResponseData { Headers = { {"Location","Location_Value"}, {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = CreateReusableDelegationSetResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void CreateReusableDelegationSet_DelegationSetNotAvailableExceptionMarshallTest() { var operation = service_model.FindOperation("CreateReusableDelegationSet"); var request = InstantiateClassGenerator.Execute(); var marshaller = new CreateReusableDelegationSetRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("CreateReusableDelegationSet", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("DelegationSetNotAvailableException")); var webResponse = new WebResponseData { Headers = { {"Location","Location_Value"}, {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = CreateReusableDelegationSetResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void CreateReusableDelegationSet_HostedZoneNotFoundExceptionMarshallTest() { var operation = service_model.FindOperation("CreateReusableDelegationSet"); var request = InstantiateClassGenerator.Execute(); var marshaller = new CreateReusableDelegationSetRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("CreateReusableDelegationSet", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("HostedZoneNotFoundException")); var webResponse = new WebResponseData { Headers = { {"Location","Location_Value"}, {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = CreateReusableDelegationSetResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void CreateReusableDelegationSet_InvalidArgumentExceptionMarshallTest() { var operation = service_model.FindOperation("CreateReusableDelegationSet"); var request = InstantiateClassGenerator.Execute(); var marshaller = new CreateReusableDelegationSetRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("CreateReusableDelegationSet", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("InvalidArgumentException")); var webResponse = new WebResponseData { Headers = { {"Location","Location_Value"}, {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = CreateReusableDelegationSetResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void CreateReusableDelegationSet_InvalidInputExceptionMarshallTest() { var operation = service_model.FindOperation("CreateReusableDelegationSet"); var request = InstantiateClassGenerator.Execute(); var marshaller = new CreateReusableDelegationSetRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("CreateReusableDelegationSet", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("InvalidInputException")); var webResponse = new WebResponseData { Headers = { {"Location","Location_Value"}, {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = CreateReusableDelegationSetResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void CreateReusableDelegationSet_LimitsExceededExceptionMarshallTest() { var operation = service_model.FindOperation("CreateReusableDelegationSet"); var request = InstantiateClassGenerator.Execute(); var marshaller = new CreateReusableDelegationSetRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("CreateReusableDelegationSet", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("LimitsExceededException")); var webResponse = new WebResponseData { Headers = { {"Location","Location_Value"}, {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = CreateReusableDelegationSetResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void CreateTrafficPolicyMarshallTest() { var operation = service_model.FindOperation("CreateTrafficPolicy"); var request = InstantiateClassGenerator.Execute(); var marshaller = new CreateTrafficPolicyRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("CreateTrafficPolicy", request, internalRequest, service_model); var webResponse = new WebResponseData { Headers = { {"Location","Location_Value"}, {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"} } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(); webResponse.ContentLength = payloadResponse.Length; var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), false, webResponse); ResponseUnmarshaller unmarshaller = CreateTrafficPolicyResponseUnmarshaller.Instance; var response = unmarshaller.Unmarshall(context) as CreateTrafficPolicyResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void CreateTrafficPolicy_InvalidInputExceptionMarshallTest() { var operation = service_model.FindOperation("CreateTrafficPolicy"); var request = InstantiateClassGenerator.Execute(); var marshaller = new CreateTrafficPolicyRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("CreateTrafficPolicy", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("InvalidInputException")); var webResponse = new WebResponseData { Headers = { {"Location","Location_Value"}, {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = CreateTrafficPolicyResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void CreateTrafficPolicy_InvalidTrafficPolicyDocumentExceptionMarshallTest() { var operation = service_model.FindOperation("CreateTrafficPolicy"); var request = InstantiateClassGenerator.Execute(); var marshaller = new CreateTrafficPolicyRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("CreateTrafficPolicy", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("InvalidTrafficPolicyDocumentException")); var webResponse = new WebResponseData { Headers = { {"Location","Location_Value"}, {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = CreateTrafficPolicyResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void CreateTrafficPolicy_TooManyTrafficPoliciesExceptionMarshallTest() { var operation = service_model.FindOperation("CreateTrafficPolicy"); var request = InstantiateClassGenerator.Execute(); var marshaller = new CreateTrafficPolicyRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("CreateTrafficPolicy", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("TooManyTrafficPoliciesException")); var webResponse = new WebResponseData { Headers = { {"Location","Location_Value"}, {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = CreateTrafficPolicyResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void CreateTrafficPolicy_TrafficPolicyAlreadyExistsExceptionMarshallTest() { var operation = service_model.FindOperation("CreateTrafficPolicy"); var request = InstantiateClassGenerator.Execute(); var marshaller = new CreateTrafficPolicyRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("CreateTrafficPolicy", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("TrafficPolicyAlreadyExistsException")); var webResponse = new WebResponseData { Headers = { {"Location","Location_Value"}, {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = CreateTrafficPolicyResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void CreateTrafficPolicyInstanceMarshallTest() { var operation = service_model.FindOperation("CreateTrafficPolicyInstance"); var request = InstantiateClassGenerator.Execute(); var marshaller = new CreateTrafficPolicyInstanceRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("CreateTrafficPolicyInstance", request, internalRequest, service_model); var webResponse = new WebResponseData { Headers = { {"Location","Location_Value"}, {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"} } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(); webResponse.ContentLength = payloadResponse.Length; var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), false, webResponse); ResponseUnmarshaller unmarshaller = CreateTrafficPolicyInstanceResponseUnmarshaller.Instance; var response = unmarshaller.Unmarshall(context) as CreateTrafficPolicyInstanceResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void CreateTrafficPolicyInstance_InvalidInputExceptionMarshallTest() { var operation = service_model.FindOperation("CreateTrafficPolicyInstance"); var request = InstantiateClassGenerator.Execute(); var marshaller = new CreateTrafficPolicyInstanceRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("CreateTrafficPolicyInstance", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("InvalidInputException")); var webResponse = new WebResponseData { Headers = { {"Location","Location_Value"}, {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = CreateTrafficPolicyInstanceResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void CreateTrafficPolicyInstance_NoSuchHostedZoneExceptionMarshallTest() { var operation = service_model.FindOperation("CreateTrafficPolicyInstance"); var request = InstantiateClassGenerator.Execute(); var marshaller = new CreateTrafficPolicyInstanceRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("CreateTrafficPolicyInstance", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("NoSuchHostedZoneException")); var webResponse = new WebResponseData { Headers = { {"Location","Location_Value"}, {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = CreateTrafficPolicyInstanceResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void CreateTrafficPolicyInstance_NoSuchTrafficPolicyExceptionMarshallTest() { var operation = service_model.FindOperation("CreateTrafficPolicyInstance"); var request = InstantiateClassGenerator.Execute(); var marshaller = new CreateTrafficPolicyInstanceRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("CreateTrafficPolicyInstance", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("NoSuchTrafficPolicyException")); var webResponse = new WebResponseData { Headers = { {"Location","Location_Value"}, {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = CreateTrafficPolicyInstanceResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void CreateTrafficPolicyInstance_TooManyTrafficPolicyInstancesExceptionMarshallTest() { var operation = service_model.FindOperation("CreateTrafficPolicyInstance"); var request = InstantiateClassGenerator.Execute(); var marshaller = new CreateTrafficPolicyInstanceRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("CreateTrafficPolicyInstance", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("TooManyTrafficPolicyInstancesException")); var webResponse = new WebResponseData { Headers = { {"Location","Location_Value"}, {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = CreateTrafficPolicyInstanceResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void CreateTrafficPolicyInstance_TrafficPolicyInstanceAlreadyExistsExceptionMarshallTest() { var operation = service_model.FindOperation("CreateTrafficPolicyInstance"); var request = InstantiateClassGenerator.Execute(); var marshaller = new CreateTrafficPolicyInstanceRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("CreateTrafficPolicyInstance", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("TrafficPolicyInstanceAlreadyExistsException")); var webResponse = new WebResponseData { Headers = { {"Location","Location_Value"}, {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = CreateTrafficPolicyInstanceResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void CreateTrafficPolicyVersionMarshallTest() { var operation = service_model.FindOperation("CreateTrafficPolicyVersion"); var request = InstantiateClassGenerator.Execute(); var marshaller = new CreateTrafficPolicyVersionRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("CreateTrafficPolicyVersion", request, internalRequest, service_model); var webResponse = new WebResponseData { Headers = { {"Location","Location_Value"}, {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"} } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(); webResponse.ContentLength = payloadResponse.Length; var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), false, webResponse); ResponseUnmarshaller unmarshaller = CreateTrafficPolicyVersionResponseUnmarshaller.Instance; var response = unmarshaller.Unmarshall(context) as CreateTrafficPolicyVersionResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void CreateTrafficPolicyVersion_ConcurrentModificationExceptionMarshallTest() { var operation = service_model.FindOperation("CreateTrafficPolicyVersion"); var request = InstantiateClassGenerator.Execute(); var marshaller = new CreateTrafficPolicyVersionRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("CreateTrafficPolicyVersion", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("ConcurrentModificationException")); var webResponse = new WebResponseData { Headers = { {"Location","Location_Value"}, {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = CreateTrafficPolicyVersionResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void CreateTrafficPolicyVersion_InvalidInputExceptionMarshallTest() { var operation = service_model.FindOperation("CreateTrafficPolicyVersion"); var request = InstantiateClassGenerator.Execute(); var marshaller = new CreateTrafficPolicyVersionRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("CreateTrafficPolicyVersion", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("InvalidInputException")); var webResponse = new WebResponseData { Headers = { {"Location","Location_Value"}, {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = CreateTrafficPolicyVersionResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void CreateTrafficPolicyVersion_InvalidTrafficPolicyDocumentExceptionMarshallTest() { var operation = service_model.FindOperation("CreateTrafficPolicyVersion"); var request = InstantiateClassGenerator.Execute(); var marshaller = new CreateTrafficPolicyVersionRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("CreateTrafficPolicyVersion", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("InvalidTrafficPolicyDocumentException")); var webResponse = new WebResponseData { Headers = { {"Location","Location_Value"}, {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = CreateTrafficPolicyVersionResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void CreateTrafficPolicyVersion_NoSuchTrafficPolicyExceptionMarshallTest() { var operation = service_model.FindOperation("CreateTrafficPolicyVersion"); var request = InstantiateClassGenerator.Execute(); var marshaller = new CreateTrafficPolicyVersionRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("CreateTrafficPolicyVersion", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("NoSuchTrafficPolicyException")); var webResponse = new WebResponseData { Headers = { {"Location","Location_Value"}, {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = CreateTrafficPolicyVersionResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void CreateTrafficPolicyVersion_TooManyTrafficPolicyVersionsForCurrentPolicyExceptionMarshallTest() { var operation = service_model.FindOperation("CreateTrafficPolicyVersion"); var request = InstantiateClassGenerator.Execute(); var marshaller = new CreateTrafficPolicyVersionRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("CreateTrafficPolicyVersion", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("TooManyTrafficPolicyVersionsForCurrentPolicyException")); var webResponse = new WebResponseData { Headers = { {"Location","Location_Value"}, {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = CreateTrafficPolicyVersionResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void CreateVPCAssociationAuthorizationMarshallTest() { var operation = service_model.FindOperation("CreateVPCAssociationAuthorization"); var request = InstantiateClassGenerator.Execute(); var marshaller = new CreateVPCAssociationAuthorizationRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("CreateVPCAssociationAuthorization", request, internalRequest, service_model); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"} } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(); webResponse.ContentLength = payloadResponse.Length; var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), false, webResponse); ResponseUnmarshaller unmarshaller = CreateVPCAssociationAuthorizationResponseUnmarshaller.Instance; var response = unmarshaller.Unmarshall(context) as CreateVPCAssociationAuthorizationResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void CreateVPCAssociationAuthorization_ConcurrentModificationExceptionMarshallTest() { var operation = service_model.FindOperation("CreateVPCAssociationAuthorization"); var request = InstantiateClassGenerator.Execute(); var marshaller = new CreateVPCAssociationAuthorizationRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("CreateVPCAssociationAuthorization", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("ConcurrentModificationException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = CreateVPCAssociationAuthorizationResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void CreateVPCAssociationAuthorization_InvalidInputExceptionMarshallTest() { var operation = service_model.FindOperation("CreateVPCAssociationAuthorization"); var request = InstantiateClassGenerator.Execute(); var marshaller = new CreateVPCAssociationAuthorizationRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("CreateVPCAssociationAuthorization", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("InvalidInputException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = CreateVPCAssociationAuthorizationResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void CreateVPCAssociationAuthorization_InvalidVPCIdExceptionMarshallTest() { var operation = service_model.FindOperation("CreateVPCAssociationAuthorization"); var request = InstantiateClassGenerator.Execute(); var marshaller = new CreateVPCAssociationAuthorizationRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("CreateVPCAssociationAuthorization", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("InvalidVPCIdException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = CreateVPCAssociationAuthorizationResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void CreateVPCAssociationAuthorization_NoSuchHostedZoneExceptionMarshallTest() { var operation = service_model.FindOperation("CreateVPCAssociationAuthorization"); var request = InstantiateClassGenerator.Execute(); var marshaller = new CreateVPCAssociationAuthorizationRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("CreateVPCAssociationAuthorization", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("NoSuchHostedZoneException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = CreateVPCAssociationAuthorizationResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void CreateVPCAssociationAuthorization_TooManyVPCAssociationAuthorizationsExceptionMarshallTest() { var operation = service_model.FindOperation("CreateVPCAssociationAuthorization"); var request = InstantiateClassGenerator.Execute(); var marshaller = new CreateVPCAssociationAuthorizationRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("CreateVPCAssociationAuthorization", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("TooManyVPCAssociationAuthorizationsException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = CreateVPCAssociationAuthorizationResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void DeactivateKeySigningKeyMarshallTest() { var operation = service_model.FindOperation("DeactivateKeySigningKey"); var request = InstantiateClassGenerator.Execute(); var marshaller = new DeactivateKeySigningKeyRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("DeactivateKeySigningKey", request, internalRequest, service_model); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"} } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(); webResponse.ContentLength = payloadResponse.Length; var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), false, webResponse); ResponseUnmarshaller unmarshaller = DeactivateKeySigningKeyResponseUnmarshaller.Instance; var response = unmarshaller.Unmarshall(context) as DeactivateKeySigningKeyResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void DeactivateKeySigningKey_ConcurrentModificationExceptionMarshallTest() { var operation = service_model.FindOperation("DeactivateKeySigningKey"); var request = InstantiateClassGenerator.Execute(); var marshaller = new DeactivateKeySigningKeyRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("DeactivateKeySigningKey", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("ConcurrentModificationException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = DeactivateKeySigningKeyResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void DeactivateKeySigningKey_InvalidInputExceptionMarshallTest() { var operation = service_model.FindOperation("DeactivateKeySigningKey"); var request = InstantiateClassGenerator.Execute(); var marshaller = new DeactivateKeySigningKeyRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("DeactivateKeySigningKey", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("InvalidInputException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = DeactivateKeySigningKeyResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void DeactivateKeySigningKey_InvalidKeySigningKeyStatusExceptionMarshallTest() { var operation = service_model.FindOperation("DeactivateKeySigningKey"); var request = InstantiateClassGenerator.Execute(); var marshaller = new DeactivateKeySigningKeyRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("DeactivateKeySigningKey", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("InvalidKeySigningKeyStatusException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = DeactivateKeySigningKeyResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void DeactivateKeySigningKey_InvalidSigningStatusExceptionMarshallTest() { var operation = service_model.FindOperation("DeactivateKeySigningKey"); var request = InstantiateClassGenerator.Execute(); var marshaller = new DeactivateKeySigningKeyRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("DeactivateKeySigningKey", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("InvalidSigningStatusException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = DeactivateKeySigningKeyResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void DeactivateKeySigningKey_KeySigningKeyInParentDSRecordExceptionMarshallTest() { var operation = service_model.FindOperation("DeactivateKeySigningKey"); var request = InstantiateClassGenerator.Execute(); var marshaller = new DeactivateKeySigningKeyRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("DeactivateKeySigningKey", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("KeySigningKeyInParentDSRecordException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = DeactivateKeySigningKeyResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void DeactivateKeySigningKey_KeySigningKeyInUseExceptionMarshallTest() { var operation = service_model.FindOperation("DeactivateKeySigningKey"); var request = InstantiateClassGenerator.Execute(); var marshaller = new DeactivateKeySigningKeyRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("DeactivateKeySigningKey", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("KeySigningKeyInUseException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = DeactivateKeySigningKeyResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void DeactivateKeySigningKey_NoSuchKeySigningKeyExceptionMarshallTest() { var operation = service_model.FindOperation("DeactivateKeySigningKey"); var request = InstantiateClassGenerator.Execute(); var marshaller = new DeactivateKeySigningKeyRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("DeactivateKeySigningKey", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("NoSuchKeySigningKeyException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = DeactivateKeySigningKeyResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void DeleteCidrCollectionMarshallTest() { var operation = service_model.FindOperation("DeleteCidrCollection"); var request = InstantiateClassGenerator.Execute(); var marshaller = new DeleteCidrCollectionRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("DeleteCidrCollection", request, internalRequest, service_model); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"} } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(); webResponse.ContentLength = payloadResponse.Length; var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), false, webResponse); ResponseUnmarshaller unmarshaller = DeleteCidrCollectionResponseUnmarshaller.Instance; var response = unmarshaller.Unmarshall(context) as DeleteCidrCollectionResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void DeleteCidrCollection_CidrCollectionInUseExceptionMarshallTest() { var operation = service_model.FindOperation("DeleteCidrCollection"); var request = InstantiateClassGenerator.Execute(); var marshaller = new DeleteCidrCollectionRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("DeleteCidrCollection", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("CidrCollectionInUseException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = DeleteCidrCollectionResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void DeleteCidrCollection_ConcurrentModificationExceptionMarshallTest() { var operation = service_model.FindOperation("DeleteCidrCollection"); var request = InstantiateClassGenerator.Execute(); var marshaller = new DeleteCidrCollectionRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("DeleteCidrCollection", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("ConcurrentModificationException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = DeleteCidrCollectionResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void DeleteCidrCollection_InvalidInputExceptionMarshallTest() { var operation = service_model.FindOperation("DeleteCidrCollection"); var request = InstantiateClassGenerator.Execute(); var marshaller = new DeleteCidrCollectionRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("DeleteCidrCollection", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("InvalidInputException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = DeleteCidrCollectionResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void DeleteCidrCollection_NoSuchCidrCollectionExceptionMarshallTest() { var operation = service_model.FindOperation("DeleteCidrCollection"); var request = InstantiateClassGenerator.Execute(); var marshaller = new DeleteCidrCollectionRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("DeleteCidrCollection", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("NoSuchCidrCollectionException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = DeleteCidrCollectionResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void DeleteHealthCheckMarshallTest() { var operation = service_model.FindOperation("DeleteHealthCheck"); var request = InstantiateClassGenerator.Execute(); var marshaller = new DeleteHealthCheckRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("DeleteHealthCheck", request, internalRequest, service_model); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"} } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(); webResponse.ContentLength = payloadResponse.Length; var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), false, webResponse); ResponseUnmarshaller unmarshaller = DeleteHealthCheckResponseUnmarshaller.Instance; var response = unmarshaller.Unmarshall(context) as DeleteHealthCheckResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void DeleteHealthCheck_HealthCheckInUseExceptionMarshallTest() { var operation = service_model.FindOperation("DeleteHealthCheck"); var request = InstantiateClassGenerator.Execute(); var marshaller = new DeleteHealthCheckRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("DeleteHealthCheck", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("HealthCheckInUseException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = DeleteHealthCheckResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void DeleteHealthCheck_InvalidInputExceptionMarshallTest() { var operation = service_model.FindOperation("DeleteHealthCheck"); var request = InstantiateClassGenerator.Execute(); var marshaller = new DeleteHealthCheckRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("DeleteHealthCheck", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("InvalidInputException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = DeleteHealthCheckResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void DeleteHealthCheck_NoSuchHealthCheckExceptionMarshallTest() { var operation = service_model.FindOperation("DeleteHealthCheck"); var request = InstantiateClassGenerator.Execute(); var marshaller = new DeleteHealthCheckRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("DeleteHealthCheck", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("NoSuchHealthCheckException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = DeleteHealthCheckResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void DeleteHostedZoneMarshallTest() { var operation = service_model.FindOperation("DeleteHostedZone"); var request = InstantiateClassGenerator.Execute(); var marshaller = new DeleteHostedZoneRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("DeleteHostedZone", request, internalRequest, service_model); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"} } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(); webResponse.ContentLength = payloadResponse.Length; var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), false, webResponse); ResponseUnmarshaller unmarshaller = DeleteHostedZoneResponseUnmarshaller.Instance; var response = unmarshaller.Unmarshall(context) as DeleteHostedZoneResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void DeleteHostedZone_HostedZoneNotEmptyExceptionMarshallTest() { var operation = service_model.FindOperation("DeleteHostedZone"); var request = InstantiateClassGenerator.Execute(); var marshaller = new DeleteHostedZoneRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("DeleteHostedZone", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("HostedZoneNotEmptyException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = DeleteHostedZoneResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void DeleteHostedZone_InvalidDomainNameExceptionMarshallTest() { var operation = service_model.FindOperation("DeleteHostedZone"); var request = InstantiateClassGenerator.Execute(); var marshaller = new DeleteHostedZoneRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("DeleteHostedZone", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("InvalidDomainNameException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = DeleteHostedZoneResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void DeleteHostedZone_InvalidInputExceptionMarshallTest() { var operation = service_model.FindOperation("DeleteHostedZone"); var request = InstantiateClassGenerator.Execute(); var marshaller = new DeleteHostedZoneRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("DeleteHostedZone", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("InvalidInputException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = DeleteHostedZoneResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void DeleteHostedZone_NoSuchHostedZoneExceptionMarshallTest() { var operation = service_model.FindOperation("DeleteHostedZone"); var request = InstantiateClassGenerator.Execute(); var marshaller = new DeleteHostedZoneRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("DeleteHostedZone", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("NoSuchHostedZoneException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = DeleteHostedZoneResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void DeleteHostedZone_PriorRequestNotCompleteExceptionMarshallTest() { var operation = service_model.FindOperation("DeleteHostedZone"); var request = InstantiateClassGenerator.Execute(); var marshaller = new DeleteHostedZoneRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("DeleteHostedZone", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("PriorRequestNotCompleteException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = DeleteHostedZoneResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void DeleteKeySigningKeyMarshallTest() { var operation = service_model.FindOperation("DeleteKeySigningKey"); var request = InstantiateClassGenerator.Execute(); var marshaller = new DeleteKeySigningKeyRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("DeleteKeySigningKey", request, internalRequest, service_model); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"} } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(); webResponse.ContentLength = payloadResponse.Length; var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), false, webResponse); ResponseUnmarshaller unmarshaller = DeleteKeySigningKeyResponseUnmarshaller.Instance; var response = unmarshaller.Unmarshall(context) as DeleteKeySigningKeyResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void DeleteKeySigningKey_ConcurrentModificationExceptionMarshallTest() { var operation = service_model.FindOperation("DeleteKeySigningKey"); var request = InstantiateClassGenerator.Execute(); var marshaller = new DeleteKeySigningKeyRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("DeleteKeySigningKey", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("ConcurrentModificationException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = DeleteKeySigningKeyResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void DeleteKeySigningKey_InvalidInputExceptionMarshallTest() { var operation = service_model.FindOperation("DeleteKeySigningKey"); var request = InstantiateClassGenerator.Execute(); var marshaller = new DeleteKeySigningKeyRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("DeleteKeySigningKey", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("InvalidInputException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = DeleteKeySigningKeyResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void DeleteKeySigningKey_InvalidKeySigningKeyStatusExceptionMarshallTest() { var operation = service_model.FindOperation("DeleteKeySigningKey"); var request = InstantiateClassGenerator.Execute(); var marshaller = new DeleteKeySigningKeyRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("DeleteKeySigningKey", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("InvalidKeySigningKeyStatusException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = DeleteKeySigningKeyResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void DeleteKeySigningKey_InvalidKMSArnExceptionMarshallTest() { var operation = service_model.FindOperation("DeleteKeySigningKey"); var request = InstantiateClassGenerator.Execute(); var marshaller = new DeleteKeySigningKeyRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("DeleteKeySigningKey", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("InvalidKMSArnException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = DeleteKeySigningKeyResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void DeleteKeySigningKey_InvalidSigningStatusExceptionMarshallTest() { var operation = service_model.FindOperation("DeleteKeySigningKey"); var request = InstantiateClassGenerator.Execute(); var marshaller = new DeleteKeySigningKeyRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("DeleteKeySigningKey", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("InvalidSigningStatusException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = DeleteKeySigningKeyResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void DeleteKeySigningKey_NoSuchKeySigningKeyExceptionMarshallTest() { var operation = service_model.FindOperation("DeleteKeySigningKey"); var request = InstantiateClassGenerator.Execute(); var marshaller = new DeleteKeySigningKeyRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("DeleteKeySigningKey", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("NoSuchKeySigningKeyException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = DeleteKeySigningKeyResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void DeleteQueryLoggingConfigMarshallTest() { var operation = service_model.FindOperation("DeleteQueryLoggingConfig"); var request = InstantiateClassGenerator.Execute(); var marshaller = new DeleteQueryLoggingConfigRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("DeleteQueryLoggingConfig", request, internalRequest, service_model); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"} } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(); webResponse.ContentLength = payloadResponse.Length; var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), false, webResponse); ResponseUnmarshaller unmarshaller = DeleteQueryLoggingConfigResponseUnmarshaller.Instance; var response = unmarshaller.Unmarshall(context) as DeleteQueryLoggingConfigResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void DeleteQueryLoggingConfig_ConcurrentModificationExceptionMarshallTest() { var operation = service_model.FindOperation("DeleteQueryLoggingConfig"); var request = InstantiateClassGenerator.Execute(); var marshaller = new DeleteQueryLoggingConfigRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("DeleteQueryLoggingConfig", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("ConcurrentModificationException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = DeleteQueryLoggingConfigResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void DeleteQueryLoggingConfig_InvalidInputExceptionMarshallTest() { var operation = service_model.FindOperation("DeleteQueryLoggingConfig"); var request = InstantiateClassGenerator.Execute(); var marshaller = new DeleteQueryLoggingConfigRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("DeleteQueryLoggingConfig", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("InvalidInputException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = DeleteQueryLoggingConfigResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void DeleteQueryLoggingConfig_NoSuchQueryLoggingConfigExceptionMarshallTest() { var operation = service_model.FindOperation("DeleteQueryLoggingConfig"); var request = InstantiateClassGenerator.Execute(); var marshaller = new DeleteQueryLoggingConfigRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("DeleteQueryLoggingConfig", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("NoSuchQueryLoggingConfigException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = DeleteQueryLoggingConfigResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void DeleteReusableDelegationSetMarshallTest() { var operation = service_model.FindOperation("DeleteReusableDelegationSet"); var request = InstantiateClassGenerator.Execute(); var marshaller = new DeleteReusableDelegationSetRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("DeleteReusableDelegationSet", request, internalRequest, service_model); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"} } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(); webResponse.ContentLength = payloadResponse.Length; var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), false, webResponse); ResponseUnmarshaller unmarshaller = DeleteReusableDelegationSetResponseUnmarshaller.Instance; var response = unmarshaller.Unmarshall(context) as DeleteReusableDelegationSetResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void DeleteReusableDelegationSet_DelegationSetInUseExceptionMarshallTest() { var operation = service_model.FindOperation("DeleteReusableDelegationSet"); var request = InstantiateClassGenerator.Execute(); var marshaller = new DeleteReusableDelegationSetRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("DeleteReusableDelegationSet", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("DelegationSetInUseException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = DeleteReusableDelegationSetResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void DeleteReusableDelegationSet_DelegationSetNotReusableExceptionMarshallTest() { var operation = service_model.FindOperation("DeleteReusableDelegationSet"); var request = InstantiateClassGenerator.Execute(); var marshaller = new DeleteReusableDelegationSetRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("DeleteReusableDelegationSet", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("DelegationSetNotReusableException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = DeleteReusableDelegationSetResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void DeleteReusableDelegationSet_InvalidInputExceptionMarshallTest() { var operation = service_model.FindOperation("DeleteReusableDelegationSet"); var request = InstantiateClassGenerator.Execute(); var marshaller = new DeleteReusableDelegationSetRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("DeleteReusableDelegationSet", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("InvalidInputException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = DeleteReusableDelegationSetResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void DeleteReusableDelegationSet_NoSuchDelegationSetExceptionMarshallTest() { var operation = service_model.FindOperation("DeleteReusableDelegationSet"); var request = InstantiateClassGenerator.Execute(); var marshaller = new DeleteReusableDelegationSetRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("DeleteReusableDelegationSet", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("NoSuchDelegationSetException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = DeleteReusableDelegationSetResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void DeleteTrafficPolicyMarshallTest() { var operation = service_model.FindOperation("DeleteTrafficPolicy"); var request = InstantiateClassGenerator.Execute(); var marshaller = new DeleteTrafficPolicyRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("DeleteTrafficPolicy", request, internalRequest, service_model); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"} } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(); webResponse.ContentLength = payloadResponse.Length; var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), false, webResponse); ResponseUnmarshaller unmarshaller = DeleteTrafficPolicyResponseUnmarshaller.Instance; var response = unmarshaller.Unmarshall(context) as DeleteTrafficPolicyResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void DeleteTrafficPolicy_ConcurrentModificationExceptionMarshallTest() { var operation = service_model.FindOperation("DeleteTrafficPolicy"); var request = InstantiateClassGenerator.Execute(); var marshaller = new DeleteTrafficPolicyRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("DeleteTrafficPolicy", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("ConcurrentModificationException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = DeleteTrafficPolicyResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void DeleteTrafficPolicy_InvalidInputExceptionMarshallTest() { var operation = service_model.FindOperation("DeleteTrafficPolicy"); var request = InstantiateClassGenerator.Execute(); var marshaller = new DeleteTrafficPolicyRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("DeleteTrafficPolicy", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("InvalidInputException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = DeleteTrafficPolicyResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void DeleteTrafficPolicy_NoSuchTrafficPolicyExceptionMarshallTest() { var operation = service_model.FindOperation("DeleteTrafficPolicy"); var request = InstantiateClassGenerator.Execute(); var marshaller = new DeleteTrafficPolicyRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("DeleteTrafficPolicy", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("NoSuchTrafficPolicyException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = DeleteTrafficPolicyResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void DeleteTrafficPolicy_TrafficPolicyInUseExceptionMarshallTest() { var operation = service_model.FindOperation("DeleteTrafficPolicy"); var request = InstantiateClassGenerator.Execute(); var marshaller = new DeleteTrafficPolicyRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("DeleteTrafficPolicy", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("TrafficPolicyInUseException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = DeleteTrafficPolicyResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void DeleteTrafficPolicyInstanceMarshallTest() { var operation = service_model.FindOperation("DeleteTrafficPolicyInstance"); var request = InstantiateClassGenerator.Execute(); var marshaller = new DeleteTrafficPolicyInstanceRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("DeleteTrafficPolicyInstance", request, internalRequest, service_model); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"} } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(); webResponse.ContentLength = payloadResponse.Length; var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), false, webResponse); ResponseUnmarshaller unmarshaller = DeleteTrafficPolicyInstanceResponseUnmarshaller.Instance; var response = unmarshaller.Unmarshall(context) as DeleteTrafficPolicyInstanceResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void DeleteTrafficPolicyInstance_InvalidInputExceptionMarshallTest() { var operation = service_model.FindOperation("DeleteTrafficPolicyInstance"); var request = InstantiateClassGenerator.Execute(); var marshaller = new DeleteTrafficPolicyInstanceRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("DeleteTrafficPolicyInstance", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("InvalidInputException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = DeleteTrafficPolicyInstanceResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void DeleteTrafficPolicyInstance_NoSuchTrafficPolicyInstanceExceptionMarshallTest() { var operation = service_model.FindOperation("DeleteTrafficPolicyInstance"); var request = InstantiateClassGenerator.Execute(); var marshaller = new DeleteTrafficPolicyInstanceRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("DeleteTrafficPolicyInstance", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("NoSuchTrafficPolicyInstanceException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = DeleteTrafficPolicyInstanceResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void DeleteTrafficPolicyInstance_PriorRequestNotCompleteExceptionMarshallTest() { var operation = service_model.FindOperation("DeleteTrafficPolicyInstance"); var request = InstantiateClassGenerator.Execute(); var marshaller = new DeleteTrafficPolicyInstanceRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("DeleteTrafficPolicyInstance", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("PriorRequestNotCompleteException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = DeleteTrafficPolicyInstanceResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void DeleteVPCAssociationAuthorizationMarshallTest() { var operation = service_model.FindOperation("DeleteVPCAssociationAuthorization"); var request = InstantiateClassGenerator.Execute(); var marshaller = new DeleteVPCAssociationAuthorizationRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("DeleteVPCAssociationAuthorization", request, internalRequest, service_model); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"} } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(); webResponse.ContentLength = payloadResponse.Length; var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), false, webResponse); ResponseUnmarshaller unmarshaller = DeleteVPCAssociationAuthorizationResponseUnmarshaller.Instance; var response = unmarshaller.Unmarshall(context) as DeleteVPCAssociationAuthorizationResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void DeleteVPCAssociationAuthorization_ConcurrentModificationExceptionMarshallTest() { var operation = service_model.FindOperation("DeleteVPCAssociationAuthorization"); var request = InstantiateClassGenerator.Execute(); var marshaller = new DeleteVPCAssociationAuthorizationRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("DeleteVPCAssociationAuthorization", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("ConcurrentModificationException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = DeleteVPCAssociationAuthorizationResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void DeleteVPCAssociationAuthorization_InvalidInputExceptionMarshallTest() { var operation = service_model.FindOperation("DeleteVPCAssociationAuthorization"); var request = InstantiateClassGenerator.Execute(); var marshaller = new DeleteVPCAssociationAuthorizationRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("DeleteVPCAssociationAuthorization", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("InvalidInputException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = DeleteVPCAssociationAuthorizationResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void DeleteVPCAssociationAuthorization_InvalidVPCIdExceptionMarshallTest() { var operation = service_model.FindOperation("DeleteVPCAssociationAuthorization"); var request = InstantiateClassGenerator.Execute(); var marshaller = new DeleteVPCAssociationAuthorizationRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("DeleteVPCAssociationAuthorization", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("InvalidVPCIdException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = DeleteVPCAssociationAuthorizationResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void DeleteVPCAssociationAuthorization_NoSuchHostedZoneExceptionMarshallTest() { var operation = service_model.FindOperation("DeleteVPCAssociationAuthorization"); var request = InstantiateClassGenerator.Execute(); var marshaller = new DeleteVPCAssociationAuthorizationRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("DeleteVPCAssociationAuthorization", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("NoSuchHostedZoneException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = DeleteVPCAssociationAuthorizationResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void DeleteVPCAssociationAuthorization_VPCAssociationAuthorizationNotFoundExceptionMarshallTest() { var operation = service_model.FindOperation("DeleteVPCAssociationAuthorization"); var request = InstantiateClassGenerator.Execute(); var marshaller = new DeleteVPCAssociationAuthorizationRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("DeleteVPCAssociationAuthorization", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("VPCAssociationAuthorizationNotFoundException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = DeleteVPCAssociationAuthorizationResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void DisableHostedZoneDNSSECMarshallTest() { var operation = service_model.FindOperation("DisableHostedZoneDNSSEC"); var request = InstantiateClassGenerator.Execute(); var marshaller = new DisableHostedZoneDNSSECRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("DisableHostedZoneDNSSEC", request, internalRequest, service_model); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"} } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(); webResponse.ContentLength = payloadResponse.Length; var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), false, webResponse); ResponseUnmarshaller unmarshaller = DisableHostedZoneDNSSECResponseUnmarshaller.Instance; var response = unmarshaller.Unmarshall(context) as DisableHostedZoneDNSSECResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void DisableHostedZoneDNSSEC_ConcurrentModificationExceptionMarshallTest() { var operation = service_model.FindOperation("DisableHostedZoneDNSSEC"); var request = InstantiateClassGenerator.Execute(); var marshaller = new DisableHostedZoneDNSSECRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("DisableHostedZoneDNSSEC", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("ConcurrentModificationException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = DisableHostedZoneDNSSECResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void DisableHostedZoneDNSSEC_DNSSECNotFoundExceptionMarshallTest() { var operation = service_model.FindOperation("DisableHostedZoneDNSSEC"); var request = InstantiateClassGenerator.Execute(); var marshaller = new DisableHostedZoneDNSSECRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("DisableHostedZoneDNSSEC", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("DNSSECNotFoundException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = DisableHostedZoneDNSSECResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void DisableHostedZoneDNSSEC_InvalidArgumentExceptionMarshallTest() { var operation = service_model.FindOperation("DisableHostedZoneDNSSEC"); var request = InstantiateClassGenerator.Execute(); var marshaller = new DisableHostedZoneDNSSECRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("DisableHostedZoneDNSSEC", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("InvalidArgumentException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = DisableHostedZoneDNSSECResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void DisableHostedZoneDNSSEC_InvalidInputExceptionMarshallTest() { var operation = service_model.FindOperation("DisableHostedZoneDNSSEC"); var request = InstantiateClassGenerator.Execute(); var marshaller = new DisableHostedZoneDNSSECRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("DisableHostedZoneDNSSEC", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("InvalidInputException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = DisableHostedZoneDNSSECResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void DisableHostedZoneDNSSEC_InvalidKeySigningKeyStatusExceptionMarshallTest() { var operation = service_model.FindOperation("DisableHostedZoneDNSSEC"); var request = InstantiateClassGenerator.Execute(); var marshaller = new DisableHostedZoneDNSSECRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("DisableHostedZoneDNSSEC", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("InvalidKeySigningKeyStatusException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = DisableHostedZoneDNSSECResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void DisableHostedZoneDNSSEC_InvalidKMSArnExceptionMarshallTest() { var operation = service_model.FindOperation("DisableHostedZoneDNSSEC"); var request = InstantiateClassGenerator.Execute(); var marshaller = new DisableHostedZoneDNSSECRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("DisableHostedZoneDNSSEC", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("InvalidKMSArnException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = DisableHostedZoneDNSSECResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void DisableHostedZoneDNSSEC_KeySigningKeyInParentDSRecordExceptionMarshallTest() { var operation = service_model.FindOperation("DisableHostedZoneDNSSEC"); var request = InstantiateClassGenerator.Execute(); var marshaller = new DisableHostedZoneDNSSECRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("DisableHostedZoneDNSSEC", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("KeySigningKeyInParentDSRecordException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = DisableHostedZoneDNSSECResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void DisableHostedZoneDNSSEC_NoSuchHostedZoneExceptionMarshallTest() { var operation = service_model.FindOperation("DisableHostedZoneDNSSEC"); var request = InstantiateClassGenerator.Execute(); var marshaller = new DisableHostedZoneDNSSECRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("DisableHostedZoneDNSSEC", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("NoSuchHostedZoneException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = DisableHostedZoneDNSSECResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void DisassociateVPCFromHostedZoneMarshallTest() { var operation = service_model.FindOperation("DisassociateVPCFromHostedZone"); var request = InstantiateClassGenerator.Execute(); var marshaller = new DisassociateVPCFromHostedZoneRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("DisassociateVPCFromHostedZone", request, internalRequest, service_model); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"} } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(); webResponse.ContentLength = payloadResponse.Length; var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), false, webResponse); ResponseUnmarshaller unmarshaller = DisassociateVPCFromHostedZoneResponseUnmarshaller.Instance; var response = unmarshaller.Unmarshall(context) as DisassociateVPCFromHostedZoneResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void DisassociateVPCFromHostedZone_InvalidInputExceptionMarshallTest() { var operation = service_model.FindOperation("DisassociateVPCFromHostedZone"); var request = InstantiateClassGenerator.Execute(); var marshaller = new DisassociateVPCFromHostedZoneRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("DisassociateVPCFromHostedZone", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("InvalidInputException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = DisassociateVPCFromHostedZoneResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void DisassociateVPCFromHostedZone_InvalidVPCIdExceptionMarshallTest() { var operation = service_model.FindOperation("DisassociateVPCFromHostedZone"); var request = InstantiateClassGenerator.Execute(); var marshaller = new DisassociateVPCFromHostedZoneRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("DisassociateVPCFromHostedZone", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("InvalidVPCIdException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = DisassociateVPCFromHostedZoneResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void DisassociateVPCFromHostedZone_LastVPCAssociationExceptionMarshallTest() { var operation = service_model.FindOperation("DisassociateVPCFromHostedZone"); var request = InstantiateClassGenerator.Execute(); var marshaller = new DisassociateVPCFromHostedZoneRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("DisassociateVPCFromHostedZone", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("LastVPCAssociationException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = DisassociateVPCFromHostedZoneResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void DisassociateVPCFromHostedZone_NoSuchHostedZoneExceptionMarshallTest() { var operation = service_model.FindOperation("DisassociateVPCFromHostedZone"); var request = InstantiateClassGenerator.Execute(); var marshaller = new DisassociateVPCFromHostedZoneRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("DisassociateVPCFromHostedZone", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("NoSuchHostedZoneException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = DisassociateVPCFromHostedZoneResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void DisassociateVPCFromHostedZone_VPCAssociationNotFoundExceptionMarshallTest() { var operation = service_model.FindOperation("DisassociateVPCFromHostedZone"); var request = InstantiateClassGenerator.Execute(); var marshaller = new DisassociateVPCFromHostedZoneRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("DisassociateVPCFromHostedZone", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("VPCAssociationNotFoundException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = DisassociateVPCFromHostedZoneResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void EnableHostedZoneDNSSECMarshallTest() { var operation = service_model.FindOperation("EnableHostedZoneDNSSEC"); var request = InstantiateClassGenerator.Execute(); var marshaller = new EnableHostedZoneDNSSECRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("EnableHostedZoneDNSSEC", request, internalRequest, service_model); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"} } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(); webResponse.ContentLength = payloadResponse.Length; var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), false, webResponse); ResponseUnmarshaller unmarshaller = EnableHostedZoneDNSSECResponseUnmarshaller.Instance; var response = unmarshaller.Unmarshall(context) as EnableHostedZoneDNSSECResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void EnableHostedZoneDNSSEC_ConcurrentModificationExceptionMarshallTest() { var operation = service_model.FindOperation("EnableHostedZoneDNSSEC"); var request = InstantiateClassGenerator.Execute(); var marshaller = new EnableHostedZoneDNSSECRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("EnableHostedZoneDNSSEC", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("ConcurrentModificationException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = EnableHostedZoneDNSSECResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void EnableHostedZoneDNSSEC_DNSSECNotFoundExceptionMarshallTest() { var operation = service_model.FindOperation("EnableHostedZoneDNSSEC"); var request = InstantiateClassGenerator.Execute(); var marshaller = new EnableHostedZoneDNSSECRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("EnableHostedZoneDNSSEC", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("DNSSECNotFoundException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = EnableHostedZoneDNSSECResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void EnableHostedZoneDNSSEC_HostedZonePartiallyDelegatedExceptionMarshallTest() { var operation = service_model.FindOperation("EnableHostedZoneDNSSEC"); var request = InstantiateClassGenerator.Execute(); var marshaller = new EnableHostedZoneDNSSECRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("EnableHostedZoneDNSSEC", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("HostedZonePartiallyDelegatedException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = EnableHostedZoneDNSSECResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void EnableHostedZoneDNSSEC_InvalidArgumentExceptionMarshallTest() { var operation = service_model.FindOperation("EnableHostedZoneDNSSEC"); var request = InstantiateClassGenerator.Execute(); var marshaller = new EnableHostedZoneDNSSECRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("EnableHostedZoneDNSSEC", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("InvalidArgumentException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = EnableHostedZoneDNSSECResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void EnableHostedZoneDNSSEC_InvalidInputExceptionMarshallTest() { var operation = service_model.FindOperation("EnableHostedZoneDNSSEC"); var request = InstantiateClassGenerator.Execute(); var marshaller = new EnableHostedZoneDNSSECRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("EnableHostedZoneDNSSEC", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("InvalidInputException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = EnableHostedZoneDNSSECResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void EnableHostedZoneDNSSEC_InvalidKeySigningKeyStatusExceptionMarshallTest() { var operation = service_model.FindOperation("EnableHostedZoneDNSSEC"); var request = InstantiateClassGenerator.Execute(); var marshaller = new EnableHostedZoneDNSSECRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("EnableHostedZoneDNSSEC", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("InvalidKeySigningKeyStatusException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = EnableHostedZoneDNSSECResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void EnableHostedZoneDNSSEC_InvalidKMSArnExceptionMarshallTest() { var operation = service_model.FindOperation("EnableHostedZoneDNSSEC"); var request = InstantiateClassGenerator.Execute(); var marshaller = new EnableHostedZoneDNSSECRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("EnableHostedZoneDNSSEC", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("InvalidKMSArnException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = EnableHostedZoneDNSSECResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void EnableHostedZoneDNSSEC_KeySigningKeyWithActiveStatusNotFoundExceptionMarshallTest() { var operation = service_model.FindOperation("EnableHostedZoneDNSSEC"); var request = InstantiateClassGenerator.Execute(); var marshaller = new EnableHostedZoneDNSSECRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("EnableHostedZoneDNSSEC", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("KeySigningKeyWithActiveStatusNotFoundException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = EnableHostedZoneDNSSECResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void EnableHostedZoneDNSSEC_NoSuchHostedZoneExceptionMarshallTest() { var operation = service_model.FindOperation("EnableHostedZoneDNSSEC"); var request = InstantiateClassGenerator.Execute(); var marshaller = new EnableHostedZoneDNSSECRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("EnableHostedZoneDNSSEC", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("NoSuchHostedZoneException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = EnableHostedZoneDNSSECResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void GetAccountLimitMarshallTest() { var operation = service_model.FindOperation("GetAccountLimit"); var request = InstantiateClassGenerator.Execute(); var marshaller = new GetAccountLimitRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("GetAccountLimit", request, internalRequest, service_model); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"} } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(); webResponse.ContentLength = payloadResponse.Length; var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), false, webResponse); ResponseUnmarshaller unmarshaller = GetAccountLimitResponseUnmarshaller.Instance; var response = unmarshaller.Unmarshall(context) as GetAccountLimitResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void GetAccountLimit_InvalidInputExceptionMarshallTest() { var operation = service_model.FindOperation("GetAccountLimit"); var request = InstantiateClassGenerator.Execute(); var marshaller = new GetAccountLimitRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("GetAccountLimit", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("InvalidInputException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = GetAccountLimitResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void GetChangeMarshallTest() { var operation = service_model.FindOperation("GetChange"); var request = InstantiateClassGenerator.Execute(); var marshaller = new GetChangeRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("GetChange", request, internalRequest, service_model); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"} } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(); webResponse.ContentLength = payloadResponse.Length; var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), false, webResponse); ResponseUnmarshaller unmarshaller = GetChangeResponseUnmarshaller.Instance; var response = unmarshaller.Unmarshall(context) as GetChangeResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void GetChange_InvalidInputExceptionMarshallTest() { var operation = service_model.FindOperation("GetChange"); var request = InstantiateClassGenerator.Execute(); var marshaller = new GetChangeRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("GetChange", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("InvalidInputException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = GetChangeResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void GetChange_NoSuchChangeExceptionMarshallTest() { var operation = service_model.FindOperation("GetChange"); var request = InstantiateClassGenerator.Execute(); var marshaller = new GetChangeRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("GetChange", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("NoSuchChangeException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = GetChangeResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void GetCheckerIpRangesMarshallTest() { var operation = service_model.FindOperation("GetCheckerIpRanges"); var request = InstantiateClassGenerator.Execute(); var marshaller = new GetCheckerIpRangesRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("GetCheckerIpRanges", request, internalRequest, service_model); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"} } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(); webResponse.ContentLength = payloadResponse.Length; var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), false, webResponse); ResponseUnmarshaller unmarshaller = GetCheckerIpRangesResponseUnmarshaller.Instance; var response = unmarshaller.Unmarshall(context) as GetCheckerIpRangesResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void GetDNSSECMarshallTest() { var operation = service_model.FindOperation("GetDNSSEC"); var request = InstantiateClassGenerator.Execute(); var marshaller = new GetDNSSECRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("GetDNSSEC", request, internalRequest, service_model); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"} } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(); webResponse.ContentLength = payloadResponse.Length; var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), false, webResponse); ResponseUnmarshaller unmarshaller = GetDNSSECResponseUnmarshaller.Instance; var response = unmarshaller.Unmarshall(context) as GetDNSSECResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void GetDNSSEC_InvalidArgumentExceptionMarshallTest() { var operation = service_model.FindOperation("GetDNSSEC"); var request = InstantiateClassGenerator.Execute(); var marshaller = new GetDNSSECRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("GetDNSSEC", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("InvalidArgumentException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = GetDNSSECResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void GetDNSSEC_InvalidInputExceptionMarshallTest() { var operation = service_model.FindOperation("GetDNSSEC"); var request = InstantiateClassGenerator.Execute(); var marshaller = new GetDNSSECRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("GetDNSSEC", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("InvalidInputException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = GetDNSSECResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void GetDNSSEC_NoSuchHostedZoneExceptionMarshallTest() { var operation = service_model.FindOperation("GetDNSSEC"); var request = InstantiateClassGenerator.Execute(); var marshaller = new GetDNSSECRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("GetDNSSEC", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("NoSuchHostedZoneException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = GetDNSSECResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void GetGeoLocationMarshallTest() { var operation = service_model.FindOperation("GetGeoLocation"); var request = InstantiateClassGenerator.Execute(); var marshaller = new GetGeoLocationRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("GetGeoLocation", request, internalRequest, service_model); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"} } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(); webResponse.ContentLength = payloadResponse.Length; var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), false, webResponse); ResponseUnmarshaller unmarshaller = GetGeoLocationResponseUnmarshaller.Instance; var response = unmarshaller.Unmarshall(context) as GetGeoLocationResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void GetGeoLocation_InvalidInputExceptionMarshallTest() { var operation = service_model.FindOperation("GetGeoLocation"); var request = InstantiateClassGenerator.Execute(); var marshaller = new GetGeoLocationRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("GetGeoLocation", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("InvalidInputException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = GetGeoLocationResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void GetGeoLocation_NoSuchGeoLocationExceptionMarshallTest() { var operation = service_model.FindOperation("GetGeoLocation"); var request = InstantiateClassGenerator.Execute(); var marshaller = new GetGeoLocationRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("GetGeoLocation", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("NoSuchGeoLocationException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = GetGeoLocationResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void GetHealthCheckMarshallTest() { var operation = service_model.FindOperation("GetHealthCheck"); var request = InstantiateClassGenerator.Execute(); var marshaller = new GetHealthCheckRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("GetHealthCheck", request, internalRequest, service_model); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"} } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(); webResponse.ContentLength = payloadResponse.Length; var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), false, webResponse); ResponseUnmarshaller unmarshaller = GetHealthCheckResponseUnmarshaller.Instance; var response = unmarshaller.Unmarshall(context) as GetHealthCheckResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void GetHealthCheck_IncompatibleVersionExceptionMarshallTest() { var operation = service_model.FindOperation("GetHealthCheck"); var request = InstantiateClassGenerator.Execute(); var marshaller = new GetHealthCheckRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("GetHealthCheck", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("IncompatibleVersionException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = GetHealthCheckResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void GetHealthCheck_InvalidInputExceptionMarshallTest() { var operation = service_model.FindOperation("GetHealthCheck"); var request = InstantiateClassGenerator.Execute(); var marshaller = new GetHealthCheckRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("GetHealthCheck", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("InvalidInputException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = GetHealthCheckResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void GetHealthCheck_NoSuchHealthCheckExceptionMarshallTest() { var operation = service_model.FindOperation("GetHealthCheck"); var request = InstantiateClassGenerator.Execute(); var marshaller = new GetHealthCheckRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("GetHealthCheck", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("NoSuchHealthCheckException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = GetHealthCheckResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void GetHealthCheckCountMarshallTest() { var operation = service_model.FindOperation("GetHealthCheckCount"); var request = InstantiateClassGenerator.Execute(); var marshaller = new GetHealthCheckCountRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("GetHealthCheckCount", request, internalRequest, service_model); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"} } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(); webResponse.ContentLength = payloadResponse.Length; var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), false, webResponse); ResponseUnmarshaller unmarshaller = GetHealthCheckCountResponseUnmarshaller.Instance; var response = unmarshaller.Unmarshall(context) as GetHealthCheckCountResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void GetHealthCheckLastFailureReasonMarshallTest() { var operation = service_model.FindOperation("GetHealthCheckLastFailureReason"); var request = InstantiateClassGenerator.Execute(); var marshaller = new GetHealthCheckLastFailureReasonRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("GetHealthCheckLastFailureReason", request, internalRequest, service_model); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"} } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(); webResponse.ContentLength = payloadResponse.Length; var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), false, webResponse); ResponseUnmarshaller unmarshaller = GetHealthCheckLastFailureReasonResponseUnmarshaller.Instance; var response = unmarshaller.Unmarshall(context) as GetHealthCheckLastFailureReasonResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void GetHealthCheckLastFailureReason_InvalidInputExceptionMarshallTest() { var operation = service_model.FindOperation("GetHealthCheckLastFailureReason"); var request = InstantiateClassGenerator.Execute(); var marshaller = new GetHealthCheckLastFailureReasonRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("GetHealthCheckLastFailureReason", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("InvalidInputException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = GetHealthCheckLastFailureReasonResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void GetHealthCheckLastFailureReason_NoSuchHealthCheckExceptionMarshallTest() { var operation = service_model.FindOperation("GetHealthCheckLastFailureReason"); var request = InstantiateClassGenerator.Execute(); var marshaller = new GetHealthCheckLastFailureReasonRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("GetHealthCheckLastFailureReason", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("NoSuchHealthCheckException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = GetHealthCheckLastFailureReasonResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void GetHealthCheckStatusMarshallTest() { var operation = service_model.FindOperation("GetHealthCheckStatus"); var request = InstantiateClassGenerator.Execute(); var marshaller = new GetHealthCheckStatusRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("GetHealthCheckStatus", request, internalRequest, service_model); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"} } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(); webResponse.ContentLength = payloadResponse.Length; var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), false, webResponse); ResponseUnmarshaller unmarshaller = GetHealthCheckStatusResponseUnmarshaller.Instance; var response = unmarshaller.Unmarshall(context) as GetHealthCheckStatusResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void GetHealthCheckStatus_InvalidInputExceptionMarshallTest() { var operation = service_model.FindOperation("GetHealthCheckStatus"); var request = InstantiateClassGenerator.Execute(); var marshaller = new GetHealthCheckStatusRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("GetHealthCheckStatus", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("InvalidInputException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = GetHealthCheckStatusResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void GetHealthCheckStatus_NoSuchHealthCheckExceptionMarshallTest() { var operation = service_model.FindOperation("GetHealthCheckStatus"); var request = InstantiateClassGenerator.Execute(); var marshaller = new GetHealthCheckStatusRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("GetHealthCheckStatus", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("NoSuchHealthCheckException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = GetHealthCheckStatusResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void GetHostedZoneMarshallTest() { var operation = service_model.FindOperation("GetHostedZone"); var request = InstantiateClassGenerator.Execute(); var marshaller = new GetHostedZoneRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("GetHostedZone", request, internalRequest, service_model); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"} } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(); webResponse.ContentLength = payloadResponse.Length; var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), false, webResponse); ResponseUnmarshaller unmarshaller = GetHostedZoneResponseUnmarshaller.Instance; var response = unmarshaller.Unmarshall(context) as GetHostedZoneResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void GetHostedZone_InvalidInputExceptionMarshallTest() { var operation = service_model.FindOperation("GetHostedZone"); var request = InstantiateClassGenerator.Execute(); var marshaller = new GetHostedZoneRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("GetHostedZone", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("InvalidInputException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = GetHostedZoneResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void GetHostedZone_NoSuchHostedZoneExceptionMarshallTest() { var operation = service_model.FindOperation("GetHostedZone"); var request = InstantiateClassGenerator.Execute(); var marshaller = new GetHostedZoneRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("GetHostedZone", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("NoSuchHostedZoneException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = GetHostedZoneResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void GetHostedZoneCountMarshallTest() { var operation = service_model.FindOperation("GetHostedZoneCount"); var request = InstantiateClassGenerator.Execute(); var marshaller = new GetHostedZoneCountRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("GetHostedZoneCount", request, internalRequest, service_model); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"} } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(); webResponse.ContentLength = payloadResponse.Length; var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), false, webResponse); ResponseUnmarshaller unmarshaller = GetHostedZoneCountResponseUnmarshaller.Instance; var response = unmarshaller.Unmarshall(context) as GetHostedZoneCountResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void GetHostedZoneCount_InvalidInputExceptionMarshallTest() { var operation = service_model.FindOperation("GetHostedZoneCount"); var request = InstantiateClassGenerator.Execute(); var marshaller = new GetHostedZoneCountRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("GetHostedZoneCount", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("InvalidInputException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = GetHostedZoneCountResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void GetHostedZoneLimitMarshallTest() { var operation = service_model.FindOperation("GetHostedZoneLimit"); var request = InstantiateClassGenerator.Execute(); var marshaller = new GetHostedZoneLimitRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("GetHostedZoneLimit", request, internalRequest, service_model); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"} } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(); webResponse.ContentLength = payloadResponse.Length; var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), false, webResponse); ResponseUnmarshaller unmarshaller = GetHostedZoneLimitResponseUnmarshaller.Instance; var response = unmarshaller.Unmarshall(context) as GetHostedZoneLimitResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void GetHostedZoneLimit_HostedZoneNotPrivateExceptionMarshallTest() { var operation = service_model.FindOperation("GetHostedZoneLimit"); var request = InstantiateClassGenerator.Execute(); var marshaller = new GetHostedZoneLimitRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("GetHostedZoneLimit", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("HostedZoneNotPrivateException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = GetHostedZoneLimitResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void GetHostedZoneLimit_InvalidInputExceptionMarshallTest() { var operation = service_model.FindOperation("GetHostedZoneLimit"); var request = InstantiateClassGenerator.Execute(); var marshaller = new GetHostedZoneLimitRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("GetHostedZoneLimit", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("InvalidInputException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = GetHostedZoneLimitResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void GetHostedZoneLimit_NoSuchHostedZoneExceptionMarshallTest() { var operation = service_model.FindOperation("GetHostedZoneLimit"); var request = InstantiateClassGenerator.Execute(); var marshaller = new GetHostedZoneLimitRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("GetHostedZoneLimit", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("NoSuchHostedZoneException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = GetHostedZoneLimitResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void GetQueryLoggingConfigMarshallTest() { var operation = service_model.FindOperation("GetQueryLoggingConfig"); var request = InstantiateClassGenerator.Execute(); var marshaller = new GetQueryLoggingConfigRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("GetQueryLoggingConfig", request, internalRequest, service_model); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"} } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(); webResponse.ContentLength = payloadResponse.Length; var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), false, webResponse); ResponseUnmarshaller unmarshaller = GetQueryLoggingConfigResponseUnmarshaller.Instance; var response = unmarshaller.Unmarshall(context) as GetQueryLoggingConfigResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void GetQueryLoggingConfig_InvalidInputExceptionMarshallTest() { var operation = service_model.FindOperation("GetQueryLoggingConfig"); var request = InstantiateClassGenerator.Execute(); var marshaller = new GetQueryLoggingConfigRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("GetQueryLoggingConfig", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("InvalidInputException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = GetQueryLoggingConfigResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void GetQueryLoggingConfig_NoSuchQueryLoggingConfigExceptionMarshallTest() { var operation = service_model.FindOperation("GetQueryLoggingConfig"); var request = InstantiateClassGenerator.Execute(); var marshaller = new GetQueryLoggingConfigRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("GetQueryLoggingConfig", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("NoSuchQueryLoggingConfigException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = GetQueryLoggingConfigResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void GetReusableDelegationSetMarshallTest() { var operation = service_model.FindOperation("GetReusableDelegationSet"); var request = InstantiateClassGenerator.Execute(); var marshaller = new GetReusableDelegationSetRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("GetReusableDelegationSet", request, internalRequest, service_model); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"} } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(); webResponse.ContentLength = payloadResponse.Length; var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), false, webResponse); ResponseUnmarshaller unmarshaller = GetReusableDelegationSetResponseUnmarshaller.Instance; var response = unmarshaller.Unmarshall(context) as GetReusableDelegationSetResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void GetReusableDelegationSet_DelegationSetNotReusableExceptionMarshallTest() { var operation = service_model.FindOperation("GetReusableDelegationSet"); var request = InstantiateClassGenerator.Execute(); var marshaller = new GetReusableDelegationSetRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("GetReusableDelegationSet", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("DelegationSetNotReusableException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = GetReusableDelegationSetResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void GetReusableDelegationSet_InvalidInputExceptionMarshallTest() { var operation = service_model.FindOperation("GetReusableDelegationSet"); var request = InstantiateClassGenerator.Execute(); var marshaller = new GetReusableDelegationSetRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("GetReusableDelegationSet", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("InvalidInputException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = GetReusableDelegationSetResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void GetReusableDelegationSet_NoSuchDelegationSetExceptionMarshallTest() { var operation = service_model.FindOperation("GetReusableDelegationSet"); var request = InstantiateClassGenerator.Execute(); var marshaller = new GetReusableDelegationSetRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("GetReusableDelegationSet", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("NoSuchDelegationSetException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = GetReusableDelegationSetResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void GetReusableDelegationSetLimitMarshallTest() { var operation = service_model.FindOperation("GetReusableDelegationSetLimit"); var request = InstantiateClassGenerator.Execute(); var marshaller = new GetReusableDelegationSetLimitRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("GetReusableDelegationSetLimit", request, internalRequest, service_model); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"} } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(); webResponse.ContentLength = payloadResponse.Length; var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), false, webResponse); ResponseUnmarshaller unmarshaller = GetReusableDelegationSetLimitResponseUnmarshaller.Instance; var response = unmarshaller.Unmarshall(context) as GetReusableDelegationSetLimitResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void GetReusableDelegationSetLimit_InvalidInputExceptionMarshallTest() { var operation = service_model.FindOperation("GetReusableDelegationSetLimit"); var request = InstantiateClassGenerator.Execute(); var marshaller = new GetReusableDelegationSetLimitRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("GetReusableDelegationSetLimit", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("InvalidInputException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = GetReusableDelegationSetLimitResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void GetReusableDelegationSetLimit_NoSuchDelegationSetExceptionMarshallTest() { var operation = service_model.FindOperation("GetReusableDelegationSetLimit"); var request = InstantiateClassGenerator.Execute(); var marshaller = new GetReusableDelegationSetLimitRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("GetReusableDelegationSetLimit", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("NoSuchDelegationSetException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = GetReusableDelegationSetLimitResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void GetTrafficPolicyMarshallTest() { var operation = service_model.FindOperation("GetTrafficPolicy"); var request = InstantiateClassGenerator.Execute(); var marshaller = new GetTrafficPolicyRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("GetTrafficPolicy", request, internalRequest, service_model); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"} } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(); webResponse.ContentLength = payloadResponse.Length; var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), false, webResponse); ResponseUnmarshaller unmarshaller = GetTrafficPolicyResponseUnmarshaller.Instance; var response = unmarshaller.Unmarshall(context) as GetTrafficPolicyResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void GetTrafficPolicy_InvalidInputExceptionMarshallTest() { var operation = service_model.FindOperation("GetTrafficPolicy"); var request = InstantiateClassGenerator.Execute(); var marshaller = new GetTrafficPolicyRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("GetTrafficPolicy", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("InvalidInputException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = GetTrafficPolicyResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void GetTrafficPolicy_NoSuchTrafficPolicyExceptionMarshallTest() { var operation = service_model.FindOperation("GetTrafficPolicy"); var request = InstantiateClassGenerator.Execute(); var marshaller = new GetTrafficPolicyRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("GetTrafficPolicy", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("NoSuchTrafficPolicyException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = GetTrafficPolicyResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void GetTrafficPolicyInstanceMarshallTest() { var operation = service_model.FindOperation("GetTrafficPolicyInstance"); var request = InstantiateClassGenerator.Execute(); var marshaller = new GetTrafficPolicyInstanceRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("GetTrafficPolicyInstance", request, internalRequest, service_model); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"} } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(); webResponse.ContentLength = payloadResponse.Length; var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), false, webResponse); ResponseUnmarshaller unmarshaller = GetTrafficPolicyInstanceResponseUnmarshaller.Instance; var response = unmarshaller.Unmarshall(context) as GetTrafficPolicyInstanceResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void GetTrafficPolicyInstance_InvalidInputExceptionMarshallTest() { var operation = service_model.FindOperation("GetTrafficPolicyInstance"); var request = InstantiateClassGenerator.Execute(); var marshaller = new GetTrafficPolicyInstanceRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("GetTrafficPolicyInstance", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("InvalidInputException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = GetTrafficPolicyInstanceResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void GetTrafficPolicyInstance_NoSuchTrafficPolicyInstanceExceptionMarshallTest() { var operation = service_model.FindOperation("GetTrafficPolicyInstance"); var request = InstantiateClassGenerator.Execute(); var marshaller = new GetTrafficPolicyInstanceRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("GetTrafficPolicyInstance", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("NoSuchTrafficPolicyInstanceException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = GetTrafficPolicyInstanceResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void GetTrafficPolicyInstanceCountMarshallTest() { var operation = service_model.FindOperation("GetTrafficPolicyInstanceCount"); var request = InstantiateClassGenerator.Execute(); var marshaller = new GetTrafficPolicyInstanceCountRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("GetTrafficPolicyInstanceCount", request, internalRequest, service_model); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"} } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(); webResponse.ContentLength = payloadResponse.Length; var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), false, webResponse); ResponseUnmarshaller unmarshaller = GetTrafficPolicyInstanceCountResponseUnmarshaller.Instance; var response = unmarshaller.Unmarshall(context) as GetTrafficPolicyInstanceCountResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void ListCidrBlocksMarshallTest() { var operation = service_model.FindOperation("ListCidrBlocks"); var request = InstantiateClassGenerator.Execute(); var marshaller = new ListCidrBlocksRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("ListCidrBlocks", request, internalRequest, service_model); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"} } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(); webResponse.ContentLength = payloadResponse.Length; var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), false, webResponse); ResponseUnmarshaller unmarshaller = ListCidrBlocksResponseUnmarshaller.Instance; var response = unmarshaller.Unmarshall(context) as ListCidrBlocksResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void ListCidrBlocks_InvalidInputExceptionMarshallTest() { var operation = service_model.FindOperation("ListCidrBlocks"); var request = InstantiateClassGenerator.Execute(); var marshaller = new ListCidrBlocksRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("ListCidrBlocks", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("InvalidInputException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = ListCidrBlocksResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void ListCidrBlocks_NoSuchCidrCollectionExceptionMarshallTest() { var operation = service_model.FindOperation("ListCidrBlocks"); var request = InstantiateClassGenerator.Execute(); var marshaller = new ListCidrBlocksRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("ListCidrBlocks", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("NoSuchCidrCollectionException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = ListCidrBlocksResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void ListCidrBlocks_NoSuchCidrLocationExceptionMarshallTest() { var operation = service_model.FindOperation("ListCidrBlocks"); var request = InstantiateClassGenerator.Execute(); var marshaller = new ListCidrBlocksRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("ListCidrBlocks", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("NoSuchCidrLocationException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = ListCidrBlocksResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void ListCidrCollectionsMarshallTest() { var operation = service_model.FindOperation("ListCidrCollections"); var request = InstantiateClassGenerator.Execute(); var marshaller = new ListCidrCollectionsRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("ListCidrCollections", request, internalRequest, service_model); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"} } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(); webResponse.ContentLength = payloadResponse.Length; var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), false, webResponse); ResponseUnmarshaller unmarshaller = ListCidrCollectionsResponseUnmarshaller.Instance; var response = unmarshaller.Unmarshall(context) as ListCidrCollectionsResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void ListCidrCollections_InvalidInputExceptionMarshallTest() { var operation = service_model.FindOperation("ListCidrCollections"); var request = InstantiateClassGenerator.Execute(); var marshaller = new ListCidrCollectionsRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("ListCidrCollections", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("InvalidInputException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = ListCidrCollectionsResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void ListCidrLocationsMarshallTest() { var operation = service_model.FindOperation("ListCidrLocations"); var request = InstantiateClassGenerator.Execute(); var marshaller = new ListCidrLocationsRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("ListCidrLocations", request, internalRequest, service_model); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"} } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(); webResponse.ContentLength = payloadResponse.Length; var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), false, webResponse); ResponseUnmarshaller unmarshaller = ListCidrLocationsResponseUnmarshaller.Instance; var response = unmarshaller.Unmarshall(context) as ListCidrLocationsResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void ListCidrLocations_InvalidInputExceptionMarshallTest() { var operation = service_model.FindOperation("ListCidrLocations"); var request = InstantiateClassGenerator.Execute(); var marshaller = new ListCidrLocationsRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("ListCidrLocations", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("InvalidInputException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = ListCidrLocationsResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void ListCidrLocations_NoSuchCidrCollectionExceptionMarshallTest() { var operation = service_model.FindOperation("ListCidrLocations"); var request = InstantiateClassGenerator.Execute(); var marshaller = new ListCidrLocationsRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("ListCidrLocations", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("NoSuchCidrCollectionException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = ListCidrLocationsResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void ListGeoLocationsMarshallTest() { var operation = service_model.FindOperation("ListGeoLocations"); var request = InstantiateClassGenerator.Execute(); var marshaller = new ListGeoLocationsRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("ListGeoLocations", request, internalRequest, service_model); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"} } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(); webResponse.ContentLength = payloadResponse.Length; var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), false, webResponse); ResponseUnmarshaller unmarshaller = ListGeoLocationsResponseUnmarshaller.Instance; var response = unmarshaller.Unmarshall(context) as ListGeoLocationsResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void ListGeoLocations_InvalidInputExceptionMarshallTest() { var operation = service_model.FindOperation("ListGeoLocations"); var request = InstantiateClassGenerator.Execute(); var marshaller = new ListGeoLocationsRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("ListGeoLocations", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("InvalidInputException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = ListGeoLocationsResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void ListHealthChecksMarshallTest() { var operation = service_model.FindOperation("ListHealthChecks"); var request = InstantiateClassGenerator.Execute(); var marshaller = new ListHealthChecksRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("ListHealthChecks", request, internalRequest, service_model); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"} } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(); webResponse.ContentLength = payloadResponse.Length; var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), false, webResponse); ResponseUnmarshaller unmarshaller = ListHealthChecksResponseUnmarshaller.Instance; var response = unmarshaller.Unmarshall(context) as ListHealthChecksResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void ListHealthChecks_IncompatibleVersionExceptionMarshallTest() { var operation = service_model.FindOperation("ListHealthChecks"); var request = InstantiateClassGenerator.Execute(); var marshaller = new ListHealthChecksRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("ListHealthChecks", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("IncompatibleVersionException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = ListHealthChecksResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void ListHealthChecks_InvalidInputExceptionMarshallTest() { var operation = service_model.FindOperation("ListHealthChecks"); var request = InstantiateClassGenerator.Execute(); var marshaller = new ListHealthChecksRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("ListHealthChecks", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("InvalidInputException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = ListHealthChecksResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void ListHostedZonesMarshallTest() { var operation = service_model.FindOperation("ListHostedZones"); var request = InstantiateClassGenerator.Execute(); var marshaller = new ListHostedZonesRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("ListHostedZones", request, internalRequest, service_model); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"} } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(); webResponse.ContentLength = payloadResponse.Length; var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), false, webResponse); ResponseUnmarshaller unmarshaller = ListHostedZonesResponseUnmarshaller.Instance; var response = unmarshaller.Unmarshall(context) as ListHostedZonesResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void ListHostedZones_DelegationSetNotReusableExceptionMarshallTest() { var operation = service_model.FindOperation("ListHostedZones"); var request = InstantiateClassGenerator.Execute(); var marshaller = new ListHostedZonesRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("ListHostedZones", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("DelegationSetNotReusableException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = ListHostedZonesResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void ListHostedZones_InvalidInputExceptionMarshallTest() { var operation = service_model.FindOperation("ListHostedZones"); var request = InstantiateClassGenerator.Execute(); var marshaller = new ListHostedZonesRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("ListHostedZones", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("InvalidInputException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = ListHostedZonesResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void ListHostedZones_NoSuchDelegationSetExceptionMarshallTest() { var operation = service_model.FindOperation("ListHostedZones"); var request = InstantiateClassGenerator.Execute(); var marshaller = new ListHostedZonesRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("ListHostedZones", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("NoSuchDelegationSetException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = ListHostedZonesResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void ListHostedZonesByNameMarshallTest() { var operation = service_model.FindOperation("ListHostedZonesByName"); var request = InstantiateClassGenerator.Execute(); var marshaller = new ListHostedZonesByNameRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("ListHostedZonesByName", request, internalRequest, service_model); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"} } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(); webResponse.ContentLength = payloadResponse.Length; var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), false, webResponse); ResponseUnmarshaller unmarshaller = ListHostedZonesByNameResponseUnmarshaller.Instance; var response = unmarshaller.Unmarshall(context) as ListHostedZonesByNameResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void ListHostedZonesByName_InvalidDomainNameExceptionMarshallTest() { var operation = service_model.FindOperation("ListHostedZonesByName"); var request = InstantiateClassGenerator.Execute(); var marshaller = new ListHostedZonesByNameRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("ListHostedZonesByName", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("InvalidDomainNameException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = ListHostedZonesByNameResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void ListHostedZonesByName_InvalidInputExceptionMarshallTest() { var operation = service_model.FindOperation("ListHostedZonesByName"); var request = InstantiateClassGenerator.Execute(); var marshaller = new ListHostedZonesByNameRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("ListHostedZonesByName", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("InvalidInputException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = ListHostedZonesByNameResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void ListHostedZonesByVPCMarshallTest() { var operation = service_model.FindOperation("ListHostedZonesByVPC"); var request = InstantiateClassGenerator.Execute(); var marshaller = new ListHostedZonesByVPCRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("ListHostedZonesByVPC", request, internalRequest, service_model); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"} } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(); webResponse.ContentLength = payloadResponse.Length; var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), false, webResponse); ResponseUnmarshaller unmarshaller = ListHostedZonesByVPCResponseUnmarshaller.Instance; var response = unmarshaller.Unmarshall(context) as ListHostedZonesByVPCResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void ListHostedZonesByVPC_InvalidInputExceptionMarshallTest() { var operation = service_model.FindOperation("ListHostedZonesByVPC"); var request = InstantiateClassGenerator.Execute(); var marshaller = new ListHostedZonesByVPCRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("ListHostedZonesByVPC", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("InvalidInputException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = ListHostedZonesByVPCResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void ListHostedZonesByVPC_InvalidPaginationTokenExceptionMarshallTest() { var operation = service_model.FindOperation("ListHostedZonesByVPC"); var request = InstantiateClassGenerator.Execute(); var marshaller = new ListHostedZonesByVPCRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("ListHostedZonesByVPC", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("InvalidPaginationTokenException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = ListHostedZonesByVPCResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void ListQueryLoggingConfigsMarshallTest() { var operation = service_model.FindOperation("ListQueryLoggingConfigs"); var request = InstantiateClassGenerator.Execute(); var marshaller = new ListQueryLoggingConfigsRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("ListQueryLoggingConfigs", request, internalRequest, service_model); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"} } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(); webResponse.ContentLength = payloadResponse.Length; var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), false, webResponse); ResponseUnmarshaller unmarshaller = ListQueryLoggingConfigsResponseUnmarshaller.Instance; var response = unmarshaller.Unmarshall(context) as ListQueryLoggingConfigsResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void ListQueryLoggingConfigs_InvalidInputExceptionMarshallTest() { var operation = service_model.FindOperation("ListQueryLoggingConfigs"); var request = InstantiateClassGenerator.Execute(); var marshaller = new ListQueryLoggingConfigsRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("ListQueryLoggingConfigs", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("InvalidInputException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = ListQueryLoggingConfigsResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void ListQueryLoggingConfigs_InvalidPaginationTokenExceptionMarshallTest() { var operation = service_model.FindOperation("ListQueryLoggingConfigs"); var request = InstantiateClassGenerator.Execute(); var marshaller = new ListQueryLoggingConfigsRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("ListQueryLoggingConfigs", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("InvalidPaginationTokenException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = ListQueryLoggingConfigsResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void ListQueryLoggingConfigs_NoSuchHostedZoneExceptionMarshallTest() { var operation = service_model.FindOperation("ListQueryLoggingConfigs"); var request = InstantiateClassGenerator.Execute(); var marshaller = new ListQueryLoggingConfigsRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("ListQueryLoggingConfigs", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("NoSuchHostedZoneException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = ListQueryLoggingConfigsResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void ListResourceRecordSetsMarshallTest() { var operation = service_model.FindOperation("ListResourceRecordSets"); var request = InstantiateClassGenerator.Execute(); var marshaller = new ListResourceRecordSetsRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("ListResourceRecordSets", request, internalRequest, service_model); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"} } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(); webResponse.ContentLength = payloadResponse.Length; var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), false, webResponse); ResponseUnmarshaller unmarshaller = ListResourceRecordSetsResponseUnmarshaller.Instance; var response = unmarshaller.Unmarshall(context) as ListResourceRecordSetsResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void ListResourceRecordSets_InvalidInputExceptionMarshallTest() { var operation = service_model.FindOperation("ListResourceRecordSets"); var request = InstantiateClassGenerator.Execute(); var marshaller = new ListResourceRecordSetsRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("ListResourceRecordSets", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("InvalidInputException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = ListResourceRecordSetsResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void ListResourceRecordSets_NoSuchHostedZoneExceptionMarshallTest() { var operation = service_model.FindOperation("ListResourceRecordSets"); var request = InstantiateClassGenerator.Execute(); var marshaller = new ListResourceRecordSetsRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("ListResourceRecordSets", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("NoSuchHostedZoneException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = ListResourceRecordSetsResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void ListReusableDelegationSetsMarshallTest() { var operation = service_model.FindOperation("ListReusableDelegationSets"); var request = InstantiateClassGenerator.Execute(); var marshaller = new ListReusableDelegationSetsRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("ListReusableDelegationSets", request, internalRequest, service_model); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"} } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(); webResponse.ContentLength = payloadResponse.Length; var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), false, webResponse); ResponseUnmarshaller unmarshaller = ListReusableDelegationSetsResponseUnmarshaller.Instance; var response = unmarshaller.Unmarshall(context) as ListReusableDelegationSetsResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void ListReusableDelegationSets_InvalidInputExceptionMarshallTest() { var operation = service_model.FindOperation("ListReusableDelegationSets"); var request = InstantiateClassGenerator.Execute(); var marshaller = new ListReusableDelegationSetsRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("ListReusableDelegationSets", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("InvalidInputException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = ListReusableDelegationSetsResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void ListTagsForResourceMarshallTest() { var operation = service_model.FindOperation("ListTagsForResource"); var request = InstantiateClassGenerator.Execute(); var marshaller = new ListTagsForResourceRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("ListTagsForResource", request, internalRequest, service_model); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"} } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(); webResponse.ContentLength = payloadResponse.Length; var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), false, webResponse); ResponseUnmarshaller unmarshaller = ListTagsForResourceResponseUnmarshaller.Instance; var response = unmarshaller.Unmarshall(context) as ListTagsForResourceResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void ListTagsForResource_InvalidInputExceptionMarshallTest() { var operation = service_model.FindOperation("ListTagsForResource"); var request = InstantiateClassGenerator.Execute(); var marshaller = new ListTagsForResourceRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("ListTagsForResource", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("InvalidInputException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = ListTagsForResourceResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void ListTagsForResource_NoSuchHealthCheckExceptionMarshallTest() { var operation = service_model.FindOperation("ListTagsForResource"); var request = InstantiateClassGenerator.Execute(); var marshaller = new ListTagsForResourceRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("ListTagsForResource", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("NoSuchHealthCheckException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = ListTagsForResourceResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void ListTagsForResource_NoSuchHostedZoneExceptionMarshallTest() { var operation = service_model.FindOperation("ListTagsForResource"); var request = InstantiateClassGenerator.Execute(); var marshaller = new ListTagsForResourceRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("ListTagsForResource", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("NoSuchHostedZoneException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = ListTagsForResourceResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void ListTagsForResource_PriorRequestNotCompleteExceptionMarshallTest() { var operation = service_model.FindOperation("ListTagsForResource"); var request = InstantiateClassGenerator.Execute(); var marshaller = new ListTagsForResourceRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("ListTagsForResource", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("PriorRequestNotCompleteException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = ListTagsForResourceResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void ListTagsForResource_ThrottlingExceptionMarshallTest() { var operation = service_model.FindOperation("ListTagsForResource"); var request = InstantiateClassGenerator.Execute(); var marshaller = new ListTagsForResourceRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("ListTagsForResource", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("ThrottlingException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = ListTagsForResourceResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void ListTagsForResourcesMarshallTest() { var operation = service_model.FindOperation("ListTagsForResources"); var request = InstantiateClassGenerator.Execute(); var marshaller = new ListTagsForResourcesRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("ListTagsForResources", request, internalRequest, service_model); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"} } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(); webResponse.ContentLength = payloadResponse.Length; var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), false, webResponse); ResponseUnmarshaller unmarshaller = ListTagsForResourcesResponseUnmarshaller.Instance; var response = unmarshaller.Unmarshall(context) as ListTagsForResourcesResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void ListTagsForResources_InvalidInputExceptionMarshallTest() { var operation = service_model.FindOperation("ListTagsForResources"); var request = InstantiateClassGenerator.Execute(); var marshaller = new ListTagsForResourcesRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("ListTagsForResources", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("InvalidInputException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = ListTagsForResourcesResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void ListTagsForResources_NoSuchHealthCheckExceptionMarshallTest() { var operation = service_model.FindOperation("ListTagsForResources"); var request = InstantiateClassGenerator.Execute(); var marshaller = new ListTagsForResourcesRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("ListTagsForResources", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("NoSuchHealthCheckException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = ListTagsForResourcesResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void ListTagsForResources_NoSuchHostedZoneExceptionMarshallTest() { var operation = service_model.FindOperation("ListTagsForResources"); var request = InstantiateClassGenerator.Execute(); var marshaller = new ListTagsForResourcesRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("ListTagsForResources", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("NoSuchHostedZoneException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = ListTagsForResourcesResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void ListTagsForResources_PriorRequestNotCompleteExceptionMarshallTest() { var operation = service_model.FindOperation("ListTagsForResources"); var request = InstantiateClassGenerator.Execute(); var marshaller = new ListTagsForResourcesRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("ListTagsForResources", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("PriorRequestNotCompleteException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = ListTagsForResourcesResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void ListTagsForResources_ThrottlingExceptionMarshallTest() { var operation = service_model.FindOperation("ListTagsForResources"); var request = InstantiateClassGenerator.Execute(); var marshaller = new ListTagsForResourcesRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("ListTagsForResources", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("ThrottlingException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = ListTagsForResourcesResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void ListTrafficPoliciesMarshallTest() { var operation = service_model.FindOperation("ListTrafficPolicies"); var request = InstantiateClassGenerator.Execute(); var marshaller = new ListTrafficPoliciesRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("ListTrafficPolicies", request, internalRequest, service_model); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"} } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(); webResponse.ContentLength = payloadResponse.Length; var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), false, webResponse); ResponseUnmarshaller unmarshaller = ListTrafficPoliciesResponseUnmarshaller.Instance; var response = unmarshaller.Unmarshall(context) as ListTrafficPoliciesResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void ListTrafficPolicies_InvalidInputExceptionMarshallTest() { var operation = service_model.FindOperation("ListTrafficPolicies"); var request = InstantiateClassGenerator.Execute(); var marshaller = new ListTrafficPoliciesRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("ListTrafficPolicies", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("InvalidInputException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = ListTrafficPoliciesResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void ListTrafficPolicyInstancesMarshallTest() { var operation = service_model.FindOperation("ListTrafficPolicyInstances"); var request = InstantiateClassGenerator.Execute(); var marshaller = new ListTrafficPolicyInstancesRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("ListTrafficPolicyInstances", request, internalRequest, service_model); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"} } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(); webResponse.ContentLength = payloadResponse.Length; var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), false, webResponse); ResponseUnmarshaller unmarshaller = ListTrafficPolicyInstancesResponseUnmarshaller.Instance; var response = unmarshaller.Unmarshall(context) as ListTrafficPolicyInstancesResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void ListTrafficPolicyInstances_InvalidInputExceptionMarshallTest() { var operation = service_model.FindOperation("ListTrafficPolicyInstances"); var request = InstantiateClassGenerator.Execute(); var marshaller = new ListTrafficPolicyInstancesRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("ListTrafficPolicyInstances", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("InvalidInputException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = ListTrafficPolicyInstancesResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void ListTrafficPolicyInstances_NoSuchTrafficPolicyInstanceExceptionMarshallTest() { var operation = service_model.FindOperation("ListTrafficPolicyInstances"); var request = InstantiateClassGenerator.Execute(); var marshaller = new ListTrafficPolicyInstancesRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("ListTrafficPolicyInstances", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("NoSuchTrafficPolicyInstanceException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = ListTrafficPolicyInstancesResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void ListTrafficPolicyInstancesByHostedZoneMarshallTest() { var operation = service_model.FindOperation("ListTrafficPolicyInstancesByHostedZone"); var request = InstantiateClassGenerator.Execute(); var marshaller = new ListTrafficPolicyInstancesByHostedZoneRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("ListTrafficPolicyInstancesByHostedZone", request, internalRequest, service_model); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"} } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(); webResponse.ContentLength = payloadResponse.Length; var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), false, webResponse); ResponseUnmarshaller unmarshaller = ListTrafficPolicyInstancesByHostedZoneResponseUnmarshaller.Instance; var response = unmarshaller.Unmarshall(context) as ListTrafficPolicyInstancesByHostedZoneResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void ListTrafficPolicyInstancesByHostedZone_InvalidInputExceptionMarshallTest() { var operation = service_model.FindOperation("ListTrafficPolicyInstancesByHostedZone"); var request = InstantiateClassGenerator.Execute(); var marshaller = new ListTrafficPolicyInstancesByHostedZoneRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("ListTrafficPolicyInstancesByHostedZone", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("InvalidInputException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = ListTrafficPolicyInstancesByHostedZoneResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void ListTrafficPolicyInstancesByHostedZone_NoSuchHostedZoneExceptionMarshallTest() { var operation = service_model.FindOperation("ListTrafficPolicyInstancesByHostedZone"); var request = InstantiateClassGenerator.Execute(); var marshaller = new ListTrafficPolicyInstancesByHostedZoneRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("ListTrafficPolicyInstancesByHostedZone", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("NoSuchHostedZoneException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = ListTrafficPolicyInstancesByHostedZoneResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void ListTrafficPolicyInstancesByHostedZone_NoSuchTrafficPolicyInstanceExceptionMarshallTest() { var operation = service_model.FindOperation("ListTrafficPolicyInstancesByHostedZone"); var request = InstantiateClassGenerator.Execute(); var marshaller = new ListTrafficPolicyInstancesByHostedZoneRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("ListTrafficPolicyInstancesByHostedZone", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("NoSuchTrafficPolicyInstanceException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = ListTrafficPolicyInstancesByHostedZoneResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void ListTrafficPolicyInstancesByPolicyMarshallTest() { var operation = service_model.FindOperation("ListTrafficPolicyInstancesByPolicy"); var request = InstantiateClassGenerator.Execute(); var marshaller = new ListTrafficPolicyInstancesByPolicyRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("ListTrafficPolicyInstancesByPolicy", request, internalRequest, service_model); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"} } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(); webResponse.ContentLength = payloadResponse.Length; var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), false, webResponse); ResponseUnmarshaller unmarshaller = ListTrafficPolicyInstancesByPolicyResponseUnmarshaller.Instance; var response = unmarshaller.Unmarshall(context) as ListTrafficPolicyInstancesByPolicyResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void ListTrafficPolicyInstancesByPolicy_InvalidInputExceptionMarshallTest() { var operation = service_model.FindOperation("ListTrafficPolicyInstancesByPolicy"); var request = InstantiateClassGenerator.Execute(); var marshaller = new ListTrafficPolicyInstancesByPolicyRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("ListTrafficPolicyInstancesByPolicy", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("InvalidInputException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = ListTrafficPolicyInstancesByPolicyResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void ListTrafficPolicyInstancesByPolicy_NoSuchTrafficPolicyExceptionMarshallTest() { var operation = service_model.FindOperation("ListTrafficPolicyInstancesByPolicy"); var request = InstantiateClassGenerator.Execute(); var marshaller = new ListTrafficPolicyInstancesByPolicyRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("ListTrafficPolicyInstancesByPolicy", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("NoSuchTrafficPolicyException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = ListTrafficPolicyInstancesByPolicyResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void ListTrafficPolicyInstancesByPolicy_NoSuchTrafficPolicyInstanceExceptionMarshallTest() { var operation = service_model.FindOperation("ListTrafficPolicyInstancesByPolicy"); var request = InstantiateClassGenerator.Execute(); var marshaller = new ListTrafficPolicyInstancesByPolicyRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("ListTrafficPolicyInstancesByPolicy", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("NoSuchTrafficPolicyInstanceException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = ListTrafficPolicyInstancesByPolicyResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void ListTrafficPolicyVersionsMarshallTest() { var operation = service_model.FindOperation("ListTrafficPolicyVersions"); var request = InstantiateClassGenerator.Execute(); var marshaller = new ListTrafficPolicyVersionsRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("ListTrafficPolicyVersions", request, internalRequest, service_model); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"} } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(); webResponse.ContentLength = payloadResponse.Length; var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), false, webResponse); ResponseUnmarshaller unmarshaller = ListTrafficPolicyVersionsResponseUnmarshaller.Instance; var response = unmarshaller.Unmarshall(context) as ListTrafficPolicyVersionsResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void ListTrafficPolicyVersions_InvalidInputExceptionMarshallTest() { var operation = service_model.FindOperation("ListTrafficPolicyVersions"); var request = InstantiateClassGenerator.Execute(); var marshaller = new ListTrafficPolicyVersionsRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("ListTrafficPolicyVersions", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("InvalidInputException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = ListTrafficPolicyVersionsResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void ListTrafficPolicyVersions_NoSuchTrafficPolicyExceptionMarshallTest() { var operation = service_model.FindOperation("ListTrafficPolicyVersions"); var request = InstantiateClassGenerator.Execute(); var marshaller = new ListTrafficPolicyVersionsRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("ListTrafficPolicyVersions", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("NoSuchTrafficPolicyException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = ListTrafficPolicyVersionsResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void ListVPCAssociationAuthorizationsMarshallTest() { var operation = service_model.FindOperation("ListVPCAssociationAuthorizations"); var request = InstantiateClassGenerator.Execute(); var marshaller = new ListVPCAssociationAuthorizationsRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("ListVPCAssociationAuthorizations", request, internalRequest, service_model); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"} } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(); webResponse.ContentLength = payloadResponse.Length; var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), false, webResponse); ResponseUnmarshaller unmarshaller = ListVPCAssociationAuthorizationsResponseUnmarshaller.Instance; var response = unmarshaller.Unmarshall(context) as ListVPCAssociationAuthorizationsResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void ListVPCAssociationAuthorizations_InvalidInputExceptionMarshallTest() { var operation = service_model.FindOperation("ListVPCAssociationAuthorizations"); var request = InstantiateClassGenerator.Execute(); var marshaller = new ListVPCAssociationAuthorizationsRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("ListVPCAssociationAuthorizations", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("InvalidInputException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = ListVPCAssociationAuthorizationsResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void ListVPCAssociationAuthorizations_InvalidPaginationTokenExceptionMarshallTest() { var operation = service_model.FindOperation("ListVPCAssociationAuthorizations"); var request = InstantiateClassGenerator.Execute(); var marshaller = new ListVPCAssociationAuthorizationsRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("ListVPCAssociationAuthorizations", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("InvalidPaginationTokenException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = ListVPCAssociationAuthorizationsResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void ListVPCAssociationAuthorizations_NoSuchHostedZoneExceptionMarshallTest() { var operation = service_model.FindOperation("ListVPCAssociationAuthorizations"); var request = InstantiateClassGenerator.Execute(); var marshaller = new ListVPCAssociationAuthorizationsRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("ListVPCAssociationAuthorizations", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("NoSuchHostedZoneException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = ListVPCAssociationAuthorizationsResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void TestDNSAnswerMarshallTest() { var operation = service_model.FindOperation("TestDNSAnswer"); var request = InstantiateClassGenerator.Execute(); var marshaller = new TestDNSAnswerRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("TestDNSAnswer", request, internalRequest, service_model); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"} } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(); webResponse.ContentLength = payloadResponse.Length; var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), false, webResponse); ResponseUnmarshaller unmarshaller = TestDNSAnswerResponseUnmarshaller.Instance; var response = unmarshaller.Unmarshall(context) as TestDNSAnswerResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void TestDNSAnswer_InvalidInputExceptionMarshallTest() { var operation = service_model.FindOperation("TestDNSAnswer"); var request = InstantiateClassGenerator.Execute(); var marshaller = new TestDNSAnswerRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("TestDNSAnswer", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("InvalidInputException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = TestDNSAnswerResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void TestDNSAnswer_NoSuchHostedZoneExceptionMarshallTest() { var operation = service_model.FindOperation("TestDNSAnswer"); var request = InstantiateClassGenerator.Execute(); var marshaller = new TestDNSAnswerRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("TestDNSAnswer", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("NoSuchHostedZoneException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = TestDNSAnswerResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void UpdateHealthCheckMarshallTest() { var operation = service_model.FindOperation("UpdateHealthCheck"); var request = InstantiateClassGenerator.Execute(); var marshaller = new UpdateHealthCheckRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("UpdateHealthCheck", request, internalRequest, service_model); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"} } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(); webResponse.ContentLength = payloadResponse.Length; var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), false, webResponse); ResponseUnmarshaller unmarshaller = UpdateHealthCheckResponseUnmarshaller.Instance; var response = unmarshaller.Unmarshall(context) as UpdateHealthCheckResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void UpdateHealthCheck_HealthCheckVersionMismatchExceptionMarshallTest() { var operation = service_model.FindOperation("UpdateHealthCheck"); var request = InstantiateClassGenerator.Execute(); var marshaller = new UpdateHealthCheckRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("UpdateHealthCheck", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("HealthCheckVersionMismatchException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = UpdateHealthCheckResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void UpdateHealthCheck_InvalidInputExceptionMarshallTest() { var operation = service_model.FindOperation("UpdateHealthCheck"); var request = InstantiateClassGenerator.Execute(); var marshaller = new UpdateHealthCheckRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("UpdateHealthCheck", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("InvalidInputException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = UpdateHealthCheckResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void UpdateHealthCheck_NoSuchHealthCheckExceptionMarshallTest() { var operation = service_model.FindOperation("UpdateHealthCheck"); var request = InstantiateClassGenerator.Execute(); var marshaller = new UpdateHealthCheckRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("UpdateHealthCheck", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("NoSuchHealthCheckException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = UpdateHealthCheckResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void UpdateHostedZoneCommentMarshallTest() { var operation = service_model.FindOperation("UpdateHostedZoneComment"); var request = InstantiateClassGenerator.Execute(); var marshaller = new UpdateHostedZoneCommentRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("UpdateHostedZoneComment", request, internalRequest, service_model); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"} } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(); webResponse.ContentLength = payloadResponse.Length; var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), false, webResponse); ResponseUnmarshaller unmarshaller = UpdateHostedZoneCommentResponseUnmarshaller.Instance; var response = unmarshaller.Unmarshall(context) as UpdateHostedZoneCommentResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void UpdateHostedZoneComment_InvalidInputExceptionMarshallTest() { var operation = service_model.FindOperation("UpdateHostedZoneComment"); var request = InstantiateClassGenerator.Execute(); var marshaller = new UpdateHostedZoneCommentRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("UpdateHostedZoneComment", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("InvalidInputException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = UpdateHostedZoneCommentResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void UpdateHostedZoneComment_NoSuchHostedZoneExceptionMarshallTest() { var operation = service_model.FindOperation("UpdateHostedZoneComment"); var request = InstantiateClassGenerator.Execute(); var marshaller = new UpdateHostedZoneCommentRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("UpdateHostedZoneComment", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("NoSuchHostedZoneException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = UpdateHostedZoneCommentResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void UpdateHostedZoneComment_PriorRequestNotCompleteExceptionMarshallTest() { var operation = service_model.FindOperation("UpdateHostedZoneComment"); var request = InstantiateClassGenerator.Execute(); var marshaller = new UpdateHostedZoneCommentRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("UpdateHostedZoneComment", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("PriorRequestNotCompleteException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = UpdateHostedZoneCommentResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void UpdateTrafficPolicyCommentMarshallTest() { var operation = service_model.FindOperation("UpdateTrafficPolicyComment"); var request = InstantiateClassGenerator.Execute(); var marshaller = new UpdateTrafficPolicyCommentRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("UpdateTrafficPolicyComment", request, internalRequest, service_model); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"} } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(); webResponse.ContentLength = payloadResponse.Length; var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), false, webResponse); ResponseUnmarshaller unmarshaller = UpdateTrafficPolicyCommentResponseUnmarshaller.Instance; var response = unmarshaller.Unmarshall(context) as UpdateTrafficPolicyCommentResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void UpdateTrafficPolicyComment_ConcurrentModificationExceptionMarshallTest() { var operation = service_model.FindOperation("UpdateTrafficPolicyComment"); var request = InstantiateClassGenerator.Execute(); var marshaller = new UpdateTrafficPolicyCommentRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("UpdateTrafficPolicyComment", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("ConcurrentModificationException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = UpdateTrafficPolicyCommentResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void UpdateTrafficPolicyComment_InvalidInputExceptionMarshallTest() { var operation = service_model.FindOperation("UpdateTrafficPolicyComment"); var request = InstantiateClassGenerator.Execute(); var marshaller = new UpdateTrafficPolicyCommentRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("UpdateTrafficPolicyComment", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("InvalidInputException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = UpdateTrafficPolicyCommentResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void UpdateTrafficPolicyComment_NoSuchTrafficPolicyExceptionMarshallTest() { var operation = service_model.FindOperation("UpdateTrafficPolicyComment"); var request = InstantiateClassGenerator.Execute(); var marshaller = new UpdateTrafficPolicyCommentRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("UpdateTrafficPolicyComment", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("NoSuchTrafficPolicyException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = UpdateTrafficPolicyCommentResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void UpdateTrafficPolicyInstanceMarshallTest() { var operation = service_model.FindOperation("UpdateTrafficPolicyInstance"); var request = InstantiateClassGenerator.Execute(); var marshaller = new UpdateTrafficPolicyInstanceRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("UpdateTrafficPolicyInstance", request, internalRequest, service_model); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"} } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(); webResponse.ContentLength = payloadResponse.Length; var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), false, webResponse); ResponseUnmarshaller unmarshaller = UpdateTrafficPolicyInstanceResponseUnmarshaller.Instance; var response = unmarshaller.Unmarshall(context) as UpdateTrafficPolicyInstanceResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void UpdateTrafficPolicyInstance_ConflictingTypesExceptionMarshallTest() { var operation = service_model.FindOperation("UpdateTrafficPolicyInstance"); var request = InstantiateClassGenerator.Execute(); var marshaller = new UpdateTrafficPolicyInstanceRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("UpdateTrafficPolicyInstance", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("ConflictingTypesException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = UpdateTrafficPolicyInstanceResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void UpdateTrafficPolicyInstance_InvalidInputExceptionMarshallTest() { var operation = service_model.FindOperation("UpdateTrafficPolicyInstance"); var request = InstantiateClassGenerator.Execute(); var marshaller = new UpdateTrafficPolicyInstanceRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("UpdateTrafficPolicyInstance", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("InvalidInputException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = UpdateTrafficPolicyInstanceResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void UpdateTrafficPolicyInstance_NoSuchTrafficPolicyExceptionMarshallTest() { var operation = service_model.FindOperation("UpdateTrafficPolicyInstance"); var request = InstantiateClassGenerator.Execute(); var marshaller = new UpdateTrafficPolicyInstanceRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("UpdateTrafficPolicyInstance", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("NoSuchTrafficPolicyException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = UpdateTrafficPolicyInstanceResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void UpdateTrafficPolicyInstance_NoSuchTrafficPolicyInstanceExceptionMarshallTest() { var operation = service_model.FindOperation("UpdateTrafficPolicyInstance"); var request = InstantiateClassGenerator.Execute(); var marshaller = new UpdateTrafficPolicyInstanceRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("UpdateTrafficPolicyInstance", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("NoSuchTrafficPolicyInstanceException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = UpdateTrafficPolicyInstanceResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Xml")] [TestCategory("Route53")] public void UpdateTrafficPolicyInstance_PriorRequestNotCompleteExceptionMarshallTest() { var operation = service_model.FindOperation("UpdateTrafficPolicyInstance"); var request = InstantiateClassGenerator.Execute(); var marshaller = new UpdateTrafficPolicyInstanceRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("UpdateTrafficPolicyInstance", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("PriorRequestNotCompleteException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = UpdateTrafficPolicyInstanceResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } } }