/* * 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 pinpoint-email-2018-07-26.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.PinpointEmail; using Amazon.PinpointEmail.Model; using Amazon.PinpointEmail.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 PinpointEmailMarshallingTests { static readonly ServiceModel service_model = Utils.LoadServiceModel("pinpoint-email"); [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("PinpointEmail")] public void CreateConfigurationSetMarshallTest() { var operation = service_model.FindOperation("CreateConfigurationSet"); var request = InstantiateClassGenerator.Execute(); var marshaller = new CreateConfigurationSetRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("CreateConfigurationSet", request, internalRequest, service_model); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"} } }; var payloadResponse = new JsonSampleGenerator(service_model, operation.ResponseStructure).Execute(); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new JsonUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), false, webResponse); ResponseUnmarshaller unmarshaller = CreateConfigurationSetResponseUnmarshaller.Instance; var response = unmarshaller.Unmarshall(context) as CreateConfigurationSetResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("PinpointEmail")] public void CreateConfigurationSet_AlreadyExistsExceptionMarshallTest() { var operation = service_model.FindOperation("CreateConfigurationSet"); var request = InstantiateClassGenerator.Execute(); var marshaller = new CreateConfigurationSetRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("CreateConfigurationSet", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("AlreadyExistsException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","AlreadyExistsException"}, } }; var payloadResponse = new JsonSampleGenerator(service_model, exception).Execute(); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new JsonUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = CreateConfigurationSetResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("PinpointEmail")] public void CreateConfigurationSet_BadRequestExceptionMarshallTest() { var operation = service_model.FindOperation("CreateConfigurationSet"); var request = InstantiateClassGenerator.Execute(); var marshaller = new CreateConfigurationSetRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("CreateConfigurationSet", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("BadRequestException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","BadRequestException"}, } }; var payloadResponse = new JsonSampleGenerator(service_model, exception).Execute(); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new JsonUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = CreateConfigurationSetResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("PinpointEmail")] public void CreateConfigurationSet_ConcurrentModificationExceptionMarshallTest() { var operation = service_model.FindOperation("CreateConfigurationSet"); var request = InstantiateClassGenerator.Execute(); var marshaller = new CreateConfigurationSetRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("CreateConfigurationSet", 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"}, {"x-amzn-ErrorType","ConcurrentModificationException"}, } }; var payloadResponse = new JsonSampleGenerator(service_model, exception).Execute(); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new JsonUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = CreateConfigurationSetResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("PinpointEmail")] public void CreateConfigurationSet_LimitExceededExceptionMarshallTest() { var operation = service_model.FindOperation("CreateConfigurationSet"); var request = InstantiateClassGenerator.Execute(); var marshaller = new CreateConfigurationSetRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("CreateConfigurationSet", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("LimitExceededException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","LimitExceededException"}, } }; var payloadResponse = new JsonSampleGenerator(service_model, exception).Execute(); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new JsonUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = CreateConfigurationSetResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("PinpointEmail")] public void CreateConfigurationSet_NotFoundExceptionMarshallTest() { var operation = service_model.FindOperation("CreateConfigurationSet"); var request = InstantiateClassGenerator.Execute(); var marshaller = new CreateConfigurationSetRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("CreateConfigurationSet", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("NotFoundException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","NotFoundException"}, } }; var payloadResponse = new JsonSampleGenerator(service_model, exception).Execute(); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new JsonUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = CreateConfigurationSetResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("PinpointEmail")] public void CreateConfigurationSet_TooManyRequestsExceptionMarshallTest() { var operation = service_model.FindOperation("CreateConfigurationSet"); var request = InstantiateClassGenerator.Execute(); var marshaller = new CreateConfigurationSetRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("CreateConfigurationSet", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("TooManyRequestsException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","TooManyRequestsException"}, } }; var payloadResponse = new JsonSampleGenerator(service_model, exception).Execute(); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new JsonUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = CreateConfigurationSetResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("PinpointEmail")] public void CreateConfigurationSetEventDestinationMarshallTest() { var operation = service_model.FindOperation("CreateConfigurationSetEventDestination"); var request = InstantiateClassGenerator.Execute(); var marshaller = new CreateConfigurationSetEventDestinationRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("CreateConfigurationSetEventDestination", request, internalRequest, service_model); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"} } }; var payloadResponse = new JsonSampleGenerator(service_model, operation.ResponseStructure).Execute(); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new JsonUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), false, webResponse); ResponseUnmarshaller unmarshaller = CreateConfigurationSetEventDestinationResponseUnmarshaller.Instance; var response = unmarshaller.Unmarshall(context) as CreateConfigurationSetEventDestinationResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("PinpointEmail")] public void CreateConfigurationSetEventDestination_AlreadyExistsExceptionMarshallTest() { var operation = service_model.FindOperation("CreateConfigurationSetEventDestination"); var request = InstantiateClassGenerator.Execute(); var marshaller = new CreateConfigurationSetEventDestinationRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("CreateConfigurationSetEventDestination", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("AlreadyExistsException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","AlreadyExistsException"}, } }; var payloadResponse = new JsonSampleGenerator(service_model, exception).Execute(); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new JsonUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = CreateConfigurationSetEventDestinationResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("PinpointEmail")] public void CreateConfigurationSetEventDestination_BadRequestExceptionMarshallTest() { var operation = service_model.FindOperation("CreateConfigurationSetEventDestination"); var request = InstantiateClassGenerator.Execute(); var marshaller = new CreateConfigurationSetEventDestinationRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("CreateConfigurationSetEventDestination", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("BadRequestException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","BadRequestException"}, } }; var payloadResponse = new JsonSampleGenerator(service_model, exception).Execute(); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new JsonUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = CreateConfigurationSetEventDestinationResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("PinpointEmail")] public void CreateConfigurationSetEventDestination_LimitExceededExceptionMarshallTest() { var operation = service_model.FindOperation("CreateConfigurationSetEventDestination"); var request = InstantiateClassGenerator.Execute(); var marshaller = new CreateConfigurationSetEventDestinationRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("CreateConfigurationSetEventDestination", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("LimitExceededException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","LimitExceededException"}, } }; var payloadResponse = new JsonSampleGenerator(service_model, exception).Execute(); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new JsonUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = CreateConfigurationSetEventDestinationResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("PinpointEmail")] public void CreateConfigurationSetEventDestination_NotFoundExceptionMarshallTest() { var operation = service_model.FindOperation("CreateConfigurationSetEventDestination"); var request = InstantiateClassGenerator.Execute(); var marshaller = new CreateConfigurationSetEventDestinationRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("CreateConfigurationSetEventDestination", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("NotFoundException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","NotFoundException"}, } }; var payloadResponse = new JsonSampleGenerator(service_model, exception).Execute(); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new JsonUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = CreateConfigurationSetEventDestinationResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("PinpointEmail")] public void CreateConfigurationSetEventDestination_TooManyRequestsExceptionMarshallTest() { var operation = service_model.FindOperation("CreateConfigurationSetEventDestination"); var request = InstantiateClassGenerator.Execute(); var marshaller = new CreateConfigurationSetEventDestinationRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("CreateConfigurationSetEventDestination", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("TooManyRequestsException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","TooManyRequestsException"}, } }; var payloadResponse = new JsonSampleGenerator(service_model, exception).Execute(); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new JsonUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = CreateConfigurationSetEventDestinationResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("PinpointEmail")] public void CreateDedicatedIpPoolMarshallTest() { var operation = service_model.FindOperation("CreateDedicatedIpPool"); var request = InstantiateClassGenerator.Execute(); var marshaller = new CreateDedicatedIpPoolRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("CreateDedicatedIpPool", request, internalRequest, service_model); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"} } }; var payloadResponse = new JsonSampleGenerator(service_model, operation.ResponseStructure).Execute(); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new JsonUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), false, webResponse); ResponseUnmarshaller unmarshaller = CreateDedicatedIpPoolResponseUnmarshaller.Instance; var response = unmarshaller.Unmarshall(context) as CreateDedicatedIpPoolResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("PinpointEmail")] public void CreateDedicatedIpPool_AlreadyExistsExceptionMarshallTest() { var operation = service_model.FindOperation("CreateDedicatedIpPool"); var request = InstantiateClassGenerator.Execute(); var marshaller = new CreateDedicatedIpPoolRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("CreateDedicatedIpPool", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("AlreadyExistsException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","AlreadyExistsException"}, } }; var payloadResponse = new JsonSampleGenerator(service_model, exception).Execute(); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new JsonUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = CreateDedicatedIpPoolResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("PinpointEmail")] public void CreateDedicatedIpPool_BadRequestExceptionMarshallTest() { var operation = service_model.FindOperation("CreateDedicatedIpPool"); var request = InstantiateClassGenerator.Execute(); var marshaller = new CreateDedicatedIpPoolRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("CreateDedicatedIpPool", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("BadRequestException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","BadRequestException"}, } }; var payloadResponse = new JsonSampleGenerator(service_model, exception).Execute(); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new JsonUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = CreateDedicatedIpPoolResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("PinpointEmail")] public void CreateDedicatedIpPool_ConcurrentModificationExceptionMarshallTest() { var operation = service_model.FindOperation("CreateDedicatedIpPool"); var request = InstantiateClassGenerator.Execute(); var marshaller = new CreateDedicatedIpPoolRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("CreateDedicatedIpPool", 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"}, {"x-amzn-ErrorType","ConcurrentModificationException"}, } }; var payloadResponse = new JsonSampleGenerator(service_model, exception).Execute(); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new JsonUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = CreateDedicatedIpPoolResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("PinpointEmail")] public void CreateDedicatedIpPool_LimitExceededExceptionMarshallTest() { var operation = service_model.FindOperation("CreateDedicatedIpPool"); var request = InstantiateClassGenerator.Execute(); var marshaller = new CreateDedicatedIpPoolRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("CreateDedicatedIpPool", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("LimitExceededException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","LimitExceededException"}, } }; var payloadResponse = new JsonSampleGenerator(service_model, exception).Execute(); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new JsonUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = CreateDedicatedIpPoolResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("PinpointEmail")] public void CreateDedicatedIpPool_TooManyRequestsExceptionMarshallTest() { var operation = service_model.FindOperation("CreateDedicatedIpPool"); var request = InstantiateClassGenerator.Execute(); var marshaller = new CreateDedicatedIpPoolRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("CreateDedicatedIpPool", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("TooManyRequestsException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","TooManyRequestsException"}, } }; var payloadResponse = new JsonSampleGenerator(service_model, exception).Execute(); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new JsonUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = CreateDedicatedIpPoolResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("PinpointEmail")] public void CreateDeliverabilityTestReportMarshallTest() { var operation = service_model.FindOperation("CreateDeliverabilityTestReport"); var request = InstantiateClassGenerator.Execute(); var marshaller = new CreateDeliverabilityTestReportRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("CreateDeliverabilityTestReport", request, internalRequest, service_model); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"} } }; var payloadResponse = new JsonSampleGenerator(service_model, operation.ResponseStructure).Execute(); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new JsonUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), false, webResponse); ResponseUnmarshaller unmarshaller = CreateDeliverabilityTestReportResponseUnmarshaller.Instance; var response = unmarshaller.Unmarshall(context) as CreateDeliverabilityTestReportResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("PinpointEmail")] public void CreateDeliverabilityTestReport_AccountSuspendedExceptionMarshallTest() { var operation = service_model.FindOperation("CreateDeliverabilityTestReport"); var request = InstantiateClassGenerator.Execute(); var marshaller = new CreateDeliverabilityTestReportRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("CreateDeliverabilityTestReport", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("AccountSuspendedException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","AccountSuspendedException"}, } }; var payloadResponse = new JsonSampleGenerator(service_model, exception).Execute(); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new JsonUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = CreateDeliverabilityTestReportResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("PinpointEmail")] public void CreateDeliverabilityTestReport_BadRequestExceptionMarshallTest() { var operation = service_model.FindOperation("CreateDeliverabilityTestReport"); var request = InstantiateClassGenerator.Execute(); var marshaller = new CreateDeliverabilityTestReportRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("CreateDeliverabilityTestReport", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("BadRequestException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","BadRequestException"}, } }; var payloadResponse = new JsonSampleGenerator(service_model, exception).Execute(); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new JsonUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = CreateDeliverabilityTestReportResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("PinpointEmail")] public void CreateDeliverabilityTestReport_ConcurrentModificationExceptionMarshallTest() { var operation = service_model.FindOperation("CreateDeliverabilityTestReport"); var request = InstantiateClassGenerator.Execute(); var marshaller = new CreateDeliverabilityTestReportRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("CreateDeliverabilityTestReport", 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"}, {"x-amzn-ErrorType","ConcurrentModificationException"}, } }; var payloadResponse = new JsonSampleGenerator(service_model, exception).Execute(); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new JsonUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = CreateDeliverabilityTestReportResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("PinpointEmail")] public void CreateDeliverabilityTestReport_LimitExceededExceptionMarshallTest() { var operation = service_model.FindOperation("CreateDeliverabilityTestReport"); var request = InstantiateClassGenerator.Execute(); var marshaller = new CreateDeliverabilityTestReportRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("CreateDeliverabilityTestReport", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("LimitExceededException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","LimitExceededException"}, } }; var payloadResponse = new JsonSampleGenerator(service_model, exception).Execute(); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new JsonUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = CreateDeliverabilityTestReportResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("PinpointEmail")] public void CreateDeliverabilityTestReport_MailFromDomainNotVerifiedExceptionMarshallTest() { var operation = service_model.FindOperation("CreateDeliverabilityTestReport"); var request = InstantiateClassGenerator.Execute(); var marshaller = new CreateDeliverabilityTestReportRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("CreateDeliverabilityTestReport", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("MailFromDomainNotVerifiedException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","MailFromDomainNotVerifiedException"}, } }; var payloadResponse = new JsonSampleGenerator(service_model, exception).Execute(); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new JsonUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = CreateDeliverabilityTestReportResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("PinpointEmail")] public void CreateDeliverabilityTestReport_MessageRejectedExceptionMarshallTest() { var operation = service_model.FindOperation("CreateDeliverabilityTestReport"); var request = InstantiateClassGenerator.Execute(); var marshaller = new CreateDeliverabilityTestReportRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("CreateDeliverabilityTestReport", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("MessageRejectedException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","MessageRejectedException"}, } }; var payloadResponse = new JsonSampleGenerator(service_model, exception).Execute(); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new JsonUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = CreateDeliverabilityTestReportResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("PinpointEmail")] public void CreateDeliverabilityTestReport_NotFoundExceptionMarshallTest() { var operation = service_model.FindOperation("CreateDeliverabilityTestReport"); var request = InstantiateClassGenerator.Execute(); var marshaller = new CreateDeliverabilityTestReportRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("CreateDeliverabilityTestReport", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("NotFoundException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","NotFoundException"}, } }; var payloadResponse = new JsonSampleGenerator(service_model, exception).Execute(); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new JsonUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = CreateDeliverabilityTestReportResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("PinpointEmail")] public void CreateDeliverabilityTestReport_SendingPausedExceptionMarshallTest() { var operation = service_model.FindOperation("CreateDeliverabilityTestReport"); var request = InstantiateClassGenerator.Execute(); var marshaller = new CreateDeliverabilityTestReportRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("CreateDeliverabilityTestReport", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("SendingPausedException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","SendingPausedException"}, } }; var payloadResponse = new JsonSampleGenerator(service_model, exception).Execute(); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new JsonUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = CreateDeliverabilityTestReportResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("PinpointEmail")] public void CreateDeliverabilityTestReport_TooManyRequestsExceptionMarshallTest() { var operation = service_model.FindOperation("CreateDeliverabilityTestReport"); var request = InstantiateClassGenerator.Execute(); var marshaller = new CreateDeliverabilityTestReportRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("CreateDeliverabilityTestReport", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("TooManyRequestsException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","TooManyRequestsException"}, } }; var payloadResponse = new JsonSampleGenerator(service_model, exception).Execute(); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new JsonUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = CreateDeliverabilityTestReportResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("PinpointEmail")] public void CreateEmailIdentityMarshallTest() { var operation = service_model.FindOperation("CreateEmailIdentity"); var request = InstantiateClassGenerator.Execute(); var marshaller = new CreateEmailIdentityRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("CreateEmailIdentity", request, internalRequest, service_model); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"} } }; var payloadResponse = new JsonSampleGenerator(service_model, operation.ResponseStructure).Execute(); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new JsonUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), false, webResponse); ResponseUnmarshaller unmarshaller = CreateEmailIdentityResponseUnmarshaller.Instance; var response = unmarshaller.Unmarshall(context) as CreateEmailIdentityResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("PinpointEmail")] public void CreateEmailIdentity_BadRequestExceptionMarshallTest() { var operation = service_model.FindOperation("CreateEmailIdentity"); var request = InstantiateClassGenerator.Execute(); var marshaller = new CreateEmailIdentityRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("CreateEmailIdentity", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("BadRequestException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","BadRequestException"}, } }; var payloadResponse = new JsonSampleGenerator(service_model, exception).Execute(); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new JsonUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = CreateEmailIdentityResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("PinpointEmail")] public void CreateEmailIdentity_ConcurrentModificationExceptionMarshallTest() { var operation = service_model.FindOperation("CreateEmailIdentity"); var request = InstantiateClassGenerator.Execute(); var marshaller = new CreateEmailIdentityRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("CreateEmailIdentity", 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"}, {"x-amzn-ErrorType","ConcurrentModificationException"}, } }; var payloadResponse = new JsonSampleGenerator(service_model, exception).Execute(); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new JsonUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = CreateEmailIdentityResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("PinpointEmail")] public void CreateEmailIdentity_LimitExceededExceptionMarshallTest() { var operation = service_model.FindOperation("CreateEmailIdentity"); var request = InstantiateClassGenerator.Execute(); var marshaller = new CreateEmailIdentityRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("CreateEmailIdentity", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("LimitExceededException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","LimitExceededException"}, } }; var payloadResponse = new JsonSampleGenerator(service_model, exception).Execute(); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new JsonUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = CreateEmailIdentityResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("PinpointEmail")] public void CreateEmailIdentity_TooManyRequestsExceptionMarshallTest() { var operation = service_model.FindOperation("CreateEmailIdentity"); var request = InstantiateClassGenerator.Execute(); var marshaller = new CreateEmailIdentityRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("CreateEmailIdentity", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("TooManyRequestsException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","TooManyRequestsException"}, } }; var payloadResponse = new JsonSampleGenerator(service_model, exception).Execute(); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new JsonUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = CreateEmailIdentityResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("PinpointEmail")] public void DeleteConfigurationSetMarshallTest() { var operation = service_model.FindOperation("DeleteConfigurationSet"); var request = InstantiateClassGenerator.Execute(); var marshaller = new DeleteConfigurationSetRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("DeleteConfigurationSet", request, internalRequest, service_model); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"} } }; var payloadResponse = new JsonSampleGenerator(service_model, operation.ResponseStructure).Execute(); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new JsonUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), false, webResponse); ResponseUnmarshaller unmarshaller = DeleteConfigurationSetResponseUnmarshaller.Instance; var response = unmarshaller.Unmarshall(context) as DeleteConfigurationSetResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("PinpointEmail")] public void DeleteConfigurationSet_BadRequestExceptionMarshallTest() { var operation = service_model.FindOperation("DeleteConfigurationSet"); var request = InstantiateClassGenerator.Execute(); var marshaller = new DeleteConfigurationSetRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("DeleteConfigurationSet", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("BadRequestException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","BadRequestException"}, } }; var payloadResponse = new JsonSampleGenerator(service_model, exception).Execute(); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new JsonUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = DeleteConfigurationSetResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("PinpointEmail")] public void DeleteConfigurationSet_ConcurrentModificationExceptionMarshallTest() { var operation = service_model.FindOperation("DeleteConfigurationSet"); var request = InstantiateClassGenerator.Execute(); var marshaller = new DeleteConfigurationSetRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("DeleteConfigurationSet", 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"}, {"x-amzn-ErrorType","ConcurrentModificationException"}, } }; var payloadResponse = new JsonSampleGenerator(service_model, exception).Execute(); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new JsonUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = DeleteConfigurationSetResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("PinpointEmail")] public void DeleteConfigurationSet_NotFoundExceptionMarshallTest() { var operation = service_model.FindOperation("DeleteConfigurationSet"); var request = InstantiateClassGenerator.Execute(); var marshaller = new DeleteConfigurationSetRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("DeleteConfigurationSet", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("NotFoundException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","NotFoundException"}, } }; var payloadResponse = new JsonSampleGenerator(service_model, exception).Execute(); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new JsonUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = DeleteConfigurationSetResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("PinpointEmail")] public void DeleteConfigurationSet_TooManyRequestsExceptionMarshallTest() { var operation = service_model.FindOperation("DeleteConfigurationSet"); var request = InstantiateClassGenerator.Execute(); var marshaller = new DeleteConfigurationSetRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("DeleteConfigurationSet", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("TooManyRequestsException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","TooManyRequestsException"}, } }; var payloadResponse = new JsonSampleGenerator(service_model, exception).Execute(); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new JsonUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = DeleteConfigurationSetResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("PinpointEmail")] public void DeleteConfigurationSetEventDestinationMarshallTest() { var operation = service_model.FindOperation("DeleteConfigurationSetEventDestination"); var request = InstantiateClassGenerator.Execute(); var marshaller = new DeleteConfigurationSetEventDestinationRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("DeleteConfigurationSetEventDestination", request, internalRequest, service_model); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"} } }; var payloadResponse = new JsonSampleGenerator(service_model, operation.ResponseStructure).Execute(); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new JsonUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), false, webResponse); ResponseUnmarshaller unmarshaller = DeleteConfigurationSetEventDestinationResponseUnmarshaller.Instance; var response = unmarshaller.Unmarshall(context) as DeleteConfigurationSetEventDestinationResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("PinpointEmail")] public void DeleteConfigurationSetEventDestination_BadRequestExceptionMarshallTest() { var operation = service_model.FindOperation("DeleteConfigurationSetEventDestination"); var request = InstantiateClassGenerator.Execute(); var marshaller = new DeleteConfigurationSetEventDestinationRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("DeleteConfigurationSetEventDestination", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("BadRequestException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","BadRequestException"}, } }; var payloadResponse = new JsonSampleGenerator(service_model, exception).Execute(); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new JsonUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = DeleteConfigurationSetEventDestinationResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("PinpointEmail")] public void DeleteConfigurationSetEventDestination_NotFoundExceptionMarshallTest() { var operation = service_model.FindOperation("DeleteConfigurationSetEventDestination"); var request = InstantiateClassGenerator.Execute(); var marshaller = new DeleteConfigurationSetEventDestinationRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("DeleteConfigurationSetEventDestination", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("NotFoundException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","NotFoundException"}, } }; var payloadResponse = new JsonSampleGenerator(service_model, exception).Execute(); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new JsonUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = DeleteConfigurationSetEventDestinationResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("PinpointEmail")] public void DeleteConfigurationSetEventDestination_TooManyRequestsExceptionMarshallTest() { var operation = service_model.FindOperation("DeleteConfigurationSetEventDestination"); var request = InstantiateClassGenerator.Execute(); var marshaller = new DeleteConfigurationSetEventDestinationRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("DeleteConfigurationSetEventDestination", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("TooManyRequestsException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","TooManyRequestsException"}, } }; var payloadResponse = new JsonSampleGenerator(service_model, exception).Execute(); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new JsonUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = DeleteConfigurationSetEventDestinationResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("PinpointEmail")] public void DeleteDedicatedIpPoolMarshallTest() { var operation = service_model.FindOperation("DeleteDedicatedIpPool"); var request = InstantiateClassGenerator.Execute(); var marshaller = new DeleteDedicatedIpPoolRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("DeleteDedicatedIpPool", request, internalRequest, service_model); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"} } }; var payloadResponse = new JsonSampleGenerator(service_model, operation.ResponseStructure).Execute(); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new JsonUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), false, webResponse); ResponseUnmarshaller unmarshaller = DeleteDedicatedIpPoolResponseUnmarshaller.Instance; var response = unmarshaller.Unmarshall(context) as DeleteDedicatedIpPoolResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("PinpointEmail")] public void DeleteDedicatedIpPool_BadRequestExceptionMarshallTest() { var operation = service_model.FindOperation("DeleteDedicatedIpPool"); var request = InstantiateClassGenerator.Execute(); var marshaller = new DeleteDedicatedIpPoolRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("DeleteDedicatedIpPool", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("BadRequestException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","BadRequestException"}, } }; var payloadResponse = new JsonSampleGenerator(service_model, exception).Execute(); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new JsonUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = DeleteDedicatedIpPoolResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("PinpointEmail")] public void DeleteDedicatedIpPool_ConcurrentModificationExceptionMarshallTest() { var operation = service_model.FindOperation("DeleteDedicatedIpPool"); var request = InstantiateClassGenerator.Execute(); var marshaller = new DeleteDedicatedIpPoolRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("DeleteDedicatedIpPool", 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"}, {"x-amzn-ErrorType","ConcurrentModificationException"}, } }; var payloadResponse = new JsonSampleGenerator(service_model, exception).Execute(); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new JsonUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = DeleteDedicatedIpPoolResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("PinpointEmail")] public void DeleteDedicatedIpPool_NotFoundExceptionMarshallTest() { var operation = service_model.FindOperation("DeleteDedicatedIpPool"); var request = InstantiateClassGenerator.Execute(); var marshaller = new DeleteDedicatedIpPoolRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("DeleteDedicatedIpPool", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("NotFoundException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","NotFoundException"}, } }; var payloadResponse = new JsonSampleGenerator(service_model, exception).Execute(); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new JsonUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = DeleteDedicatedIpPoolResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("PinpointEmail")] public void DeleteDedicatedIpPool_TooManyRequestsExceptionMarshallTest() { var operation = service_model.FindOperation("DeleteDedicatedIpPool"); var request = InstantiateClassGenerator.Execute(); var marshaller = new DeleteDedicatedIpPoolRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("DeleteDedicatedIpPool", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("TooManyRequestsException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","TooManyRequestsException"}, } }; var payloadResponse = new JsonSampleGenerator(service_model, exception).Execute(); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new JsonUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = DeleteDedicatedIpPoolResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("PinpointEmail")] public void DeleteEmailIdentityMarshallTest() { var operation = service_model.FindOperation("DeleteEmailIdentity"); var request = InstantiateClassGenerator.Execute(); var marshaller = new DeleteEmailIdentityRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("DeleteEmailIdentity", request, internalRequest, service_model); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"} } }; var payloadResponse = new JsonSampleGenerator(service_model, operation.ResponseStructure).Execute(); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new JsonUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), false, webResponse); ResponseUnmarshaller unmarshaller = DeleteEmailIdentityResponseUnmarshaller.Instance; var response = unmarshaller.Unmarshall(context) as DeleteEmailIdentityResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("PinpointEmail")] public void DeleteEmailIdentity_BadRequestExceptionMarshallTest() { var operation = service_model.FindOperation("DeleteEmailIdentity"); var request = InstantiateClassGenerator.Execute(); var marshaller = new DeleteEmailIdentityRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("DeleteEmailIdentity", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("BadRequestException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","BadRequestException"}, } }; var payloadResponse = new JsonSampleGenerator(service_model, exception).Execute(); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new JsonUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = DeleteEmailIdentityResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("PinpointEmail")] public void DeleteEmailIdentity_ConcurrentModificationExceptionMarshallTest() { var operation = service_model.FindOperation("DeleteEmailIdentity"); var request = InstantiateClassGenerator.Execute(); var marshaller = new DeleteEmailIdentityRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("DeleteEmailIdentity", 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"}, {"x-amzn-ErrorType","ConcurrentModificationException"}, } }; var payloadResponse = new JsonSampleGenerator(service_model, exception).Execute(); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new JsonUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = DeleteEmailIdentityResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("PinpointEmail")] public void DeleteEmailIdentity_NotFoundExceptionMarshallTest() { var operation = service_model.FindOperation("DeleteEmailIdentity"); var request = InstantiateClassGenerator.Execute(); var marshaller = new DeleteEmailIdentityRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("DeleteEmailIdentity", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("NotFoundException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","NotFoundException"}, } }; var payloadResponse = new JsonSampleGenerator(service_model, exception).Execute(); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new JsonUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = DeleteEmailIdentityResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("PinpointEmail")] public void DeleteEmailIdentity_TooManyRequestsExceptionMarshallTest() { var operation = service_model.FindOperation("DeleteEmailIdentity"); var request = InstantiateClassGenerator.Execute(); var marshaller = new DeleteEmailIdentityRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("DeleteEmailIdentity", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("TooManyRequestsException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","TooManyRequestsException"}, } }; var payloadResponse = new JsonSampleGenerator(service_model, exception).Execute(); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new JsonUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = DeleteEmailIdentityResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("PinpointEmail")] public void GetAccountMarshallTest() { var operation = service_model.FindOperation("GetAccount"); var request = InstantiateClassGenerator.Execute(); var marshaller = new GetAccountRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("GetAccount", request, internalRequest, service_model); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"} } }; var payloadResponse = new JsonSampleGenerator(service_model, operation.ResponseStructure).Execute(); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new JsonUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), false, webResponse); ResponseUnmarshaller unmarshaller = GetAccountResponseUnmarshaller.Instance; var response = unmarshaller.Unmarshall(context) as GetAccountResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("PinpointEmail")] public void GetAccount_BadRequestExceptionMarshallTest() { var operation = service_model.FindOperation("GetAccount"); var request = InstantiateClassGenerator.Execute(); var marshaller = new GetAccountRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("GetAccount", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("BadRequestException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","BadRequestException"}, } }; var payloadResponse = new JsonSampleGenerator(service_model, exception).Execute(); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new JsonUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = GetAccountResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("PinpointEmail")] public void GetAccount_TooManyRequestsExceptionMarshallTest() { var operation = service_model.FindOperation("GetAccount"); var request = InstantiateClassGenerator.Execute(); var marshaller = new GetAccountRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("GetAccount", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("TooManyRequestsException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","TooManyRequestsException"}, } }; var payloadResponse = new JsonSampleGenerator(service_model, exception).Execute(); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new JsonUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = GetAccountResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("PinpointEmail")] public void GetBlacklistReportsMarshallTest() { var operation = service_model.FindOperation("GetBlacklistReports"); var request = InstantiateClassGenerator.Execute(); var marshaller = new GetBlacklistReportsRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("GetBlacklistReports", request, internalRequest, service_model); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"} } }; var payloadResponse = new JsonSampleGenerator(service_model, operation.ResponseStructure).Execute(); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new JsonUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), false, webResponse); ResponseUnmarshaller unmarshaller = GetBlacklistReportsResponseUnmarshaller.Instance; var response = unmarshaller.Unmarshall(context) as GetBlacklistReportsResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("PinpointEmail")] public void GetBlacklistReports_BadRequestExceptionMarshallTest() { var operation = service_model.FindOperation("GetBlacklistReports"); var request = InstantiateClassGenerator.Execute(); var marshaller = new GetBlacklistReportsRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("GetBlacklistReports", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("BadRequestException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","BadRequestException"}, } }; var payloadResponse = new JsonSampleGenerator(service_model, exception).Execute(); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new JsonUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = GetBlacklistReportsResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("PinpointEmail")] public void GetBlacklistReports_NotFoundExceptionMarshallTest() { var operation = service_model.FindOperation("GetBlacklistReports"); var request = InstantiateClassGenerator.Execute(); var marshaller = new GetBlacklistReportsRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("GetBlacklistReports", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("NotFoundException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","NotFoundException"}, } }; var payloadResponse = new JsonSampleGenerator(service_model, exception).Execute(); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new JsonUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = GetBlacklistReportsResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("PinpointEmail")] public void GetBlacklistReports_TooManyRequestsExceptionMarshallTest() { var operation = service_model.FindOperation("GetBlacklistReports"); var request = InstantiateClassGenerator.Execute(); var marshaller = new GetBlacklistReportsRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("GetBlacklistReports", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("TooManyRequestsException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","TooManyRequestsException"}, } }; var payloadResponse = new JsonSampleGenerator(service_model, exception).Execute(); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new JsonUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = GetBlacklistReportsResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("PinpointEmail")] public void GetConfigurationSetMarshallTest() { var operation = service_model.FindOperation("GetConfigurationSet"); var request = InstantiateClassGenerator.Execute(); var marshaller = new GetConfigurationSetRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("GetConfigurationSet", request, internalRequest, service_model); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"} } }; var payloadResponse = new JsonSampleGenerator(service_model, operation.ResponseStructure).Execute(); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new JsonUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), false, webResponse); ResponseUnmarshaller unmarshaller = GetConfigurationSetResponseUnmarshaller.Instance; var response = unmarshaller.Unmarshall(context) as GetConfigurationSetResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("PinpointEmail")] public void GetConfigurationSet_BadRequestExceptionMarshallTest() { var operation = service_model.FindOperation("GetConfigurationSet"); var request = InstantiateClassGenerator.Execute(); var marshaller = new GetConfigurationSetRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("GetConfigurationSet", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("BadRequestException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","BadRequestException"}, } }; var payloadResponse = new JsonSampleGenerator(service_model, exception).Execute(); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new JsonUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = GetConfigurationSetResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("PinpointEmail")] public void GetConfigurationSet_NotFoundExceptionMarshallTest() { var operation = service_model.FindOperation("GetConfigurationSet"); var request = InstantiateClassGenerator.Execute(); var marshaller = new GetConfigurationSetRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("GetConfigurationSet", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("NotFoundException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","NotFoundException"}, } }; var payloadResponse = new JsonSampleGenerator(service_model, exception).Execute(); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new JsonUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = GetConfigurationSetResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("PinpointEmail")] public void GetConfigurationSet_TooManyRequestsExceptionMarshallTest() { var operation = service_model.FindOperation("GetConfigurationSet"); var request = InstantiateClassGenerator.Execute(); var marshaller = new GetConfigurationSetRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("GetConfigurationSet", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("TooManyRequestsException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","TooManyRequestsException"}, } }; var payloadResponse = new JsonSampleGenerator(service_model, exception).Execute(); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new JsonUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = GetConfigurationSetResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("PinpointEmail")] public void GetConfigurationSetEventDestinationsMarshallTest() { var operation = service_model.FindOperation("GetConfigurationSetEventDestinations"); var request = InstantiateClassGenerator.Execute(); var marshaller = new GetConfigurationSetEventDestinationsRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("GetConfigurationSetEventDestinations", request, internalRequest, service_model); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"} } }; var payloadResponse = new JsonSampleGenerator(service_model, operation.ResponseStructure).Execute(); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new JsonUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), false, webResponse); ResponseUnmarshaller unmarshaller = GetConfigurationSetEventDestinationsResponseUnmarshaller.Instance; var response = unmarshaller.Unmarshall(context) as GetConfigurationSetEventDestinationsResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("PinpointEmail")] public void GetConfigurationSetEventDestinations_BadRequestExceptionMarshallTest() { var operation = service_model.FindOperation("GetConfigurationSetEventDestinations"); var request = InstantiateClassGenerator.Execute(); var marshaller = new GetConfigurationSetEventDestinationsRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("GetConfigurationSetEventDestinations", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("BadRequestException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","BadRequestException"}, } }; var payloadResponse = new JsonSampleGenerator(service_model, exception).Execute(); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new JsonUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = GetConfigurationSetEventDestinationsResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("PinpointEmail")] public void GetConfigurationSetEventDestinations_NotFoundExceptionMarshallTest() { var operation = service_model.FindOperation("GetConfigurationSetEventDestinations"); var request = InstantiateClassGenerator.Execute(); var marshaller = new GetConfigurationSetEventDestinationsRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("GetConfigurationSetEventDestinations", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("NotFoundException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","NotFoundException"}, } }; var payloadResponse = new JsonSampleGenerator(service_model, exception).Execute(); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new JsonUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = GetConfigurationSetEventDestinationsResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("PinpointEmail")] public void GetConfigurationSetEventDestinations_TooManyRequestsExceptionMarshallTest() { var operation = service_model.FindOperation("GetConfigurationSetEventDestinations"); var request = InstantiateClassGenerator.Execute(); var marshaller = new GetConfigurationSetEventDestinationsRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("GetConfigurationSetEventDestinations", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("TooManyRequestsException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","TooManyRequestsException"}, } }; var payloadResponse = new JsonSampleGenerator(service_model, exception).Execute(); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new JsonUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = GetConfigurationSetEventDestinationsResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("PinpointEmail")] public void GetDedicatedIpMarshallTest() { var operation = service_model.FindOperation("GetDedicatedIp"); var request = InstantiateClassGenerator.Execute(); var marshaller = new GetDedicatedIpRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("GetDedicatedIp", request, internalRequest, service_model); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"} } }; var payloadResponse = new JsonSampleGenerator(service_model, operation.ResponseStructure).Execute(); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new JsonUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), false, webResponse); ResponseUnmarshaller unmarshaller = GetDedicatedIpResponseUnmarshaller.Instance; var response = unmarshaller.Unmarshall(context) as GetDedicatedIpResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("PinpointEmail")] public void GetDedicatedIp_BadRequestExceptionMarshallTest() { var operation = service_model.FindOperation("GetDedicatedIp"); var request = InstantiateClassGenerator.Execute(); var marshaller = new GetDedicatedIpRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("GetDedicatedIp", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("BadRequestException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","BadRequestException"}, } }; var payloadResponse = new JsonSampleGenerator(service_model, exception).Execute(); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new JsonUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = GetDedicatedIpResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("PinpointEmail")] public void GetDedicatedIp_NotFoundExceptionMarshallTest() { var operation = service_model.FindOperation("GetDedicatedIp"); var request = InstantiateClassGenerator.Execute(); var marshaller = new GetDedicatedIpRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("GetDedicatedIp", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("NotFoundException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","NotFoundException"}, } }; var payloadResponse = new JsonSampleGenerator(service_model, exception).Execute(); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new JsonUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = GetDedicatedIpResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("PinpointEmail")] public void GetDedicatedIp_TooManyRequestsExceptionMarshallTest() { var operation = service_model.FindOperation("GetDedicatedIp"); var request = InstantiateClassGenerator.Execute(); var marshaller = new GetDedicatedIpRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("GetDedicatedIp", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("TooManyRequestsException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","TooManyRequestsException"}, } }; var payloadResponse = new JsonSampleGenerator(service_model, exception).Execute(); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new JsonUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = GetDedicatedIpResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("PinpointEmail")] public void GetDedicatedIpsMarshallTest() { var operation = service_model.FindOperation("GetDedicatedIps"); var request = InstantiateClassGenerator.Execute(); var marshaller = new GetDedicatedIpsRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("GetDedicatedIps", request, internalRequest, service_model); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"} } }; var payloadResponse = new JsonSampleGenerator(service_model, operation.ResponseStructure).Execute(); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new JsonUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), false, webResponse); ResponseUnmarshaller unmarshaller = GetDedicatedIpsResponseUnmarshaller.Instance; var response = unmarshaller.Unmarshall(context) as GetDedicatedIpsResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("PinpointEmail")] public void GetDedicatedIps_BadRequestExceptionMarshallTest() { var operation = service_model.FindOperation("GetDedicatedIps"); var request = InstantiateClassGenerator.Execute(); var marshaller = new GetDedicatedIpsRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("GetDedicatedIps", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("BadRequestException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","BadRequestException"}, } }; var payloadResponse = new JsonSampleGenerator(service_model, exception).Execute(); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new JsonUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = GetDedicatedIpsResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("PinpointEmail")] public void GetDedicatedIps_NotFoundExceptionMarshallTest() { var operation = service_model.FindOperation("GetDedicatedIps"); var request = InstantiateClassGenerator.Execute(); var marshaller = new GetDedicatedIpsRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("GetDedicatedIps", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("NotFoundException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","NotFoundException"}, } }; var payloadResponse = new JsonSampleGenerator(service_model, exception).Execute(); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new JsonUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = GetDedicatedIpsResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("PinpointEmail")] public void GetDedicatedIps_TooManyRequestsExceptionMarshallTest() { var operation = service_model.FindOperation("GetDedicatedIps"); var request = InstantiateClassGenerator.Execute(); var marshaller = new GetDedicatedIpsRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("GetDedicatedIps", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("TooManyRequestsException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","TooManyRequestsException"}, } }; var payloadResponse = new JsonSampleGenerator(service_model, exception).Execute(); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new JsonUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = GetDedicatedIpsResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("PinpointEmail")] public void GetDeliverabilityDashboardOptionsMarshallTest() { var operation = service_model.FindOperation("GetDeliverabilityDashboardOptions"); var request = InstantiateClassGenerator.Execute(); var marshaller = new GetDeliverabilityDashboardOptionsRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("GetDeliverabilityDashboardOptions", request, internalRequest, service_model); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"} } }; var payloadResponse = new JsonSampleGenerator(service_model, operation.ResponseStructure).Execute(); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new JsonUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), false, webResponse); ResponseUnmarshaller unmarshaller = GetDeliverabilityDashboardOptionsResponseUnmarshaller.Instance; var response = unmarshaller.Unmarshall(context) as GetDeliverabilityDashboardOptionsResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("PinpointEmail")] public void GetDeliverabilityDashboardOptions_BadRequestExceptionMarshallTest() { var operation = service_model.FindOperation("GetDeliverabilityDashboardOptions"); var request = InstantiateClassGenerator.Execute(); var marshaller = new GetDeliverabilityDashboardOptionsRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("GetDeliverabilityDashboardOptions", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("BadRequestException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","BadRequestException"}, } }; var payloadResponse = new JsonSampleGenerator(service_model, exception).Execute(); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new JsonUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = GetDeliverabilityDashboardOptionsResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("PinpointEmail")] public void GetDeliverabilityDashboardOptions_LimitExceededExceptionMarshallTest() { var operation = service_model.FindOperation("GetDeliverabilityDashboardOptions"); var request = InstantiateClassGenerator.Execute(); var marshaller = new GetDeliverabilityDashboardOptionsRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("GetDeliverabilityDashboardOptions", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("LimitExceededException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","LimitExceededException"}, } }; var payloadResponse = new JsonSampleGenerator(service_model, exception).Execute(); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new JsonUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = GetDeliverabilityDashboardOptionsResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("PinpointEmail")] public void GetDeliverabilityDashboardOptions_TooManyRequestsExceptionMarshallTest() { var operation = service_model.FindOperation("GetDeliverabilityDashboardOptions"); var request = InstantiateClassGenerator.Execute(); var marshaller = new GetDeliverabilityDashboardOptionsRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("GetDeliverabilityDashboardOptions", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("TooManyRequestsException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","TooManyRequestsException"}, } }; var payloadResponse = new JsonSampleGenerator(service_model, exception).Execute(); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new JsonUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = GetDeliverabilityDashboardOptionsResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("PinpointEmail")] public void GetDeliverabilityTestReportMarshallTest() { var operation = service_model.FindOperation("GetDeliverabilityTestReport"); var request = InstantiateClassGenerator.Execute(); var marshaller = new GetDeliverabilityTestReportRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("GetDeliverabilityTestReport", request, internalRequest, service_model); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"} } }; var payloadResponse = new JsonSampleGenerator(service_model, operation.ResponseStructure).Execute(); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new JsonUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), false, webResponse); ResponseUnmarshaller unmarshaller = GetDeliverabilityTestReportResponseUnmarshaller.Instance; var response = unmarshaller.Unmarshall(context) as GetDeliverabilityTestReportResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("PinpointEmail")] public void GetDeliverabilityTestReport_BadRequestExceptionMarshallTest() { var operation = service_model.FindOperation("GetDeliverabilityTestReport"); var request = InstantiateClassGenerator.Execute(); var marshaller = new GetDeliverabilityTestReportRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("GetDeliverabilityTestReport", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("BadRequestException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","BadRequestException"}, } }; var payloadResponse = new JsonSampleGenerator(service_model, exception).Execute(); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new JsonUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = GetDeliverabilityTestReportResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("PinpointEmail")] public void GetDeliverabilityTestReport_NotFoundExceptionMarshallTest() { var operation = service_model.FindOperation("GetDeliverabilityTestReport"); var request = InstantiateClassGenerator.Execute(); var marshaller = new GetDeliverabilityTestReportRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("GetDeliverabilityTestReport", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("NotFoundException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","NotFoundException"}, } }; var payloadResponse = new JsonSampleGenerator(service_model, exception).Execute(); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new JsonUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = GetDeliverabilityTestReportResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("PinpointEmail")] public void GetDeliverabilityTestReport_TooManyRequestsExceptionMarshallTest() { var operation = service_model.FindOperation("GetDeliverabilityTestReport"); var request = InstantiateClassGenerator.Execute(); var marshaller = new GetDeliverabilityTestReportRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("GetDeliverabilityTestReport", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("TooManyRequestsException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","TooManyRequestsException"}, } }; var payloadResponse = new JsonSampleGenerator(service_model, exception).Execute(); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new JsonUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = GetDeliverabilityTestReportResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("PinpointEmail")] public void GetDomainDeliverabilityCampaignMarshallTest() { var operation = service_model.FindOperation("GetDomainDeliverabilityCampaign"); var request = InstantiateClassGenerator.Execute(); var marshaller = new GetDomainDeliverabilityCampaignRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("GetDomainDeliverabilityCampaign", request, internalRequest, service_model); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"} } }; var payloadResponse = new JsonSampleGenerator(service_model, operation.ResponseStructure).Execute(); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new JsonUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), false, webResponse); ResponseUnmarshaller unmarshaller = GetDomainDeliverabilityCampaignResponseUnmarshaller.Instance; var response = unmarshaller.Unmarshall(context) as GetDomainDeliverabilityCampaignResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("PinpointEmail")] public void GetDomainDeliverabilityCampaign_BadRequestExceptionMarshallTest() { var operation = service_model.FindOperation("GetDomainDeliverabilityCampaign"); var request = InstantiateClassGenerator.Execute(); var marshaller = new GetDomainDeliverabilityCampaignRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("GetDomainDeliverabilityCampaign", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("BadRequestException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","BadRequestException"}, } }; var payloadResponse = new JsonSampleGenerator(service_model, exception).Execute(); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new JsonUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = GetDomainDeliverabilityCampaignResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("PinpointEmail")] public void GetDomainDeliverabilityCampaign_NotFoundExceptionMarshallTest() { var operation = service_model.FindOperation("GetDomainDeliverabilityCampaign"); var request = InstantiateClassGenerator.Execute(); var marshaller = new GetDomainDeliverabilityCampaignRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("GetDomainDeliverabilityCampaign", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("NotFoundException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","NotFoundException"}, } }; var payloadResponse = new JsonSampleGenerator(service_model, exception).Execute(); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new JsonUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = GetDomainDeliverabilityCampaignResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("PinpointEmail")] public void GetDomainDeliverabilityCampaign_TooManyRequestsExceptionMarshallTest() { var operation = service_model.FindOperation("GetDomainDeliverabilityCampaign"); var request = InstantiateClassGenerator.Execute(); var marshaller = new GetDomainDeliverabilityCampaignRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("GetDomainDeliverabilityCampaign", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("TooManyRequestsException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","TooManyRequestsException"}, } }; var payloadResponse = new JsonSampleGenerator(service_model, exception).Execute(); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new JsonUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = GetDomainDeliverabilityCampaignResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("PinpointEmail")] public void GetDomainStatisticsReportMarshallTest() { var operation = service_model.FindOperation("GetDomainStatisticsReport"); var request = InstantiateClassGenerator.Execute(); var marshaller = new GetDomainStatisticsReportRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("GetDomainStatisticsReport", request, internalRequest, service_model); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"} } }; var payloadResponse = new JsonSampleGenerator(service_model, operation.ResponseStructure).Execute(); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new JsonUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), false, webResponse); ResponseUnmarshaller unmarshaller = GetDomainStatisticsReportResponseUnmarshaller.Instance; var response = unmarshaller.Unmarshall(context) as GetDomainStatisticsReportResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("PinpointEmail")] public void GetDomainStatisticsReport_BadRequestExceptionMarshallTest() { var operation = service_model.FindOperation("GetDomainStatisticsReport"); var request = InstantiateClassGenerator.Execute(); var marshaller = new GetDomainStatisticsReportRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("GetDomainStatisticsReport", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("BadRequestException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","BadRequestException"}, } }; var payloadResponse = new JsonSampleGenerator(service_model, exception).Execute(); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new JsonUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = GetDomainStatisticsReportResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("PinpointEmail")] public void GetDomainStatisticsReport_NotFoundExceptionMarshallTest() { var operation = service_model.FindOperation("GetDomainStatisticsReport"); var request = InstantiateClassGenerator.Execute(); var marshaller = new GetDomainStatisticsReportRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("GetDomainStatisticsReport", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("NotFoundException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","NotFoundException"}, } }; var payloadResponse = new JsonSampleGenerator(service_model, exception).Execute(); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new JsonUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = GetDomainStatisticsReportResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("PinpointEmail")] public void GetDomainStatisticsReport_TooManyRequestsExceptionMarshallTest() { var operation = service_model.FindOperation("GetDomainStatisticsReport"); var request = InstantiateClassGenerator.Execute(); var marshaller = new GetDomainStatisticsReportRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("GetDomainStatisticsReport", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("TooManyRequestsException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","TooManyRequestsException"}, } }; var payloadResponse = new JsonSampleGenerator(service_model, exception).Execute(); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new JsonUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = GetDomainStatisticsReportResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("PinpointEmail")] public void GetEmailIdentityMarshallTest() { var operation = service_model.FindOperation("GetEmailIdentity"); var request = InstantiateClassGenerator.Execute(); var marshaller = new GetEmailIdentityRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("GetEmailIdentity", request, internalRequest, service_model); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"} } }; var payloadResponse = new JsonSampleGenerator(service_model, operation.ResponseStructure).Execute(); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new JsonUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), false, webResponse); ResponseUnmarshaller unmarshaller = GetEmailIdentityResponseUnmarshaller.Instance; var response = unmarshaller.Unmarshall(context) as GetEmailIdentityResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("PinpointEmail")] public void GetEmailIdentity_BadRequestExceptionMarshallTest() { var operation = service_model.FindOperation("GetEmailIdentity"); var request = InstantiateClassGenerator.Execute(); var marshaller = new GetEmailIdentityRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("GetEmailIdentity", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("BadRequestException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","BadRequestException"}, } }; var payloadResponse = new JsonSampleGenerator(service_model, exception).Execute(); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new JsonUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = GetEmailIdentityResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("PinpointEmail")] public void GetEmailIdentity_NotFoundExceptionMarshallTest() { var operation = service_model.FindOperation("GetEmailIdentity"); var request = InstantiateClassGenerator.Execute(); var marshaller = new GetEmailIdentityRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("GetEmailIdentity", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("NotFoundException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","NotFoundException"}, } }; var payloadResponse = new JsonSampleGenerator(service_model, exception).Execute(); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new JsonUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = GetEmailIdentityResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("PinpointEmail")] public void GetEmailIdentity_TooManyRequestsExceptionMarshallTest() { var operation = service_model.FindOperation("GetEmailIdentity"); var request = InstantiateClassGenerator.Execute(); var marshaller = new GetEmailIdentityRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("GetEmailIdentity", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("TooManyRequestsException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","TooManyRequestsException"}, } }; var payloadResponse = new JsonSampleGenerator(service_model, exception).Execute(); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new JsonUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = GetEmailIdentityResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("PinpointEmail")] public void ListConfigurationSetsMarshallTest() { var operation = service_model.FindOperation("ListConfigurationSets"); var request = InstantiateClassGenerator.Execute(); var marshaller = new ListConfigurationSetsRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("ListConfigurationSets", request, internalRequest, service_model); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"} } }; var payloadResponse = new JsonSampleGenerator(service_model, operation.ResponseStructure).Execute(); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new JsonUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), false, webResponse); ResponseUnmarshaller unmarshaller = ListConfigurationSetsResponseUnmarshaller.Instance; var response = unmarshaller.Unmarshall(context) as ListConfigurationSetsResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("PinpointEmail")] public void ListConfigurationSets_BadRequestExceptionMarshallTest() { var operation = service_model.FindOperation("ListConfigurationSets"); var request = InstantiateClassGenerator.Execute(); var marshaller = new ListConfigurationSetsRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("ListConfigurationSets", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("BadRequestException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","BadRequestException"}, } }; var payloadResponse = new JsonSampleGenerator(service_model, exception).Execute(); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new JsonUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = ListConfigurationSetsResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("PinpointEmail")] public void ListConfigurationSets_TooManyRequestsExceptionMarshallTest() { var operation = service_model.FindOperation("ListConfigurationSets"); var request = InstantiateClassGenerator.Execute(); var marshaller = new ListConfigurationSetsRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("ListConfigurationSets", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("TooManyRequestsException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","TooManyRequestsException"}, } }; var payloadResponse = new JsonSampleGenerator(service_model, exception).Execute(); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new JsonUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = ListConfigurationSetsResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("PinpointEmail")] public void ListDedicatedIpPoolsMarshallTest() { var operation = service_model.FindOperation("ListDedicatedIpPools"); var request = InstantiateClassGenerator.Execute(); var marshaller = new ListDedicatedIpPoolsRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("ListDedicatedIpPools", request, internalRequest, service_model); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"} } }; var payloadResponse = new JsonSampleGenerator(service_model, operation.ResponseStructure).Execute(); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new JsonUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), false, webResponse); ResponseUnmarshaller unmarshaller = ListDedicatedIpPoolsResponseUnmarshaller.Instance; var response = unmarshaller.Unmarshall(context) as ListDedicatedIpPoolsResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("PinpointEmail")] public void ListDedicatedIpPools_BadRequestExceptionMarshallTest() { var operation = service_model.FindOperation("ListDedicatedIpPools"); var request = InstantiateClassGenerator.Execute(); var marshaller = new ListDedicatedIpPoolsRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("ListDedicatedIpPools", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("BadRequestException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","BadRequestException"}, } }; var payloadResponse = new JsonSampleGenerator(service_model, exception).Execute(); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new JsonUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = ListDedicatedIpPoolsResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("PinpointEmail")] public void ListDedicatedIpPools_TooManyRequestsExceptionMarshallTest() { var operation = service_model.FindOperation("ListDedicatedIpPools"); var request = InstantiateClassGenerator.Execute(); var marshaller = new ListDedicatedIpPoolsRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("ListDedicatedIpPools", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("TooManyRequestsException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","TooManyRequestsException"}, } }; var payloadResponse = new JsonSampleGenerator(service_model, exception).Execute(); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new JsonUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = ListDedicatedIpPoolsResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("PinpointEmail")] public void ListDeliverabilityTestReportsMarshallTest() { var operation = service_model.FindOperation("ListDeliverabilityTestReports"); var request = InstantiateClassGenerator.Execute(); var marshaller = new ListDeliverabilityTestReportsRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("ListDeliverabilityTestReports", request, internalRequest, service_model); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"} } }; var payloadResponse = new JsonSampleGenerator(service_model, operation.ResponseStructure).Execute(); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new JsonUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), false, webResponse); ResponseUnmarshaller unmarshaller = ListDeliverabilityTestReportsResponseUnmarshaller.Instance; var response = unmarshaller.Unmarshall(context) as ListDeliverabilityTestReportsResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("PinpointEmail")] public void ListDeliverabilityTestReports_BadRequestExceptionMarshallTest() { var operation = service_model.FindOperation("ListDeliverabilityTestReports"); var request = InstantiateClassGenerator.Execute(); var marshaller = new ListDeliverabilityTestReportsRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("ListDeliverabilityTestReports", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("BadRequestException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","BadRequestException"}, } }; var payloadResponse = new JsonSampleGenerator(service_model, exception).Execute(); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new JsonUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = ListDeliverabilityTestReportsResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("PinpointEmail")] public void ListDeliverabilityTestReports_NotFoundExceptionMarshallTest() { var operation = service_model.FindOperation("ListDeliverabilityTestReports"); var request = InstantiateClassGenerator.Execute(); var marshaller = new ListDeliverabilityTestReportsRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("ListDeliverabilityTestReports", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("NotFoundException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","NotFoundException"}, } }; var payloadResponse = new JsonSampleGenerator(service_model, exception).Execute(); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new JsonUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = ListDeliverabilityTestReportsResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("PinpointEmail")] public void ListDeliverabilityTestReports_TooManyRequestsExceptionMarshallTest() { var operation = service_model.FindOperation("ListDeliverabilityTestReports"); var request = InstantiateClassGenerator.Execute(); var marshaller = new ListDeliverabilityTestReportsRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("ListDeliverabilityTestReports", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("TooManyRequestsException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","TooManyRequestsException"}, } }; var payloadResponse = new JsonSampleGenerator(service_model, exception).Execute(); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new JsonUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = ListDeliverabilityTestReportsResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("PinpointEmail")] public void ListDomainDeliverabilityCampaignsMarshallTest() { var operation = service_model.FindOperation("ListDomainDeliverabilityCampaigns"); var request = InstantiateClassGenerator.Execute(); var marshaller = new ListDomainDeliverabilityCampaignsRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("ListDomainDeliverabilityCampaigns", request, internalRequest, service_model); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"} } }; var payloadResponse = new JsonSampleGenerator(service_model, operation.ResponseStructure).Execute(); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new JsonUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), false, webResponse); ResponseUnmarshaller unmarshaller = ListDomainDeliverabilityCampaignsResponseUnmarshaller.Instance; var response = unmarshaller.Unmarshall(context) as ListDomainDeliverabilityCampaignsResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("PinpointEmail")] public void ListDomainDeliverabilityCampaigns_BadRequestExceptionMarshallTest() { var operation = service_model.FindOperation("ListDomainDeliverabilityCampaigns"); var request = InstantiateClassGenerator.Execute(); var marshaller = new ListDomainDeliverabilityCampaignsRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("ListDomainDeliverabilityCampaigns", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("BadRequestException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","BadRequestException"}, } }; var payloadResponse = new JsonSampleGenerator(service_model, exception).Execute(); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new JsonUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = ListDomainDeliverabilityCampaignsResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("PinpointEmail")] public void ListDomainDeliverabilityCampaigns_NotFoundExceptionMarshallTest() { var operation = service_model.FindOperation("ListDomainDeliverabilityCampaigns"); var request = InstantiateClassGenerator.Execute(); var marshaller = new ListDomainDeliverabilityCampaignsRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("ListDomainDeliverabilityCampaigns", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("NotFoundException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","NotFoundException"}, } }; var payloadResponse = new JsonSampleGenerator(service_model, exception).Execute(); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new JsonUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = ListDomainDeliverabilityCampaignsResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("PinpointEmail")] public void ListDomainDeliverabilityCampaigns_TooManyRequestsExceptionMarshallTest() { var operation = service_model.FindOperation("ListDomainDeliverabilityCampaigns"); var request = InstantiateClassGenerator.Execute(); var marshaller = new ListDomainDeliverabilityCampaignsRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("ListDomainDeliverabilityCampaigns", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("TooManyRequestsException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","TooManyRequestsException"}, } }; var payloadResponse = new JsonSampleGenerator(service_model, exception).Execute(); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new JsonUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = ListDomainDeliverabilityCampaignsResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("PinpointEmail")] public void ListEmailIdentitiesMarshallTest() { var operation = service_model.FindOperation("ListEmailIdentities"); var request = InstantiateClassGenerator.Execute(); var marshaller = new ListEmailIdentitiesRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("ListEmailIdentities", request, internalRequest, service_model); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"} } }; var payloadResponse = new JsonSampleGenerator(service_model, operation.ResponseStructure).Execute(); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new JsonUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), false, webResponse); ResponseUnmarshaller unmarshaller = ListEmailIdentitiesResponseUnmarshaller.Instance; var response = unmarshaller.Unmarshall(context) as ListEmailIdentitiesResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("PinpointEmail")] public void ListEmailIdentities_BadRequestExceptionMarshallTest() { var operation = service_model.FindOperation("ListEmailIdentities"); var request = InstantiateClassGenerator.Execute(); var marshaller = new ListEmailIdentitiesRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("ListEmailIdentities", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("BadRequestException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","BadRequestException"}, } }; var payloadResponse = new JsonSampleGenerator(service_model, exception).Execute(); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new JsonUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = ListEmailIdentitiesResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("PinpointEmail")] public void ListEmailIdentities_TooManyRequestsExceptionMarshallTest() { var operation = service_model.FindOperation("ListEmailIdentities"); var request = InstantiateClassGenerator.Execute(); var marshaller = new ListEmailIdentitiesRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("ListEmailIdentities", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("TooManyRequestsException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","TooManyRequestsException"}, } }; var payloadResponse = new JsonSampleGenerator(service_model, exception).Execute(); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new JsonUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = ListEmailIdentitiesResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("PinpointEmail")] 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 JsonSampleGenerator(service_model, operation.ResponseStructure).Execute(); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new JsonUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), false, webResponse); ResponseUnmarshaller unmarshaller = ListTagsForResourceResponseUnmarshaller.Instance; var response = unmarshaller.Unmarshall(context) as ListTagsForResourceResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("PinpointEmail")] public void ListTagsForResource_BadRequestExceptionMarshallTest() { 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("BadRequestException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","BadRequestException"}, } }; var payloadResponse = new JsonSampleGenerator(service_model, exception).Execute(); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new JsonUnmarshallerContext(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_Json")] [TestCategory("PinpointEmail")] public void ListTagsForResource_NotFoundExceptionMarshallTest() { 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("NotFoundException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","NotFoundException"}, } }; var payloadResponse = new JsonSampleGenerator(service_model, exception).Execute(); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new JsonUnmarshallerContext(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_Json")] [TestCategory("PinpointEmail")] public void ListTagsForResource_TooManyRequestsExceptionMarshallTest() { 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("TooManyRequestsException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","TooManyRequestsException"}, } }; var payloadResponse = new JsonSampleGenerator(service_model, exception).Execute(); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new JsonUnmarshallerContext(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_Json")] [TestCategory("PinpointEmail")] public void PutAccountDedicatedIpWarmupAttributesMarshallTest() { var operation = service_model.FindOperation("PutAccountDedicatedIpWarmupAttributes"); var request = InstantiateClassGenerator.Execute(); var marshaller = new PutAccountDedicatedIpWarmupAttributesRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("PutAccountDedicatedIpWarmupAttributes", request, internalRequest, service_model); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"} } }; var payloadResponse = new JsonSampleGenerator(service_model, operation.ResponseStructure).Execute(); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new JsonUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), false, webResponse); ResponseUnmarshaller unmarshaller = PutAccountDedicatedIpWarmupAttributesResponseUnmarshaller.Instance; var response = unmarshaller.Unmarshall(context) as PutAccountDedicatedIpWarmupAttributesResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("PinpointEmail")] public void PutAccountDedicatedIpWarmupAttributes_BadRequestExceptionMarshallTest() { var operation = service_model.FindOperation("PutAccountDedicatedIpWarmupAttributes"); var request = InstantiateClassGenerator.Execute(); var marshaller = new PutAccountDedicatedIpWarmupAttributesRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("PutAccountDedicatedIpWarmupAttributes", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("BadRequestException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","BadRequestException"}, } }; var payloadResponse = new JsonSampleGenerator(service_model, exception).Execute(); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new JsonUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = PutAccountDedicatedIpWarmupAttributesResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("PinpointEmail")] public void PutAccountDedicatedIpWarmupAttributes_TooManyRequestsExceptionMarshallTest() { var operation = service_model.FindOperation("PutAccountDedicatedIpWarmupAttributes"); var request = InstantiateClassGenerator.Execute(); var marshaller = new PutAccountDedicatedIpWarmupAttributesRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("PutAccountDedicatedIpWarmupAttributes", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("TooManyRequestsException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","TooManyRequestsException"}, } }; var payloadResponse = new JsonSampleGenerator(service_model, exception).Execute(); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new JsonUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = PutAccountDedicatedIpWarmupAttributesResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("PinpointEmail")] public void PutAccountSendingAttributesMarshallTest() { var operation = service_model.FindOperation("PutAccountSendingAttributes"); var request = InstantiateClassGenerator.Execute(); var marshaller = new PutAccountSendingAttributesRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("PutAccountSendingAttributes", request, internalRequest, service_model); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"} } }; var payloadResponse = new JsonSampleGenerator(service_model, operation.ResponseStructure).Execute(); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new JsonUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), false, webResponse); ResponseUnmarshaller unmarshaller = PutAccountSendingAttributesResponseUnmarshaller.Instance; var response = unmarshaller.Unmarshall(context) as PutAccountSendingAttributesResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("PinpointEmail")] public void PutAccountSendingAttributes_BadRequestExceptionMarshallTest() { var operation = service_model.FindOperation("PutAccountSendingAttributes"); var request = InstantiateClassGenerator.Execute(); var marshaller = new PutAccountSendingAttributesRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("PutAccountSendingAttributes", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("BadRequestException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","BadRequestException"}, } }; var payloadResponse = new JsonSampleGenerator(service_model, exception).Execute(); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new JsonUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = PutAccountSendingAttributesResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("PinpointEmail")] public void PutAccountSendingAttributes_TooManyRequestsExceptionMarshallTest() { var operation = service_model.FindOperation("PutAccountSendingAttributes"); var request = InstantiateClassGenerator.Execute(); var marshaller = new PutAccountSendingAttributesRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("PutAccountSendingAttributes", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("TooManyRequestsException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","TooManyRequestsException"}, } }; var payloadResponse = new JsonSampleGenerator(service_model, exception).Execute(); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new JsonUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = PutAccountSendingAttributesResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("PinpointEmail")] public void PutConfigurationSetDeliveryOptionsMarshallTest() { var operation = service_model.FindOperation("PutConfigurationSetDeliveryOptions"); var request = InstantiateClassGenerator.Execute(); var marshaller = new PutConfigurationSetDeliveryOptionsRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("PutConfigurationSetDeliveryOptions", request, internalRequest, service_model); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"} } }; var payloadResponse = new JsonSampleGenerator(service_model, operation.ResponseStructure).Execute(); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new JsonUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), false, webResponse); ResponseUnmarshaller unmarshaller = PutConfigurationSetDeliveryOptionsResponseUnmarshaller.Instance; var response = unmarshaller.Unmarshall(context) as PutConfigurationSetDeliveryOptionsResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("PinpointEmail")] public void PutConfigurationSetDeliveryOptions_BadRequestExceptionMarshallTest() { var operation = service_model.FindOperation("PutConfigurationSetDeliveryOptions"); var request = InstantiateClassGenerator.Execute(); var marshaller = new PutConfigurationSetDeliveryOptionsRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("PutConfigurationSetDeliveryOptions", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("BadRequestException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","BadRequestException"}, } }; var payloadResponse = new JsonSampleGenerator(service_model, exception).Execute(); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new JsonUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = PutConfigurationSetDeliveryOptionsResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("PinpointEmail")] public void PutConfigurationSetDeliveryOptions_NotFoundExceptionMarshallTest() { var operation = service_model.FindOperation("PutConfigurationSetDeliveryOptions"); var request = InstantiateClassGenerator.Execute(); var marshaller = new PutConfigurationSetDeliveryOptionsRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("PutConfigurationSetDeliveryOptions", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("NotFoundException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","NotFoundException"}, } }; var payloadResponse = new JsonSampleGenerator(service_model, exception).Execute(); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new JsonUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = PutConfigurationSetDeliveryOptionsResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("PinpointEmail")] public void PutConfigurationSetDeliveryOptions_TooManyRequestsExceptionMarshallTest() { var operation = service_model.FindOperation("PutConfigurationSetDeliveryOptions"); var request = InstantiateClassGenerator.Execute(); var marshaller = new PutConfigurationSetDeliveryOptionsRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("PutConfigurationSetDeliveryOptions", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("TooManyRequestsException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","TooManyRequestsException"}, } }; var payloadResponse = new JsonSampleGenerator(service_model, exception).Execute(); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new JsonUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = PutConfigurationSetDeliveryOptionsResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("PinpointEmail")] public void PutConfigurationSetReputationOptionsMarshallTest() { var operation = service_model.FindOperation("PutConfigurationSetReputationOptions"); var request = InstantiateClassGenerator.Execute(); var marshaller = new PutConfigurationSetReputationOptionsRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("PutConfigurationSetReputationOptions", request, internalRequest, service_model); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"} } }; var payloadResponse = new JsonSampleGenerator(service_model, operation.ResponseStructure).Execute(); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new JsonUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), false, webResponse); ResponseUnmarshaller unmarshaller = PutConfigurationSetReputationOptionsResponseUnmarshaller.Instance; var response = unmarshaller.Unmarshall(context) as PutConfigurationSetReputationOptionsResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("PinpointEmail")] public void PutConfigurationSetReputationOptions_BadRequestExceptionMarshallTest() { var operation = service_model.FindOperation("PutConfigurationSetReputationOptions"); var request = InstantiateClassGenerator.Execute(); var marshaller = new PutConfigurationSetReputationOptionsRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("PutConfigurationSetReputationOptions", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("BadRequestException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","BadRequestException"}, } }; var payloadResponse = new JsonSampleGenerator(service_model, exception).Execute(); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new JsonUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = PutConfigurationSetReputationOptionsResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("PinpointEmail")] public void PutConfigurationSetReputationOptions_NotFoundExceptionMarshallTest() { var operation = service_model.FindOperation("PutConfigurationSetReputationOptions"); var request = InstantiateClassGenerator.Execute(); var marshaller = new PutConfigurationSetReputationOptionsRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("PutConfigurationSetReputationOptions", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("NotFoundException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","NotFoundException"}, } }; var payloadResponse = new JsonSampleGenerator(service_model, exception).Execute(); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new JsonUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = PutConfigurationSetReputationOptionsResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("PinpointEmail")] public void PutConfigurationSetReputationOptions_TooManyRequestsExceptionMarshallTest() { var operation = service_model.FindOperation("PutConfigurationSetReputationOptions"); var request = InstantiateClassGenerator.Execute(); var marshaller = new PutConfigurationSetReputationOptionsRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("PutConfigurationSetReputationOptions", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("TooManyRequestsException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","TooManyRequestsException"}, } }; var payloadResponse = new JsonSampleGenerator(service_model, exception).Execute(); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new JsonUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = PutConfigurationSetReputationOptionsResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("PinpointEmail")] public void PutConfigurationSetSendingOptionsMarshallTest() { var operation = service_model.FindOperation("PutConfigurationSetSendingOptions"); var request = InstantiateClassGenerator.Execute(); var marshaller = new PutConfigurationSetSendingOptionsRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("PutConfigurationSetSendingOptions", request, internalRequest, service_model); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"} } }; var payloadResponse = new JsonSampleGenerator(service_model, operation.ResponseStructure).Execute(); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new JsonUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), false, webResponse); ResponseUnmarshaller unmarshaller = PutConfigurationSetSendingOptionsResponseUnmarshaller.Instance; var response = unmarshaller.Unmarshall(context) as PutConfigurationSetSendingOptionsResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("PinpointEmail")] public void PutConfigurationSetSendingOptions_BadRequestExceptionMarshallTest() { var operation = service_model.FindOperation("PutConfigurationSetSendingOptions"); var request = InstantiateClassGenerator.Execute(); var marshaller = new PutConfigurationSetSendingOptionsRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("PutConfigurationSetSendingOptions", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("BadRequestException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","BadRequestException"}, } }; var payloadResponse = new JsonSampleGenerator(service_model, exception).Execute(); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new JsonUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = PutConfigurationSetSendingOptionsResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("PinpointEmail")] public void PutConfigurationSetSendingOptions_NotFoundExceptionMarshallTest() { var operation = service_model.FindOperation("PutConfigurationSetSendingOptions"); var request = InstantiateClassGenerator.Execute(); var marshaller = new PutConfigurationSetSendingOptionsRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("PutConfigurationSetSendingOptions", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("NotFoundException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","NotFoundException"}, } }; var payloadResponse = new JsonSampleGenerator(service_model, exception).Execute(); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new JsonUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = PutConfigurationSetSendingOptionsResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("PinpointEmail")] public void PutConfigurationSetSendingOptions_TooManyRequestsExceptionMarshallTest() { var operation = service_model.FindOperation("PutConfigurationSetSendingOptions"); var request = InstantiateClassGenerator.Execute(); var marshaller = new PutConfigurationSetSendingOptionsRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("PutConfigurationSetSendingOptions", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("TooManyRequestsException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","TooManyRequestsException"}, } }; var payloadResponse = new JsonSampleGenerator(service_model, exception).Execute(); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new JsonUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = PutConfigurationSetSendingOptionsResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("PinpointEmail")] public void PutConfigurationSetTrackingOptionsMarshallTest() { var operation = service_model.FindOperation("PutConfigurationSetTrackingOptions"); var request = InstantiateClassGenerator.Execute(); var marshaller = new PutConfigurationSetTrackingOptionsRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("PutConfigurationSetTrackingOptions", request, internalRequest, service_model); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"} } }; var payloadResponse = new JsonSampleGenerator(service_model, operation.ResponseStructure).Execute(); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new JsonUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), false, webResponse); ResponseUnmarshaller unmarshaller = PutConfigurationSetTrackingOptionsResponseUnmarshaller.Instance; var response = unmarshaller.Unmarshall(context) as PutConfigurationSetTrackingOptionsResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("PinpointEmail")] public void PutConfigurationSetTrackingOptions_BadRequestExceptionMarshallTest() { var operation = service_model.FindOperation("PutConfigurationSetTrackingOptions"); var request = InstantiateClassGenerator.Execute(); var marshaller = new PutConfigurationSetTrackingOptionsRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("PutConfigurationSetTrackingOptions", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("BadRequestException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","BadRequestException"}, } }; var payloadResponse = new JsonSampleGenerator(service_model, exception).Execute(); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new JsonUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = PutConfigurationSetTrackingOptionsResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("PinpointEmail")] public void PutConfigurationSetTrackingOptions_NotFoundExceptionMarshallTest() { var operation = service_model.FindOperation("PutConfigurationSetTrackingOptions"); var request = InstantiateClassGenerator.Execute(); var marshaller = new PutConfigurationSetTrackingOptionsRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("PutConfigurationSetTrackingOptions", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("NotFoundException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","NotFoundException"}, } }; var payloadResponse = new JsonSampleGenerator(service_model, exception).Execute(); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new JsonUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = PutConfigurationSetTrackingOptionsResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("PinpointEmail")] public void PutConfigurationSetTrackingOptions_TooManyRequestsExceptionMarshallTest() { var operation = service_model.FindOperation("PutConfigurationSetTrackingOptions"); var request = InstantiateClassGenerator.Execute(); var marshaller = new PutConfigurationSetTrackingOptionsRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("PutConfigurationSetTrackingOptions", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("TooManyRequestsException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","TooManyRequestsException"}, } }; var payloadResponse = new JsonSampleGenerator(service_model, exception).Execute(); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new JsonUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = PutConfigurationSetTrackingOptionsResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("PinpointEmail")] public void PutDedicatedIpInPoolMarshallTest() { var operation = service_model.FindOperation("PutDedicatedIpInPool"); var request = InstantiateClassGenerator.Execute(); var marshaller = new PutDedicatedIpInPoolRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("PutDedicatedIpInPool", request, internalRequest, service_model); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"} } }; var payloadResponse = new JsonSampleGenerator(service_model, operation.ResponseStructure).Execute(); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new JsonUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), false, webResponse); ResponseUnmarshaller unmarshaller = PutDedicatedIpInPoolResponseUnmarshaller.Instance; var response = unmarshaller.Unmarshall(context) as PutDedicatedIpInPoolResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("PinpointEmail")] public void PutDedicatedIpInPool_BadRequestExceptionMarshallTest() { var operation = service_model.FindOperation("PutDedicatedIpInPool"); var request = InstantiateClassGenerator.Execute(); var marshaller = new PutDedicatedIpInPoolRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("PutDedicatedIpInPool", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("BadRequestException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","BadRequestException"}, } }; var payloadResponse = new JsonSampleGenerator(service_model, exception).Execute(); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new JsonUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = PutDedicatedIpInPoolResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("PinpointEmail")] public void PutDedicatedIpInPool_NotFoundExceptionMarshallTest() { var operation = service_model.FindOperation("PutDedicatedIpInPool"); var request = InstantiateClassGenerator.Execute(); var marshaller = new PutDedicatedIpInPoolRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("PutDedicatedIpInPool", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("NotFoundException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","NotFoundException"}, } }; var payloadResponse = new JsonSampleGenerator(service_model, exception).Execute(); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new JsonUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = PutDedicatedIpInPoolResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("PinpointEmail")] public void PutDedicatedIpInPool_TooManyRequestsExceptionMarshallTest() { var operation = service_model.FindOperation("PutDedicatedIpInPool"); var request = InstantiateClassGenerator.Execute(); var marshaller = new PutDedicatedIpInPoolRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("PutDedicatedIpInPool", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("TooManyRequestsException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","TooManyRequestsException"}, } }; var payloadResponse = new JsonSampleGenerator(service_model, exception).Execute(); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new JsonUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = PutDedicatedIpInPoolResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("PinpointEmail")] public void PutDedicatedIpWarmupAttributesMarshallTest() { var operation = service_model.FindOperation("PutDedicatedIpWarmupAttributes"); var request = InstantiateClassGenerator.Execute(); var marshaller = new PutDedicatedIpWarmupAttributesRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("PutDedicatedIpWarmupAttributes", request, internalRequest, service_model); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"} } }; var payloadResponse = new JsonSampleGenerator(service_model, operation.ResponseStructure).Execute(); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new JsonUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), false, webResponse); ResponseUnmarshaller unmarshaller = PutDedicatedIpWarmupAttributesResponseUnmarshaller.Instance; var response = unmarshaller.Unmarshall(context) as PutDedicatedIpWarmupAttributesResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("PinpointEmail")] public void PutDedicatedIpWarmupAttributes_BadRequestExceptionMarshallTest() { var operation = service_model.FindOperation("PutDedicatedIpWarmupAttributes"); var request = InstantiateClassGenerator.Execute(); var marshaller = new PutDedicatedIpWarmupAttributesRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("PutDedicatedIpWarmupAttributes", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("BadRequestException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","BadRequestException"}, } }; var payloadResponse = new JsonSampleGenerator(service_model, exception).Execute(); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new JsonUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = PutDedicatedIpWarmupAttributesResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("PinpointEmail")] public void PutDedicatedIpWarmupAttributes_NotFoundExceptionMarshallTest() { var operation = service_model.FindOperation("PutDedicatedIpWarmupAttributes"); var request = InstantiateClassGenerator.Execute(); var marshaller = new PutDedicatedIpWarmupAttributesRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("PutDedicatedIpWarmupAttributes", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("NotFoundException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","NotFoundException"}, } }; var payloadResponse = new JsonSampleGenerator(service_model, exception).Execute(); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new JsonUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = PutDedicatedIpWarmupAttributesResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("PinpointEmail")] public void PutDedicatedIpWarmupAttributes_TooManyRequestsExceptionMarshallTest() { var operation = service_model.FindOperation("PutDedicatedIpWarmupAttributes"); var request = InstantiateClassGenerator.Execute(); var marshaller = new PutDedicatedIpWarmupAttributesRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("PutDedicatedIpWarmupAttributes", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("TooManyRequestsException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","TooManyRequestsException"}, } }; var payloadResponse = new JsonSampleGenerator(service_model, exception).Execute(); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new JsonUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = PutDedicatedIpWarmupAttributesResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("PinpointEmail")] public void PutDeliverabilityDashboardOptionMarshallTest() { var operation = service_model.FindOperation("PutDeliverabilityDashboardOption"); var request = InstantiateClassGenerator.Execute(); var marshaller = new PutDeliverabilityDashboardOptionRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("PutDeliverabilityDashboardOption", request, internalRequest, service_model); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"} } }; var payloadResponse = new JsonSampleGenerator(service_model, operation.ResponseStructure).Execute(); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new JsonUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), false, webResponse); ResponseUnmarshaller unmarshaller = PutDeliverabilityDashboardOptionResponseUnmarshaller.Instance; var response = unmarshaller.Unmarshall(context) as PutDeliverabilityDashboardOptionResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("PinpointEmail")] public void PutDeliverabilityDashboardOption_AlreadyExistsExceptionMarshallTest() { var operation = service_model.FindOperation("PutDeliverabilityDashboardOption"); var request = InstantiateClassGenerator.Execute(); var marshaller = new PutDeliverabilityDashboardOptionRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("PutDeliverabilityDashboardOption", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("AlreadyExistsException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","AlreadyExistsException"}, } }; var payloadResponse = new JsonSampleGenerator(service_model, exception).Execute(); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new JsonUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = PutDeliverabilityDashboardOptionResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("PinpointEmail")] public void PutDeliverabilityDashboardOption_BadRequestExceptionMarshallTest() { var operation = service_model.FindOperation("PutDeliverabilityDashboardOption"); var request = InstantiateClassGenerator.Execute(); var marshaller = new PutDeliverabilityDashboardOptionRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("PutDeliverabilityDashboardOption", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("BadRequestException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","BadRequestException"}, } }; var payloadResponse = new JsonSampleGenerator(service_model, exception).Execute(); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new JsonUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = PutDeliverabilityDashboardOptionResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("PinpointEmail")] public void PutDeliverabilityDashboardOption_LimitExceededExceptionMarshallTest() { var operation = service_model.FindOperation("PutDeliverabilityDashboardOption"); var request = InstantiateClassGenerator.Execute(); var marshaller = new PutDeliverabilityDashboardOptionRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("PutDeliverabilityDashboardOption", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("LimitExceededException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","LimitExceededException"}, } }; var payloadResponse = new JsonSampleGenerator(service_model, exception).Execute(); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new JsonUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = PutDeliverabilityDashboardOptionResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("PinpointEmail")] public void PutDeliverabilityDashboardOption_NotFoundExceptionMarshallTest() { var operation = service_model.FindOperation("PutDeliverabilityDashboardOption"); var request = InstantiateClassGenerator.Execute(); var marshaller = new PutDeliverabilityDashboardOptionRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("PutDeliverabilityDashboardOption", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("NotFoundException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","NotFoundException"}, } }; var payloadResponse = new JsonSampleGenerator(service_model, exception).Execute(); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new JsonUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = PutDeliverabilityDashboardOptionResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("PinpointEmail")] public void PutDeliverabilityDashboardOption_TooManyRequestsExceptionMarshallTest() { var operation = service_model.FindOperation("PutDeliverabilityDashboardOption"); var request = InstantiateClassGenerator.Execute(); var marshaller = new PutDeliverabilityDashboardOptionRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("PutDeliverabilityDashboardOption", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("TooManyRequestsException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","TooManyRequestsException"}, } }; var payloadResponse = new JsonSampleGenerator(service_model, exception).Execute(); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new JsonUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = PutDeliverabilityDashboardOptionResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("PinpointEmail")] public void PutEmailIdentityDkimAttributesMarshallTest() { var operation = service_model.FindOperation("PutEmailIdentityDkimAttributes"); var request = InstantiateClassGenerator.Execute(); var marshaller = new PutEmailIdentityDkimAttributesRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("PutEmailIdentityDkimAttributes", request, internalRequest, service_model); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"} } }; var payloadResponse = new JsonSampleGenerator(service_model, operation.ResponseStructure).Execute(); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new JsonUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), false, webResponse); ResponseUnmarshaller unmarshaller = PutEmailIdentityDkimAttributesResponseUnmarshaller.Instance; var response = unmarshaller.Unmarshall(context) as PutEmailIdentityDkimAttributesResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("PinpointEmail")] public void PutEmailIdentityDkimAttributes_BadRequestExceptionMarshallTest() { var operation = service_model.FindOperation("PutEmailIdentityDkimAttributes"); var request = InstantiateClassGenerator.Execute(); var marshaller = new PutEmailIdentityDkimAttributesRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("PutEmailIdentityDkimAttributes", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("BadRequestException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","BadRequestException"}, } }; var payloadResponse = new JsonSampleGenerator(service_model, exception).Execute(); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new JsonUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = PutEmailIdentityDkimAttributesResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("PinpointEmail")] public void PutEmailIdentityDkimAttributes_NotFoundExceptionMarshallTest() { var operation = service_model.FindOperation("PutEmailIdentityDkimAttributes"); var request = InstantiateClassGenerator.Execute(); var marshaller = new PutEmailIdentityDkimAttributesRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("PutEmailIdentityDkimAttributes", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("NotFoundException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","NotFoundException"}, } }; var payloadResponse = new JsonSampleGenerator(service_model, exception).Execute(); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new JsonUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = PutEmailIdentityDkimAttributesResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("PinpointEmail")] public void PutEmailIdentityDkimAttributes_TooManyRequestsExceptionMarshallTest() { var operation = service_model.FindOperation("PutEmailIdentityDkimAttributes"); var request = InstantiateClassGenerator.Execute(); var marshaller = new PutEmailIdentityDkimAttributesRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("PutEmailIdentityDkimAttributes", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("TooManyRequestsException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","TooManyRequestsException"}, } }; var payloadResponse = new JsonSampleGenerator(service_model, exception).Execute(); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new JsonUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = PutEmailIdentityDkimAttributesResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("PinpointEmail")] public void PutEmailIdentityFeedbackAttributesMarshallTest() { var operation = service_model.FindOperation("PutEmailIdentityFeedbackAttributes"); var request = InstantiateClassGenerator.Execute(); var marshaller = new PutEmailIdentityFeedbackAttributesRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("PutEmailIdentityFeedbackAttributes", request, internalRequest, service_model); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"} } }; var payloadResponse = new JsonSampleGenerator(service_model, operation.ResponseStructure).Execute(); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new JsonUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), false, webResponse); ResponseUnmarshaller unmarshaller = PutEmailIdentityFeedbackAttributesResponseUnmarshaller.Instance; var response = unmarshaller.Unmarshall(context) as PutEmailIdentityFeedbackAttributesResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("PinpointEmail")] public void PutEmailIdentityFeedbackAttributes_BadRequestExceptionMarshallTest() { var operation = service_model.FindOperation("PutEmailIdentityFeedbackAttributes"); var request = InstantiateClassGenerator.Execute(); var marshaller = new PutEmailIdentityFeedbackAttributesRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("PutEmailIdentityFeedbackAttributes", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("BadRequestException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","BadRequestException"}, } }; var payloadResponse = new JsonSampleGenerator(service_model, exception).Execute(); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new JsonUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = PutEmailIdentityFeedbackAttributesResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("PinpointEmail")] public void PutEmailIdentityFeedbackAttributes_NotFoundExceptionMarshallTest() { var operation = service_model.FindOperation("PutEmailIdentityFeedbackAttributes"); var request = InstantiateClassGenerator.Execute(); var marshaller = new PutEmailIdentityFeedbackAttributesRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("PutEmailIdentityFeedbackAttributes", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("NotFoundException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","NotFoundException"}, } }; var payloadResponse = new JsonSampleGenerator(service_model, exception).Execute(); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new JsonUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = PutEmailIdentityFeedbackAttributesResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("PinpointEmail")] public void PutEmailIdentityFeedbackAttributes_TooManyRequestsExceptionMarshallTest() { var operation = service_model.FindOperation("PutEmailIdentityFeedbackAttributes"); var request = InstantiateClassGenerator.Execute(); var marshaller = new PutEmailIdentityFeedbackAttributesRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("PutEmailIdentityFeedbackAttributes", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("TooManyRequestsException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","TooManyRequestsException"}, } }; var payloadResponse = new JsonSampleGenerator(service_model, exception).Execute(); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new JsonUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = PutEmailIdentityFeedbackAttributesResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("PinpointEmail")] public void PutEmailIdentityMailFromAttributesMarshallTest() { var operation = service_model.FindOperation("PutEmailIdentityMailFromAttributes"); var request = InstantiateClassGenerator.Execute(); var marshaller = new PutEmailIdentityMailFromAttributesRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("PutEmailIdentityMailFromAttributes", request, internalRequest, service_model); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"} } }; var payloadResponse = new JsonSampleGenerator(service_model, operation.ResponseStructure).Execute(); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new JsonUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), false, webResponse); ResponseUnmarshaller unmarshaller = PutEmailIdentityMailFromAttributesResponseUnmarshaller.Instance; var response = unmarshaller.Unmarshall(context) as PutEmailIdentityMailFromAttributesResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("PinpointEmail")] public void PutEmailIdentityMailFromAttributes_BadRequestExceptionMarshallTest() { var operation = service_model.FindOperation("PutEmailIdentityMailFromAttributes"); var request = InstantiateClassGenerator.Execute(); var marshaller = new PutEmailIdentityMailFromAttributesRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("PutEmailIdentityMailFromAttributes", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("BadRequestException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","BadRequestException"}, } }; var payloadResponse = new JsonSampleGenerator(service_model, exception).Execute(); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new JsonUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = PutEmailIdentityMailFromAttributesResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("PinpointEmail")] public void PutEmailIdentityMailFromAttributes_NotFoundExceptionMarshallTest() { var operation = service_model.FindOperation("PutEmailIdentityMailFromAttributes"); var request = InstantiateClassGenerator.Execute(); var marshaller = new PutEmailIdentityMailFromAttributesRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("PutEmailIdentityMailFromAttributes", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("NotFoundException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","NotFoundException"}, } }; var payloadResponse = new JsonSampleGenerator(service_model, exception).Execute(); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new JsonUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = PutEmailIdentityMailFromAttributesResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("PinpointEmail")] public void PutEmailIdentityMailFromAttributes_TooManyRequestsExceptionMarshallTest() { var operation = service_model.FindOperation("PutEmailIdentityMailFromAttributes"); var request = InstantiateClassGenerator.Execute(); var marshaller = new PutEmailIdentityMailFromAttributesRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("PutEmailIdentityMailFromAttributes", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("TooManyRequestsException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","TooManyRequestsException"}, } }; var payloadResponse = new JsonSampleGenerator(service_model, exception).Execute(); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new JsonUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = PutEmailIdentityMailFromAttributesResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("PinpointEmail")] public void SendEmailMarshallTest() { var operation = service_model.FindOperation("SendEmail"); var request = InstantiateClassGenerator.Execute(); var marshaller = new SendEmailRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("SendEmail", request, internalRequest, service_model); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"} } }; var payloadResponse = new JsonSampleGenerator(service_model, operation.ResponseStructure).Execute(); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new JsonUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), false, webResponse); ResponseUnmarshaller unmarshaller = SendEmailResponseUnmarshaller.Instance; var response = unmarshaller.Unmarshall(context) as SendEmailResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("PinpointEmail")] public void SendEmail_AccountSuspendedExceptionMarshallTest() { var operation = service_model.FindOperation("SendEmail"); var request = InstantiateClassGenerator.Execute(); var marshaller = new SendEmailRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("SendEmail", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("AccountSuspendedException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","AccountSuspendedException"}, } }; var payloadResponse = new JsonSampleGenerator(service_model, exception).Execute(); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new JsonUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = SendEmailResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("PinpointEmail")] public void SendEmail_BadRequestExceptionMarshallTest() { var operation = service_model.FindOperation("SendEmail"); var request = InstantiateClassGenerator.Execute(); var marshaller = new SendEmailRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("SendEmail", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("BadRequestException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","BadRequestException"}, } }; var payloadResponse = new JsonSampleGenerator(service_model, exception).Execute(); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new JsonUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = SendEmailResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("PinpointEmail")] public void SendEmail_LimitExceededExceptionMarshallTest() { var operation = service_model.FindOperation("SendEmail"); var request = InstantiateClassGenerator.Execute(); var marshaller = new SendEmailRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("SendEmail", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("LimitExceededException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","LimitExceededException"}, } }; var payloadResponse = new JsonSampleGenerator(service_model, exception).Execute(); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new JsonUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = SendEmailResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("PinpointEmail")] public void SendEmail_MailFromDomainNotVerifiedExceptionMarshallTest() { var operation = service_model.FindOperation("SendEmail"); var request = InstantiateClassGenerator.Execute(); var marshaller = new SendEmailRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("SendEmail", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("MailFromDomainNotVerifiedException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","MailFromDomainNotVerifiedException"}, } }; var payloadResponse = new JsonSampleGenerator(service_model, exception).Execute(); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new JsonUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = SendEmailResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("PinpointEmail")] public void SendEmail_MessageRejectedExceptionMarshallTest() { var operation = service_model.FindOperation("SendEmail"); var request = InstantiateClassGenerator.Execute(); var marshaller = new SendEmailRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("SendEmail", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("MessageRejectedException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","MessageRejectedException"}, } }; var payloadResponse = new JsonSampleGenerator(service_model, exception).Execute(); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new JsonUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = SendEmailResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("PinpointEmail")] public void SendEmail_NotFoundExceptionMarshallTest() { var operation = service_model.FindOperation("SendEmail"); var request = InstantiateClassGenerator.Execute(); var marshaller = new SendEmailRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("SendEmail", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("NotFoundException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","NotFoundException"}, } }; var payloadResponse = new JsonSampleGenerator(service_model, exception).Execute(); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new JsonUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = SendEmailResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("PinpointEmail")] public void SendEmail_SendingPausedExceptionMarshallTest() { var operation = service_model.FindOperation("SendEmail"); var request = InstantiateClassGenerator.Execute(); var marshaller = new SendEmailRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("SendEmail", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("SendingPausedException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","SendingPausedException"}, } }; var payloadResponse = new JsonSampleGenerator(service_model, exception).Execute(); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new JsonUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = SendEmailResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("PinpointEmail")] public void SendEmail_TooManyRequestsExceptionMarshallTest() { var operation = service_model.FindOperation("SendEmail"); var request = InstantiateClassGenerator.Execute(); var marshaller = new SendEmailRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("SendEmail", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("TooManyRequestsException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","TooManyRequestsException"}, } }; var payloadResponse = new JsonSampleGenerator(service_model, exception).Execute(); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new JsonUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = SendEmailResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("PinpointEmail")] public void TagResourceMarshallTest() { var operation = service_model.FindOperation("TagResource"); var request = InstantiateClassGenerator.Execute(); var marshaller = new TagResourceRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("TagResource", request, internalRequest, service_model); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"} } }; var payloadResponse = new JsonSampleGenerator(service_model, operation.ResponseStructure).Execute(); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new JsonUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), false, webResponse); ResponseUnmarshaller unmarshaller = TagResourceResponseUnmarshaller.Instance; var response = unmarshaller.Unmarshall(context) as TagResourceResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("PinpointEmail")] public void TagResource_BadRequestExceptionMarshallTest() { var operation = service_model.FindOperation("TagResource"); var request = InstantiateClassGenerator.Execute(); var marshaller = new TagResourceRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("TagResource", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("BadRequestException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","BadRequestException"}, } }; var payloadResponse = new JsonSampleGenerator(service_model, exception).Execute(); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new JsonUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = TagResourceResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("PinpointEmail")] public void TagResource_ConcurrentModificationExceptionMarshallTest() { var operation = service_model.FindOperation("TagResource"); var request = InstantiateClassGenerator.Execute(); var marshaller = new TagResourceRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("TagResource", 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"}, {"x-amzn-ErrorType","ConcurrentModificationException"}, } }; var payloadResponse = new JsonSampleGenerator(service_model, exception).Execute(); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new JsonUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = TagResourceResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("PinpointEmail")] public void TagResource_NotFoundExceptionMarshallTest() { var operation = service_model.FindOperation("TagResource"); var request = InstantiateClassGenerator.Execute(); var marshaller = new TagResourceRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("TagResource", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("NotFoundException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","NotFoundException"}, } }; var payloadResponse = new JsonSampleGenerator(service_model, exception).Execute(); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new JsonUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = TagResourceResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("PinpointEmail")] public void TagResource_TooManyRequestsExceptionMarshallTest() { var operation = service_model.FindOperation("TagResource"); var request = InstantiateClassGenerator.Execute(); var marshaller = new TagResourceRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("TagResource", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("TooManyRequestsException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","TooManyRequestsException"}, } }; var payloadResponse = new JsonSampleGenerator(service_model, exception).Execute(); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new JsonUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = TagResourceResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("PinpointEmail")] public void UntagResourceMarshallTest() { var operation = service_model.FindOperation("UntagResource"); var request = InstantiateClassGenerator.Execute(); var marshaller = new UntagResourceRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("UntagResource", request, internalRequest, service_model); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"} } }; var payloadResponse = new JsonSampleGenerator(service_model, operation.ResponseStructure).Execute(); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new JsonUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), false, webResponse); ResponseUnmarshaller unmarshaller = UntagResourceResponseUnmarshaller.Instance; var response = unmarshaller.Unmarshall(context) as UntagResourceResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("PinpointEmail")] public void UntagResource_BadRequestExceptionMarshallTest() { var operation = service_model.FindOperation("UntagResource"); var request = InstantiateClassGenerator.Execute(); var marshaller = new UntagResourceRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("UntagResource", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("BadRequestException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","BadRequestException"}, } }; var payloadResponse = new JsonSampleGenerator(service_model, exception).Execute(); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new JsonUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = UntagResourceResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("PinpointEmail")] public void UntagResource_ConcurrentModificationExceptionMarshallTest() { var operation = service_model.FindOperation("UntagResource"); var request = InstantiateClassGenerator.Execute(); var marshaller = new UntagResourceRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("UntagResource", 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"}, {"x-amzn-ErrorType","ConcurrentModificationException"}, } }; var payloadResponse = new JsonSampleGenerator(service_model, exception).Execute(); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new JsonUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = UntagResourceResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("PinpointEmail")] public void UntagResource_NotFoundExceptionMarshallTest() { var operation = service_model.FindOperation("UntagResource"); var request = InstantiateClassGenerator.Execute(); var marshaller = new UntagResourceRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("UntagResource", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("NotFoundException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","NotFoundException"}, } }; var payloadResponse = new JsonSampleGenerator(service_model, exception).Execute(); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new JsonUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = UntagResourceResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("PinpointEmail")] public void UntagResource_TooManyRequestsExceptionMarshallTest() { var operation = service_model.FindOperation("UntagResource"); var request = InstantiateClassGenerator.Execute(); var marshaller = new UntagResourceRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("UntagResource", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("TooManyRequestsException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","TooManyRequestsException"}, } }; var payloadResponse = new JsonSampleGenerator(service_model, exception).Execute(); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new JsonUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = UntagResourceResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("PinpointEmail")] public void UpdateConfigurationSetEventDestinationMarshallTest() { var operation = service_model.FindOperation("UpdateConfigurationSetEventDestination"); var request = InstantiateClassGenerator.Execute(); var marshaller = new UpdateConfigurationSetEventDestinationRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("UpdateConfigurationSetEventDestination", request, internalRequest, service_model); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"} } }; var payloadResponse = new JsonSampleGenerator(service_model, operation.ResponseStructure).Execute(); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new JsonUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), false, webResponse); ResponseUnmarshaller unmarshaller = UpdateConfigurationSetEventDestinationResponseUnmarshaller.Instance; var response = unmarshaller.Unmarshall(context) as UpdateConfigurationSetEventDestinationResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("PinpointEmail")] public void UpdateConfigurationSetEventDestination_BadRequestExceptionMarshallTest() { var operation = service_model.FindOperation("UpdateConfigurationSetEventDestination"); var request = InstantiateClassGenerator.Execute(); var marshaller = new UpdateConfigurationSetEventDestinationRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("UpdateConfigurationSetEventDestination", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("BadRequestException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","BadRequestException"}, } }; var payloadResponse = new JsonSampleGenerator(service_model, exception).Execute(); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new JsonUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = UpdateConfigurationSetEventDestinationResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("PinpointEmail")] public void UpdateConfigurationSetEventDestination_NotFoundExceptionMarshallTest() { var operation = service_model.FindOperation("UpdateConfigurationSetEventDestination"); var request = InstantiateClassGenerator.Execute(); var marshaller = new UpdateConfigurationSetEventDestinationRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("UpdateConfigurationSetEventDestination", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("NotFoundException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","NotFoundException"}, } }; var payloadResponse = new JsonSampleGenerator(service_model, exception).Execute(); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new JsonUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = UpdateConfigurationSetEventDestinationResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("PinpointEmail")] public void UpdateConfigurationSetEventDestination_TooManyRequestsExceptionMarshallTest() { var operation = service_model.FindOperation("UpdateConfigurationSetEventDestination"); var request = InstantiateClassGenerator.Execute(); var marshaller = new UpdateConfigurationSetEventDestinationRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("UpdateConfigurationSetEventDestination", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("TooManyRequestsException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","TooManyRequestsException"}, } }; var payloadResponse = new JsonSampleGenerator(service_model, exception).Execute(); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new JsonUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, webResponse, true); var response = UpdateConfigurationSetEventDestinationResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } } }