/* * 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 robomaker-2018-06-29.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.RoboMaker; using Amazon.RoboMaker.Model; using Amazon.RoboMaker.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 RoboMakerMarshallingTests { static readonly ServiceModel service_model = Utils.LoadServiceModel("robomaker"); [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void BatchDeleteWorldsMarshallTest() { var operation = service_model.FindOperation("BatchDeleteWorlds"); var request = InstantiateClassGenerator.Execute(); var marshaller = new BatchDeleteWorldsRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("BatchDeleteWorlds", 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 = BatchDeleteWorldsResponseUnmarshaller.Instance; var response = unmarshaller.Unmarshall(context) as BatchDeleteWorldsResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void BatchDeleteWorlds_InternalServerExceptionMarshallTest() { var operation = service_model.FindOperation("BatchDeleteWorlds"); var request = InstantiateClassGenerator.Execute(); var marshaller = new BatchDeleteWorldsRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("BatchDeleteWorlds", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("InternalServerException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","InternalServerException"}, } }; 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 = BatchDeleteWorldsResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void BatchDeleteWorlds_InvalidParameterExceptionMarshallTest() { var operation = service_model.FindOperation("BatchDeleteWorlds"); var request = InstantiateClassGenerator.Execute(); var marshaller = new BatchDeleteWorldsRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("BatchDeleteWorlds", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("InvalidParameterException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","InvalidParameterException"}, } }; 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 = BatchDeleteWorldsResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void BatchDeleteWorlds_ThrottlingExceptionMarshallTest() { var operation = service_model.FindOperation("BatchDeleteWorlds"); var request = InstantiateClassGenerator.Execute(); var marshaller = new BatchDeleteWorldsRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("BatchDeleteWorlds", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("ThrottlingException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","ThrottlingException"}, } }; 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 = BatchDeleteWorldsResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void BatchDescribeSimulationJobMarshallTest() { var operation = service_model.FindOperation("BatchDescribeSimulationJob"); var request = InstantiateClassGenerator.Execute(); var marshaller = new BatchDescribeSimulationJobRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("BatchDescribeSimulationJob", 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 = BatchDescribeSimulationJobResponseUnmarshaller.Instance; var response = unmarshaller.Unmarshall(context) as BatchDescribeSimulationJobResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void BatchDescribeSimulationJob_InternalServerExceptionMarshallTest() { var operation = service_model.FindOperation("BatchDescribeSimulationJob"); var request = InstantiateClassGenerator.Execute(); var marshaller = new BatchDescribeSimulationJobRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("BatchDescribeSimulationJob", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("InternalServerException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","InternalServerException"}, } }; 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 = BatchDescribeSimulationJobResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void BatchDescribeSimulationJob_InvalidParameterExceptionMarshallTest() { var operation = service_model.FindOperation("BatchDescribeSimulationJob"); var request = InstantiateClassGenerator.Execute(); var marshaller = new BatchDescribeSimulationJobRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("BatchDescribeSimulationJob", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("InvalidParameterException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","InvalidParameterException"}, } }; 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 = BatchDescribeSimulationJobResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void BatchDescribeSimulationJob_ResourceNotFoundExceptionMarshallTest() { var operation = service_model.FindOperation("BatchDescribeSimulationJob"); var request = InstantiateClassGenerator.Execute(); var marshaller = new BatchDescribeSimulationJobRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("BatchDescribeSimulationJob", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("ResourceNotFoundException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","ResourceNotFoundException"}, } }; 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 = BatchDescribeSimulationJobResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void BatchDescribeSimulationJob_ThrottlingExceptionMarshallTest() { var operation = service_model.FindOperation("BatchDescribeSimulationJob"); var request = InstantiateClassGenerator.Execute(); var marshaller = new BatchDescribeSimulationJobRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("BatchDescribeSimulationJob", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("ThrottlingException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","ThrottlingException"}, } }; 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 = BatchDescribeSimulationJobResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void CancelDeploymentJobMarshallTest() { var operation = service_model.FindOperation("CancelDeploymentJob"); var request = InstantiateClassGenerator.Execute(); var marshaller = new CancelDeploymentJobRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("CancelDeploymentJob", 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 = CancelDeploymentJobResponseUnmarshaller.Instance; var response = unmarshaller.Unmarshall(context) as CancelDeploymentJobResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void CancelDeploymentJob_InternalServerExceptionMarshallTest() { var operation = service_model.FindOperation("CancelDeploymentJob"); var request = InstantiateClassGenerator.Execute(); var marshaller = new CancelDeploymentJobRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("CancelDeploymentJob", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("InternalServerException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","InternalServerException"}, } }; 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 = CancelDeploymentJobResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void CancelDeploymentJob_InvalidParameterExceptionMarshallTest() { var operation = service_model.FindOperation("CancelDeploymentJob"); var request = InstantiateClassGenerator.Execute(); var marshaller = new CancelDeploymentJobRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("CancelDeploymentJob", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("InvalidParameterException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","InvalidParameterException"}, } }; 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 = CancelDeploymentJobResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void CancelDeploymentJob_ResourceNotFoundExceptionMarshallTest() { var operation = service_model.FindOperation("CancelDeploymentJob"); var request = InstantiateClassGenerator.Execute(); var marshaller = new CancelDeploymentJobRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("CancelDeploymentJob", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("ResourceNotFoundException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","ResourceNotFoundException"}, } }; 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 = CancelDeploymentJobResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void CancelDeploymentJob_ThrottlingExceptionMarshallTest() { var operation = service_model.FindOperation("CancelDeploymentJob"); var request = InstantiateClassGenerator.Execute(); var marshaller = new CancelDeploymentJobRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("CancelDeploymentJob", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("ThrottlingException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","ThrottlingException"}, } }; 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 = CancelDeploymentJobResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void CancelSimulationJobMarshallTest() { var operation = service_model.FindOperation("CancelSimulationJob"); var request = InstantiateClassGenerator.Execute(); var marshaller = new CancelSimulationJobRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("CancelSimulationJob", 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 = CancelSimulationJobResponseUnmarshaller.Instance; var response = unmarshaller.Unmarshall(context) as CancelSimulationJobResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void CancelSimulationJob_InternalServerExceptionMarshallTest() { var operation = service_model.FindOperation("CancelSimulationJob"); var request = InstantiateClassGenerator.Execute(); var marshaller = new CancelSimulationJobRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("CancelSimulationJob", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("InternalServerException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","InternalServerException"}, } }; 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 = CancelSimulationJobResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void CancelSimulationJob_InvalidParameterExceptionMarshallTest() { var operation = service_model.FindOperation("CancelSimulationJob"); var request = InstantiateClassGenerator.Execute(); var marshaller = new CancelSimulationJobRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("CancelSimulationJob", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("InvalidParameterException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","InvalidParameterException"}, } }; 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 = CancelSimulationJobResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void CancelSimulationJob_ResourceNotFoundExceptionMarshallTest() { var operation = service_model.FindOperation("CancelSimulationJob"); var request = InstantiateClassGenerator.Execute(); var marshaller = new CancelSimulationJobRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("CancelSimulationJob", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("ResourceNotFoundException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","ResourceNotFoundException"}, } }; 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 = CancelSimulationJobResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void CancelSimulationJob_ThrottlingExceptionMarshallTest() { var operation = service_model.FindOperation("CancelSimulationJob"); var request = InstantiateClassGenerator.Execute(); var marshaller = new CancelSimulationJobRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("CancelSimulationJob", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("ThrottlingException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","ThrottlingException"}, } }; 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 = CancelSimulationJobResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void CancelSimulationJobBatchMarshallTest() { var operation = service_model.FindOperation("CancelSimulationJobBatch"); var request = InstantiateClassGenerator.Execute(); var marshaller = new CancelSimulationJobBatchRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("CancelSimulationJobBatch", 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 = CancelSimulationJobBatchResponseUnmarshaller.Instance; var response = unmarshaller.Unmarshall(context) as CancelSimulationJobBatchResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void CancelSimulationJobBatch_InternalServerExceptionMarshallTest() { var operation = service_model.FindOperation("CancelSimulationJobBatch"); var request = InstantiateClassGenerator.Execute(); var marshaller = new CancelSimulationJobBatchRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("CancelSimulationJobBatch", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("InternalServerException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","InternalServerException"}, } }; 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 = CancelSimulationJobBatchResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void CancelSimulationJobBatch_InvalidParameterExceptionMarshallTest() { var operation = service_model.FindOperation("CancelSimulationJobBatch"); var request = InstantiateClassGenerator.Execute(); var marshaller = new CancelSimulationJobBatchRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("CancelSimulationJobBatch", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("InvalidParameterException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","InvalidParameterException"}, } }; 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 = CancelSimulationJobBatchResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void CancelSimulationJobBatch_ResourceNotFoundExceptionMarshallTest() { var operation = service_model.FindOperation("CancelSimulationJobBatch"); var request = InstantiateClassGenerator.Execute(); var marshaller = new CancelSimulationJobBatchRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("CancelSimulationJobBatch", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("ResourceNotFoundException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","ResourceNotFoundException"}, } }; 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 = CancelSimulationJobBatchResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void CancelSimulationJobBatch_ThrottlingExceptionMarshallTest() { var operation = service_model.FindOperation("CancelSimulationJobBatch"); var request = InstantiateClassGenerator.Execute(); var marshaller = new CancelSimulationJobBatchRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("CancelSimulationJobBatch", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("ThrottlingException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","ThrottlingException"}, } }; 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 = CancelSimulationJobBatchResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void CancelWorldExportJobMarshallTest() { var operation = service_model.FindOperation("CancelWorldExportJob"); var request = InstantiateClassGenerator.Execute(); var marshaller = new CancelWorldExportJobRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("CancelWorldExportJob", 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 = CancelWorldExportJobResponseUnmarshaller.Instance; var response = unmarshaller.Unmarshall(context) as CancelWorldExportJobResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void CancelWorldExportJob_InternalServerExceptionMarshallTest() { var operation = service_model.FindOperation("CancelWorldExportJob"); var request = InstantiateClassGenerator.Execute(); var marshaller = new CancelWorldExportJobRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("CancelWorldExportJob", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("InternalServerException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","InternalServerException"}, } }; 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 = CancelWorldExportJobResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void CancelWorldExportJob_InvalidParameterExceptionMarshallTest() { var operation = service_model.FindOperation("CancelWorldExportJob"); var request = InstantiateClassGenerator.Execute(); var marshaller = new CancelWorldExportJobRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("CancelWorldExportJob", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("InvalidParameterException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","InvalidParameterException"}, } }; 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 = CancelWorldExportJobResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void CancelWorldExportJob_ResourceNotFoundExceptionMarshallTest() { var operation = service_model.FindOperation("CancelWorldExportJob"); var request = InstantiateClassGenerator.Execute(); var marshaller = new CancelWorldExportJobRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("CancelWorldExportJob", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("ResourceNotFoundException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","ResourceNotFoundException"}, } }; 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 = CancelWorldExportJobResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void CancelWorldExportJob_ThrottlingExceptionMarshallTest() { var operation = service_model.FindOperation("CancelWorldExportJob"); var request = InstantiateClassGenerator.Execute(); var marshaller = new CancelWorldExportJobRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("CancelWorldExportJob", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("ThrottlingException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","ThrottlingException"}, } }; 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 = CancelWorldExportJobResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void CancelWorldGenerationJobMarshallTest() { var operation = service_model.FindOperation("CancelWorldGenerationJob"); var request = InstantiateClassGenerator.Execute(); var marshaller = new CancelWorldGenerationJobRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("CancelWorldGenerationJob", 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 = CancelWorldGenerationJobResponseUnmarshaller.Instance; var response = unmarshaller.Unmarshall(context) as CancelWorldGenerationJobResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void CancelWorldGenerationJob_InternalServerExceptionMarshallTest() { var operation = service_model.FindOperation("CancelWorldGenerationJob"); var request = InstantiateClassGenerator.Execute(); var marshaller = new CancelWorldGenerationJobRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("CancelWorldGenerationJob", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("InternalServerException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","InternalServerException"}, } }; 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 = CancelWorldGenerationJobResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void CancelWorldGenerationJob_InvalidParameterExceptionMarshallTest() { var operation = service_model.FindOperation("CancelWorldGenerationJob"); var request = InstantiateClassGenerator.Execute(); var marshaller = new CancelWorldGenerationJobRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("CancelWorldGenerationJob", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("InvalidParameterException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","InvalidParameterException"}, } }; 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 = CancelWorldGenerationJobResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void CancelWorldGenerationJob_ResourceNotFoundExceptionMarshallTest() { var operation = service_model.FindOperation("CancelWorldGenerationJob"); var request = InstantiateClassGenerator.Execute(); var marshaller = new CancelWorldGenerationJobRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("CancelWorldGenerationJob", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("ResourceNotFoundException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","ResourceNotFoundException"}, } }; 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 = CancelWorldGenerationJobResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void CancelWorldGenerationJob_ThrottlingExceptionMarshallTest() { var operation = service_model.FindOperation("CancelWorldGenerationJob"); var request = InstantiateClassGenerator.Execute(); var marshaller = new CancelWorldGenerationJobRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("CancelWorldGenerationJob", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("ThrottlingException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","ThrottlingException"}, } }; 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 = CancelWorldGenerationJobResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void CreateDeploymentJobMarshallTest() { var operation = service_model.FindOperation("CreateDeploymentJob"); var request = InstantiateClassGenerator.Execute(); var marshaller = new CreateDeploymentJobRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("CreateDeploymentJob", 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 = CreateDeploymentJobResponseUnmarshaller.Instance; var response = unmarshaller.Unmarshall(context) as CreateDeploymentJobResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void CreateDeploymentJob_ConcurrentDeploymentExceptionMarshallTest() { var operation = service_model.FindOperation("CreateDeploymentJob"); var request = InstantiateClassGenerator.Execute(); var marshaller = new CreateDeploymentJobRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("CreateDeploymentJob", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("ConcurrentDeploymentException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","ConcurrentDeploymentException"}, } }; 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 = CreateDeploymentJobResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void CreateDeploymentJob_IdempotentParameterMismatchExceptionMarshallTest() { var operation = service_model.FindOperation("CreateDeploymentJob"); var request = InstantiateClassGenerator.Execute(); var marshaller = new CreateDeploymentJobRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("CreateDeploymentJob", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("IdempotentParameterMismatchException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","IdempotentParameterMismatchException"}, } }; 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 = CreateDeploymentJobResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void CreateDeploymentJob_InternalServerExceptionMarshallTest() { var operation = service_model.FindOperation("CreateDeploymentJob"); var request = InstantiateClassGenerator.Execute(); var marshaller = new CreateDeploymentJobRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("CreateDeploymentJob", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("InternalServerException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","InternalServerException"}, } }; 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 = CreateDeploymentJobResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void CreateDeploymentJob_InvalidParameterExceptionMarshallTest() { var operation = service_model.FindOperation("CreateDeploymentJob"); var request = InstantiateClassGenerator.Execute(); var marshaller = new CreateDeploymentJobRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("CreateDeploymentJob", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("InvalidParameterException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","InvalidParameterException"}, } }; 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 = CreateDeploymentJobResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void CreateDeploymentJob_LimitExceededExceptionMarshallTest() { var operation = service_model.FindOperation("CreateDeploymentJob"); var request = InstantiateClassGenerator.Execute(); var marshaller = new CreateDeploymentJobRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("CreateDeploymentJob", 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 = CreateDeploymentJobResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void CreateDeploymentJob_ResourceNotFoundExceptionMarshallTest() { var operation = service_model.FindOperation("CreateDeploymentJob"); var request = InstantiateClassGenerator.Execute(); var marshaller = new CreateDeploymentJobRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("CreateDeploymentJob", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("ResourceNotFoundException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","ResourceNotFoundException"}, } }; 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 = CreateDeploymentJobResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void CreateDeploymentJob_ThrottlingExceptionMarshallTest() { var operation = service_model.FindOperation("CreateDeploymentJob"); var request = InstantiateClassGenerator.Execute(); var marshaller = new CreateDeploymentJobRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("CreateDeploymentJob", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("ThrottlingException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","ThrottlingException"}, } }; 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 = CreateDeploymentJobResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void CreateFleetMarshallTest() { var operation = service_model.FindOperation("CreateFleet"); var request = InstantiateClassGenerator.Execute(); var marshaller = new CreateFleetRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("CreateFleet", 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 = CreateFleetResponseUnmarshaller.Instance; var response = unmarshaller.Unmarshall(context) as CreateFleetResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void CreateFleet_InternalServerExceptionMarshallTest() { var operation = service_model.FindOperation("CreateFleet"); var request = InstantiateClassGenerator.Execute(); var marshaller = new CreateFleetRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("CreateFleet", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("InternalServerException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","InternalServerException"}, } }; 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 = CreateFleetResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void CreateFleet_InvalidParameterExceptionMarshallTest() { var operation = service_model.FindOperation("CreateFleet"); var request = InstantiateClassGenerator.Execute(); var marshaller = new CreateFleetRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("CreateFleet", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("InvalidParameterException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","InvalidParameterException"}, } }; 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 = CreateFleetResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void CreateFleet_LimitExceededExceptionMarshallTest() { var operation = service_model.FindOperation("CreateFleet"); var request = InstantiateClassGenerator.Execute(); var marshaller = new CreateFleetRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("CreateFleet", 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 = CreateFleetResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void CreateFleet_ThrottlingExceptionMarshallTest() { var operation = service_model.FindOperation("CreateFleet"); var request = InstantiateClassGenerator.Execute(); var marshaller = new CreateFleetRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("CreateFleet", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("ThrottlingException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","ThrottlingException"}, } }; 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 = CreateFleetResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void CreateRobotMarshallTest() { var operation = service_model.FindOperation("CreateRobot"); var request = InstantiateClassGenerator.Execute(); var marshaller = new CreateRobotRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("CreateRobot", 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 = CreateRobotResponseUnmarshaller.Instance; var response = unmarshaller.Unmarshall(context) as CreateRobotResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void CreateRobot_InternalServerExceptionMarshallTest() { var operation = service_model.FindOperation("CreateRobot"); var request = InstantiateClassGenerator.Execute(); var marshaller = new CreateRobotRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("CreateRobot", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("InternalServerException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","InternalServerException"}, } }; 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 = CreateRobotResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void CreateRobot_InvalidParameterExceptionMarshallTest() { var operation = service_model.FindOperation("CreateRobot"); var request = InstantiateClassGenerator.Execute(); var marshaller = new CreateRobotRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("CreateRobot", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("InvalidParameterException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","InvalidParameterException"}, } }; 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 = CreateRobotResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void CreateRobot_LimitExceededExceptionMarshallTest() { var operation = service_model.FindOperation("CreateRobot"); var request = InstantiateClassGenerator.Execute(); var marshaller = new CreateRobotRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("CreateRobot", 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 = CreateRobotResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void CreateRobot_ResourceAlreadyExistsExceptionMarshallTest() { var operation = service_model.FindOperation("CreateRobot"); var request = InstantiateClassGenerator.Execute(); var marshaller = new CreateRobotRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("CreateRobot", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("ResourceAlreadyExistsException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","ResourceAlreadyExistsException"}, } }; 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 = CreateRobotResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void CreateRobot_ThrottlingExceptionMarshallTest() { var operation = service_model.FindOperation("CreateRobot"); var request = InstantiateClassGenerator.Execute(); var marshaller = new CreateRobotRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("CreateRobot", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("ThrottlingException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","ThrottlingException"}, } }; 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 = CreateRobotResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void CreateRobotApplicationMarshallTest() { var operation = service_model.FindOperation("CreateRobotApplication"); var request = InstantiateClassGenerator.Execute(); var marshaller = new CreateRobotApplicationRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("CreateRobotApplication", 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 = CreateRobotApplicationResponseUnmarshaller.Instance; var response = unmarshaller.Unmarshall(context) as CreateRobotApplicationResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void CreateRobotApplication_IdempotentParameterMismatchExceptionMarshallTest() { var operation = service_model.FindOperation("CreateRobotApplication"); var request = InstantiateClassGenerator.Execute(); var marshaller = new CreateRobotApplicationRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("CreateRobotApplication", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("IdempotentParameterMismatchException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","IdempotentParameterMismatchException"}, } }; 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 = CreateRobotApplicationResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void CreateRobotApplication_InternalServerExceptionMarshallTest() { var operation = service_model.FindOperation("CreateRobotApplication"); var request = InstantiateClassGenerator.Execute(); var marshaller = new CreateRobotApplicationRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("CreateRobotApplication", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("InternalServerException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","InternalServerException"}, } }; 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 = CreateRobotApplicationResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void CreateRobotApplication_InvalidParameterExceptionMarshallTest() { var operation = service_model.FindOperation("CreateRobotApplication"); var request = InstantiateClassGenerator.Execute(); var marshaller = new CreateRobotApplicationRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("CreateRobotApplication", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("InvalidParameterException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","InvalidParameterException"}, } }; 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 = CreateRobotApplicationResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void CreateRobotApplication_LimitExceededExceptionMarshallTest() { var operation = service_model.FindOperation("CreateRobotApplication"); var request = InstantiateClassGenerator.Execute(); var marshaller = new CreateRobotApplicationRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("CreateRobotApplication", 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 = CreateRobotApplicationResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void CreateRobotApplication_ResourceAlreadyExistsExceptionMarshallTest() { var operation = service_model.FindOperation("CreateRobotApplication"); var request = InstantiateClassGenerator.Execute(); var marshaller = new CreateRobotApplicationRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("CreateRobotApplication", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("ResourceAlreadyExistsException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","ResourceAlreadyExistsException"}, } }; 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 = CreateRobotApplicationResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void CreateRobotApplication_ThrottlingExceptionMarshallTest() { var operation = service_model.FindOperation("CreateRobotApplication"); var request = InstantiateClassGenerator.Execute(); var marshaller = new CreateRobotApplicationRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("CreateRobotApplication", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("ThrottlingException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","ThrottlingException"}, } }; 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 = CreateRobotApplicationResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void CreateRobotApplicationVersionMarshallTest() { var operation = service_model.FindOperation("CreateRobotApplicationVersion"); var request = InstantiateClassGenerator.Execute(); var marshaller = new CreateRobotApplicationVersionRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("CreateRobotApplicationVersion", 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 = CreateRobotApplicationVersionResponseUnmarshaller.Instance; var response = unmarshaller.Unmarshall(context) as CreateRobotApplicationVersionResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void CreateRobotApplicationVersion_IdempotentParameterMismatchExceptionMarshallTest() { var operation = service_model.FindOperation("CreateRobotApplicationVersion"); var request = InstantiateClassGenerator.Execute(); var marshaller = new CreateRobotApplicationVersionRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("CreateRobotApplicationVersion", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("IdempotentParameterMismatchException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","IdempotentParameterMismatchException"}, } }; 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 = CreateRobotApplicationVersionResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void CreateRobotApplicationVersion_InternalServerExceptionMarshallTest() { var operation = service_model.FindOperation("CreateRobotApplicationVersion"); var request = InstantiateClassGenerator.Execute(); var marshaller = new CreateRobotApplicationVersionRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("CreateRobotApplicationVersion", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("InternalServerException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","InternalServerException"}, } }; 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 = CreateRobotApplicationVersionResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void CreateRobotApplicationVersion_InvalidParameterExceptionMarshallTest() { var operation = service_model.FindOperation("CreateRobotApplicationVersion"); var request = InstantiateClassGenerator.Execute(); var marshaller = new CreateRobotApplicationVersionRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("CreateRobotApplicationVersion", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("InvalidParameterException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","InvalidParameterException"}, } }; 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 = CreateRobotApplicationVersionResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void CreateRobotApplicationVersion_LimitExceededExceptionMarshallTest() { var operation = service_model.FindOperation("CreateRobotApplicationVersion"); var request = InstantiateClassGenerator.Execute(); var marshaller = new CreateRobotApplicationVersionRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("CreateRobotApplicationVersion", 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 = CreateRobotApplicationVersionResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void CreateRobotApplicationVersion_ThrottlingExceptionMarshallTest() { var operation = service_model.FindOperation("CreateRobotApplicationVersion"); var request = InstantiateClassGenerator.Execute(); var marshaller = new CreateRobotApplicationVersionRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("CreateRobotApplicationVersion", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("ThrottlingException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","ThrottlingException"}, } }; 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 = CreateRobotApplicationVersionResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void CreateSimulationApplicationMarshallTest() { var operation = service_model.FindOperation("CreateSimulationApplication"); var request = InstantiateClassGenerator.Execute(); var marshaller = new CreateSimulationApplicationRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("CreateSimulationApplication", 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 = CreateSimulationApplicationResponseUnmarshaller.Instance; var response = unmarshaller.Unmarshall(context) as CreateSimulationApplicationResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void CreateSimulationApplication_IdempotentParameterMismatchExceptionMarshallTest() { var operation = service_model.FindOperation("CreateSimulationApplication"); var request = InstantiateClassGenerator.Execute(); var marshaller = new CreateSimulationApplicationRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("CreateSimulationApplication", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("IdempotentParameterMismatchException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","IdempotentParameterMismatchException"}, } }; 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 = CreateSimulationApplicationResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void CreateSimulationApplication_InternalServerExceptionMarshallTest() { var operation = service_model.FindOperation("CreateSimulationApplication"); var request = InstantiateClassGenerator.Execute(); var marshaller = new CreateSimulationApplicationRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("CreateSimulationApplication", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("InternalServerException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","InternalServerException"}, } }; 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 = CreateSimulationApplicationResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void CreateSimulationApplication_InvalidParameterExceptionMarshallTest() { var operation = service_model.FindOperation("CreateSimulationApplication"); var request = InstantiateClassGenerator.Execute(); var marshaller = new CreateSimulationApplicationRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("CreateSimulationApplication", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("InvalidParameterException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","InvalidParameterException"}, } }; 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 = CreateSimulationApplicationResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void CreateSimulationApplication_LimitExceededExceptionMarshallTest() { var operation = service_model.FindOperation("CreateSimulationApplication"); var request = InstantiateClassGenerator.Execute(); var marshaller = new CreateSimulationApplicationRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("CreateSimulationApplication", 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 = CreateSimulationApplicationResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void CreateSimulationApplication_ResourceAlreadyExistsExceptionMarshallTest() { var operation = service_model.FindOperation("CreateSimulationApplication"); var request = InstantiateClassGenerator.Execute(); var marshaller = new CreateSimulationApplicationRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("CreateSimulationApplication", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("ResourceAlreadyExistsException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","ResourceAlreadyExistsException"}, } }; 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 = CreateSimulationApplicationResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void CreateSimulationApplication_ThrottlingExceptionMarshallTest() { var operation = service_model.FindOperation("CreateSimulationApplication"); var request = InstantiateClassGenerator.Execute(); var marshaller = new CreateSimulationApplicationRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("CreateSimulationApplication", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("ThrottlingException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","ThrottlingException"}, } }; 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 = CreateSimulationApplicationResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void CreateSimulationApplicationVersionMarshallTest() { var operation = service_model.FindOperation("CreateSimulationApplicationVersion"); var request = InstantiateClassGenerator.Execute(); var marshaller = new CreateSimulationApplicationVersionRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("CreateSimulationApplicationVersion", 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 = CreateSimulationApplicationVersionResponseUnmarshaller.Instance; var response = unmarshaller.Unmarshall(context) as CreateSimulationApplicationVersionResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void CreateSimulationApplicationVersion_IdempotentParameterMismatchExceptionMarshallTest() { var operation = service_model.FindOperation("CreateSimulationApplicationVersion"); var request = InstantiateClassGenerator.Execute(); var marshaller = new CreateSimulationApplicationVersionRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("CreateSimulationApplicationVersion", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("IdempotentParameterMismatchException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","IdempotentParameterMismatchException"}, } }; 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 = CreateSimulationApplicationVersionResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void CreateSimulationApplicationVersion_InternalServerExceptionMarshallTest() { var operation = service_model.FindOperation("CreateSimulationApplicationVersion"); var request = InstantiateClassGenerator.Execute(); var marshaller = new CreateSimulationApplicationVersionRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("CreateSimulationApplicationVersion", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("InternalServerException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","InternalServerException"}, } }; 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 = CreateSimulationApplicationVersionResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void CreateSimulationApplicationVersion_InvalidParameterExceptionMarshallTest() { var operation = service_model.FindOperation("CreateSimulationApplicationVersion"); var request = InstantiateClassGenerator.Execute(); var marshaller = new CreateSimulationApplicationVersionRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("CreateSimulationApplicationVersion", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("InvalidParameterException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","InvalidParameterException"}, } }; 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 = CreateSimulationApplicationVersionResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void CreateSimulationApplicationVersion_LimitExceededExceptionMarshallTest() { var operation = service_model.FindOperation("CreateSimulationApplicationVersion"); var request = InstantiateClassGenerator.Execute(); var marshaller = new CreateSimulationApplicationVersionRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("CreateSimulationApplicationVersion", 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 = CreateSimulationApplicationVersionResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void CreateSimulationApplicationVersion_ThrottlingExceptionMarshallTest() { var operation = service_model.FindOperation("CreateSimulationApplicationVersion"); var request = InstantiateClassGenerator.Execute(); var marshaller = new CreateSimulationApplicationVersionRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("CreateSimulationApplicationVersion", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("ThrottlingException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","ThrottlingException"}, } }; 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 = CreateSimulationApplicationVersionResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void CreateSimulationJobMarshallTest() { var operation = service_model.FindOperation("CreateSimulationJob"); var request = InstantiateClassGenerator.Execute(); var marshaller = new CreateSimulationJobRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("CreateSimulationJob", 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 = CreateSimulationJobResponseUnmarshaller.Instance; var response = unmarshaller.Unmarshall(context) as CreateSimulationJobResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void CreateSimulationJob_IdempotentParameterMismatchExceptionMarshallTest() { var operation = service_model.FindOperation("CreateSimulationJob"); var request = InstantiateClassGenerator.Execute(); var marshaller = new CreateSimulationJobRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("CreateSimulationJob", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("IdempotentParameterMismatchException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","IdempotentParameterMismatchException"}, } }; 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 = CreateSimulationJobResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void CreateSimulationJob_InternalServerExceptionMarshallTest() { var operation = service_model.FindOperation("CreateSimulationJob"); var request = InstantiateClassGenerator.Execute(); var marshaller = new CreateSimulationJobRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("CreateSimulationJob", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("InternalServerException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","InternalServerException"}, } }; 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 = CreateSimulationJobResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void CreateSimulationJob_InvalidParameterExceptionMarshallTest() { var operation = service_model.FindOperation("CreateSimulationJob"); var request = InstantiateClassGenerator.Execute(); var marshaller = new CreateSimulationJobRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("CreateSimulationJob", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("InvalidParameterException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","InvalidParameterException"}, } }; 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 = CreateSimulationJobResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void CreateSimulationJob_LimitExceededExceptionMarshallTest() { var operation = service_model.FindOperation("CreateSimulationJob"); var request = InstantiateClassGenerator.Execute(); var marshaller = new CreateSimulationJobRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("CreateSimulationJob", 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 = CreateSimulationJobResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void CreateSimulationJob_ResourceNotFoundExceptionMarshallTest() { var operation = service_model.FindOperation("CreateSimulationJob"); var request = InstantiateClassGenerator.Execute(); var marshaller = new CreateSimulationJobRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("CreateSimulationJob", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("ResourceNotFoundException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","ResourceNotFoundException"}, } }; 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 = CreateSimulationJobResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void CreateSimulationJob_ServiceUnavailableExceptionMarshallTest() { var operation = service_model.FindOperation("CreateSimulationJob"); var request = InstantiateClassGenerator.Execute(); var marshaller = new CreateSimulationJobRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("CreateSimulationJob", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("ServiceUnavailableException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","ServiceUnavailableException"}, } }; 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 = CreateSimulationJobResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void CreateSimulationJob_ThrottlingExceptionMarshallTest() { var operation = service_model.FindOperation("CreateSimulationJob"); var request = InstantiateClassGenerator.Execute(); var marshaller = new CreateSimulationJobRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("CreateSimulationJob", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("ThrottlingException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","ThrottlingException"}, } }; 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 = CreateSimulationJobResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void CreateWorldExportJobMarshallTest() { var operation = service_model.FindOperation("CreateWorldExportJob"); var request = InstantiateClassGenerator.Execute(); var marshaller = new CreateWorldExportJobRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("CreateWorldExportJob", 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 = CreateWorldExportJobResponseUnmarshaller.Instance; var response = unmarshaller.Unmarshall(context) as CreateWorldExportJobResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void CreateWorldExportJob_IdempotentParameterMismatchExceptionMarshallTest() { var operation = service_model.FindOperation("CreateWorldExportJob"); var request = InstantiateClassGenerator.Execute(); var marshaller = new CreateWorldExportJobRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("CreateWorldExportJob", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("IdempotentParameterMismatchException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","IdempotentParameterMismatchException"}, } }; 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 = CreateWorldExportJobResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void CreateWorldExportJob_InternalServerExceptionMarshallTest() { var operation = service_model.FindOperation("CreateWorldExportJob"); var request = InstantiateClassGenerator.Execute(); var marshaller = new CreateWorldExportJobRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("CreateWorldExportJob", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("InternalServerException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","InternalServerException"}, } }; 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 = CreateWorldExportJobResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void CreateWorldExportJob_InvalidParameterExceptionMarshallTest() { var operation = service_model.FindOperation("CreateWorldExportJob"); var request = InstantiateClassGenerator.Execute(); var marshaller = new CreateWorldExportJobRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("CreateWorldExportJob", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("InvalidParameterException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","InvalidParameterException"}, } }; 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 = CreateWorldExportJobResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void CreateWorldExportJob_ResourceNotFoundExceptionMarshallTest() { var operation = service_model.FindOperation("CreateWorldExportJob"); var request = InstantiateClassGenerator.Execute(); var marshaller = new CreateWorldExportJobRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("CreateWorldExportJob", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("ResourceNotFoundException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","ResourceNotFoundException"}, } }; 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 = CreateWorldExportJobResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void CreateWorldExportJob_ServiceUnavailableExceptionMarshallTest() { var operation = service_model.FindOperation("CreateWorldExportJob"); var request = InstantiateClassGenerator.Execute(); var marshaller = new CreateWorldExportJobRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("CreateWorldExportJob", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("ServiceUnavailableException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","ServiceUnavailableException"}, } }; 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 = CreateWorldExportJobResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void CreateWorldExportJob_ThrottlingExceptionMarshallTest() { var operation = service_model.FindOperation("CreateWorldExportJob"); var request = InstantiateClassGenerator.Execute(); var marshaller = new CreateWorldExportJobRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("CreateWorldExportJob", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("ThrottlingException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","ThrottlingException"}, } }; 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 = CreateWorldExportJobResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void CreateWorldGenerationJobMarshallTest() { var operation = service_model.FindOperation("CreateWorldGenerationJob"); var request = InstantiateClassGenerator.Execute(); var marshaller = new CreateWorldGenerationJobRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("CreateWorldGenerationJob", 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 = CreateWorldGenerationJobResponseUnmarshaller.Instance; var response = unmarshaller.Unmarshall(context) as CreateWorldGenerationJobResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void CreateWorldGenerationJob_IdempotentParameterMismatchExceptionMarshallTest() { var operation = service_model.FindOperation("CreateWorldGenerationJob"); var request = InstantiateClassGenerator.Execute(); var marshaller = new CreateWorldGenerationJobRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("CreateWorldGenerationJob", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("IdempotentParameterMismatchException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","IdempotentParameterMismatchException"}, } }; 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 = CreateWorldGenerationJobResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void CreateWorldGenerationJob_InternalServerExceptionMarshallTest() { var operation = service_model.FindOperation("CreateWorldGenerationJob"); var request = InstantiateClassGenerator.Execute(); var marshaller = new CreateWorldGenerationJobRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("CreateWorldGenerationJob", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("InternalServerException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","InternalServerException"}, } }; 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 = CreateWorldGenerationJobResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void CreateWorldGenerationJob_InvalidParameterExceptionMarshallTest() { var operation = service_model.FindOperation("CreateWorldGenerationJob"); var request = InstantiateClassGenerator.Execute(); var marshaller = new CreateWorldGenerationJobRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("CreateWorldGenerationJob", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("InvalidParameterException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","InvalidParameterException"}, } }; 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 = CreateWorldGenerationJobResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void CreateWorldGenerationJob_LimitExceededExceptionMarshallTest() { var operation = service_model.FindOperation("CreateWorldGenerationJob"); var request = InstantiateClassGenerator.Execute(); var marshaller = new CreateWorldGenerationJobRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("CreateWorldGenerationJob", 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 = CreateWorldGenerationJobResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void CreateWorldGenerationJob_ResourceNotFoundExceptionMarshallTest() { var operation = service_model.FindOperation("CreateWorldGenerationJob"); var request = InstantiateClassGenerator.Execute(); var marshaller = new CreateWorldGenerationJobRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("CreateWorldGenerationJob", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("ResourceNotFoundException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","ResourceNotFoundException"}, } }; 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 = CreateWorldGenerationJobResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void CreateWorldGenerationJob_ServiceUnavailableExceptionMarshallTest() { var operation = service_model.FindOperation("CreateWorldGenerationJob"); var request = InstantiateClassGenerator.Execute(); var marshaller = new CreateWorldGenerationJobRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("CreateWorldGenerationJob", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("ServiceUnavailableException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","ServiceUnavailableException"}, } }; 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 = CreateWorldGenerationJobResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void CreateWorldGenerationJob_ThrottlingExceptionMarshallTest() { var operation = service_model.FindOperation("CreateWorldGenerationJob"); var request = InstantiateClassGenerator.Execute(); var marshaller = new CreateWorldGenerationJobRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("CreateWorldGenerationJob", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("ThrottlingException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","ThrottlingException"}, } }; 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 = CreateWorldGenerationJobResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void CreateWorldTemplateMarshallTest() { var operation = service_model.FindOperation("CreateWorldTemplate"); var request = InstantiateClassGenerator.Execute(); var marshaller = new CreateWorldTemplateRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("CreateWorldTemplate", 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 = CreateWorldTemplateResponseUnmarshaller.Instance; var response = unmarshaller.Unmarshall(context) as CreateWorldTemplateResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void CreateWorldTemplate_InternalServerExceptionMarshallTest() { var operation = service_model.FindOperation("CreateWorldTemplate"); var request = InstantiateClassGenerator.Execute(); var marshaller = new CreateWorldTemplateRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("CreateWorldTemplate", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("InternalServerException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","InternalServerException"}, } }; 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 = CreateWorldTemplateResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void CreateWorldTemplate_InvalidParameterExceptionMarshallTest() { var operation = service_model.FindOperation("CreateWorldTemplate"); var request = InstantiateClassGenerator.Execute(); var marshaller = new CreateWorldTemplateRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("CreateWorldTemplate", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("InvalidParameterException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","InvalidParameterException"}, } }; 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 = CreateWorldTemplateResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void CreateWorldTemplate_LimitExceededExceptionMarshallTest() { var operation = service_model.FindOperation("CreateWorldTemplate"); var request = InstantiateClassGenerator.Execute(); var marshaller = new CreateWorldTemplateRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("CreateWorldTemplate", 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 = CreateWorldTemplateResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void CreateWorldTemplate_ResourceAlreadyExistsExceptionMarshallTest() { var operation = service_model.FindOperation("CreateWorldTemplate"); var request = InstantiateClassGenerator.Execute(); var marshaller = new CreateWorldTemplateRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("CreateWorldTemplate", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("ResourceAlreadyExistsException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","ResourceAlreadyExistsException"}, } }; 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 = CreateWorldTemplateResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void CreateWorldTemplate_ResourceNotFoundExceptionMarshallTest() { var operation = service_model.FindOperation("CreateWorldTemplate"); var request = InstantiateClassGenerator.Execute(); var marshaller = new CreateWorldTemplateRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("CreateWorldTemplate", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("ResourceNotFoundException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","ResourceNotFoundException"}, } }; 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 = CreateWorldTemplateResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void CreateWorldTemplate_ThrottlingExceptionMarshallTest() { var operation = service_model.FindOperation("CreateWorldTemplate"); var request = InstantiateClassGenerator.Execute(); var marshaller = new CreateWorldTemplateRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("CreateWorldTemplate", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("ThrottlingException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","ThrottlingException"}, } }; 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 = CreateWorldTemplateResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void DeleteFleetMarshallTest() { var operation = service_model.FindOperation("DeleteFleet"); var request = InstantiateClassGenerator.Execute(); var marshaller = new DeleteFleetRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("DeleteFleet", 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 = DeleteFleetResponseUnmarshaller.Instance; var response = unmarshaller.Unmarshall(context) as DeleteFleetResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void DeleteFleet_InternalServerExceptionMarshallTest() { var operation = service_model.FindOperation("DeleteFleet"); var request = InstantiateClassGenerator.Execute(); var marshaller = new DeleteFleetRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("DeleteFleet", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("InternalServerException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","InternalServerException"}, } }; 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 = DeleteFleetResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void DeleteFleet_InvalidParameterExceptionMarshallTest() { var operation = service_model.FindOperation("DeleteFleet"); var request = InstantiateClassGenerator.Execute(); var marshaller = new DeleteFleetRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("DeleteFleet", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("InvalidParameterException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","InvalidParameterException"}, } }; 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 = DeleteFleetResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void DeleteFleet_ThrottlingExceptionMarshallTest() { var operation = service_model.FindOperation("DeleteFleet"); var request = InstantiateClassGenerator.Execute(); var marshaller = new DeleteFleetRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("DeleteFleet", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("ThrottlingException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","ThrottlingException"}, } }; 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 = DeleteFleetResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void DeleteRobotMarshallTest() { var operation = service_model.FindOperation("DeleteRobot"); var request = InstantiateClassGenerator.Execute(); var marshaller = new DeleteRobotRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("DeleteRobot", 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 = DeleteRobotResponseUnmarshaller.Instance; var response = unmarshaller.Unmarshall(context) as DeleteRobotResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void DeleteRobot_InternalServerExceptionMarshallTest() { var operation = service_model.FindOperation("DeleteRobot"); var request = InstantiateClassGenerator.Execute(); var marshaller = new DeleteRobotRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("DeleteRobot", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("InternalServerException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","InternalServerException"}, } }; 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 = DeleteRobotResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void DeleteRobot_InvalidParameterExceptionMarshallTest() { var operation = service_model.FindOperation("DeleteRobot"); var request = InstantiateClassGenerator.Execute(); var marshaller = new DeleteRobotRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("DeleteRobot", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("InvalidParameterException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","InvalidParameterException"}, } }; 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 = DeleteRobotResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void DeleteRobot_ThrottlingExceptionMarshallTest() { var operation = service_model.FindOperation("DeleteRobot"); var request = InstantiateClassGenerator.Execute(); var marshaller = new DeleteRobotRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("DeleteRobot", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("ThrottlingException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","ThrottlingException"}, } }; 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 = DeleteRobotResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void DeleteRobotApplicationMarshallTest() { var operation = service_model.FindOperation("DeleteRobotApplication"); var request = InstantiateClassGenerator.Execute(); var marshaller = new DeleteRobotApplicationRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("DeleteRobotApplication", 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 = DeleteRobotApplicationResponseUnmarshaller.Instance; var response = unmarshaller.Unmarshall(context) as DeleteRobotApplicationResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void DeleteRobotApplication_InternalServerExceptionMarshallTest() { var operation = service_model.FindOperation("DeleteRobotApplication"); var request = InstantiateClassGenerator.Execute(); var marshaller = new DeleteRobotApplicationRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("DeleteRobotApplication", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("InternalServerException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","InternalServerException"}, } }; 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 = DeleteRobotApplicationResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void DeleteRobotApplication_InvalidParameterExceptionMarshallTest() { var operation = service_model.FindOperation("DeleteRobotApplication"); var request = InstantiateClassGenerator.Execute(); var marshaller = new DeleteRobotApplicationRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("DeleteRobotApplication", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("InvalidParameterException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","InvalidParameterException"}, } }; 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 = DeleteRobotApplicationResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void DeleteRobotApplication_ThrottlingExceptionMarshallTest() { var operation = service_model.FindOperation("DeleteRobotApplication"); var request = InstantiateClassGenerator.Execute(); var marshaller = new DeleteRobotApplicationRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("DeleteRobotApplication", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("ThrottlingException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","ThrottlingException"}, } }; 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 = DeleteRobotApplicationResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void DeleteSimulationApplicationMarshallTest() { var operation = service_model.FindOperation("DeleteSimulationApplication"); var request = InstantiateClassGenerator.Execute(); var marshaller = new DeleteSimulationApplicationRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("DeleteSimulationApplication", 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 = DeleteSimulationApplicationResponseUnmarshaller.Instance; var response = unmarshaller.Unmarshall(context) as DeleteSimulationApplicationResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void DeleteSimulationApplication_InternalServerExceptionMarshallTest() { var operation = service_model.FindOperation("DeleteSimulationApplication"); var request = InstantiateClassGenerator.Execute(); var marshaller = new DeleteSimulationApplicationRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("DeleteSimulationApplication", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("InternalServerException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","InternalServerException"}, } }; 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 = DeleteSimulationApplicationResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void DeleteSimulationApplication_InvalidParameterExceptionMarshallTest() { var operation = service_model.FindOperation("DeleteSimulationApplication"); var request = InstantiateClassGenerator.Execute(); var marshaller = new DeleteSimulationApplicationRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("DeleteSimulationApplication", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("InvalidParameterException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","InvalidParameterException"}, } }; 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 = DeleteSimulationApplicationResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void DeleteSimulationApplication_ThrottlingExceptionMarshallTest() { var operation = service_model.FindOperation("DeleteSimulationApplication"); var request = InstantiateClassGenerator.Execute(); var marshaller = new DeleteSimulationApplicationRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("DeleteSimulationApplication", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("ThrottlingException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","ThrottlingException"}, } }; 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 = DeleteSimulationApplicationResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void DeleteWorldTemplateMarshallTest() { var operation = service_model.FindOperation("DeleteWorldTemplate"); var request = InstantiateClassGenerator.Execute(); var marshaller = new DeleteWorldTemplateRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("DeleteWorldTemplate", 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 = DeleteWorldTemplateResponseUnmarshaller.Instance; var response = unmarshaller.Unmarshall(context) as DeleteWorldTemplateResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void DeleteWorldTemplate_InternalServerExceptionMarshallTest() { var operation = service_model.FindOperation("DeleteWorldTemplate"); var request = InstantiateClassGenerator.Execute(); var marshaller = new DeleteWorldTemplateRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("DeleteWorldTemplate", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("InternalServerException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","InternalServerException"}, } }; 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 = DeleteWorldTemplateResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void DeleteWorldTemplate_InvalidParameterExceptionMarshallTest() { var operation = service_model.FindOperation("DeleteWorldTemplate"); var request = InstantiateClassGenerator.Execute(); var marshaller = new DeleteWorldTemplateRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("DeleteWorldTemplate", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("InvalidParameterException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","InvalidParameterException"}, } }; 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 = DeleteWorldTemplateResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void DeleteWorldTemplate_ResourceNotFoundExceptionMarshallTest() { var operation = service_model.FindOperation("DeleteWorldTemplate"); var request = InstantiateClassGenerator.Execute(); var marshaller = new DeleteWorldTemplateRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("DeleteWorldTemplate", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("ResourceNotFoundException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","ResourceNotFoundException"}, } }; 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 = DeleteWorldTemplateResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void DeleteWorldTemplate_ThrottlingExceptionMarshallTest() { var operation = service_model.FindOperation("DeleteWorldTemplate"); var request = InstantiateClassGenerator.Execute(); var marshaller = new DeleteWorldTemplateRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("DeleteWorldTemplate", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("ThrottlingException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","ThrottlingException"}, } }; 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 = DeleteWorldTemplateResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void DeregisterRobotMarshallTest() { var operation = service_model.FindOperation("DeregisterRobot"); var request = InstantiateClassGenerator.Execute(); var marshaller = new DeregisterRobotRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("DeregisterRobot", 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 = DeregisterRobotResponseUnmarshaller.Instance; var response = unmarshaller.Unmarshall(context) as DeregisterRobotResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void DeregisterRobot_InternalServerExceptionMarshallTest() { var operation = service_model.FindOperation("DeregisterRobot"); var request = InstantiateClassGenerator.Execute(); var marshaller = new DeregisterRobotRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("DeregisterRobot", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("InternalServerException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","InternalServerException"}, } }; 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 = DeregisterRobotResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void DeregisterRobot_InvalidParameterExceptionMarshallTest() { var operation = service_model.FindOperation("DeregisterRobot"); var request = InstantiateClassGenerator.Execute(); var marshaller = new DeregisterRobotRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("DeregisterRobot", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("InvalidParameterException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","InvalidParameterException"}, } }; 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 = DeregisterRobotResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void DeregisterRobot_ResourceNotFoundExceptionMarshallTest() { var operation = service_model.FindOperation("DeregisterRobot"); var request = InstantiateClassGenerator.Execute(); var marshaller = new DeregisterRobotRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("DeregisterRobot", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("ResourceNotFoundException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","ResourceNotFoundException"}, } }; 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 = DeregisterRobotResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void DeregisterRobot_ThrottlingExceptionMarshallTest() { var operation = service_model.FindOperation("DeregisterRobot"); var request = InstantiateClassGenerator.Execute(); var marshaller = new DeregisterRobotRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("DeregisterRobot", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("ThrottlingException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","ThrottlingException"}, } }; 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 = DeregisterRobotResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void DescribeDeploymentJobMarshallTest() { var operation = service_model.FindOperation("DescribeDeploymentJob"); var request = InstantiateClassGenerator.Execute(); var marshaller = new DescribeDeploymentJobRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("DescribeDeploymentJob", 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 = DescribeDeploymentJobResponseUnmarshaller.Instance; var response = unmarshaller.Unmarshall(context) as DescribeDeploymentJobResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void DescribeDeploymentJob_InternalServerExceptionMarshallTest() { var operation = service_model.FindOperation("DescribeDeploymentJob"); var request = InstantiateClassGenerator.Execute(); var marshaller = new DescribeDeploymentJobRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("DescribeDeploymentJob", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("InternalServerException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","InternalServerException"}, } }; 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 = DescribeDeploymentJobResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void DescribeDeploymentJob_InvalidParameterExceptionMarshallTest() { var operation = service_model.FindOperation("DescribeDeploymentJob"); var request = InstantiateClassGenerator.Execute(); var marshaller = new DescribeDeploymentJobRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("DescribeDeploymentJob", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("InvalidParameterException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","InvalidParameterException"}, } }; 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 = DescribeDeploymentJobResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void DescribeDeploymentJob_ResourceNotFoundExceptionMarshallTest() { var operation = service_model.FindOperation("DescribeDeploymentJob"); var request = InstantiateClassGenerator.Execute(); var marshaller = new DescribeDeploymentJobRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("DescribeDeploymentJob", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("ResourceNotFoundException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","ResourceNotFoundException"}, } }; 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 = DescribeDeploymentJobResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void DescribeDeploymentJob_ThrottlingExceptionMarshallTest() { var operation = service_model.FindOperation("DescribeDeploymentJob"); var request = InstantiateClassGenerator.Execute(); var marshaller = new DescribeDeploymentJobRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("DescribeDeploymentJob", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("ThrottlingException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","ThrottlingException"}, } }; 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 = DescribeDeploymentJobResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void DescribeFleetMarshallTest() { var operation = service_model.FindOperation("DescribeFleet"); var request = InstantiateClassGenerator.Execute(); var marshaller = new DescribeFleetRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("DescribeFleet", 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 = DescribeFleetResponseUnmarshaller.Instance; var response = unmarshaller.Unmarshall(context) as DescribeFleetResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void DescribeFleet_InternalServerExceptionMarshallTest() { var operation = service_model.FindOperation("DescribeFleet"); var request = InstantiateClassGenerator.Execute(); var marshaller = new DescribeFleetRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("DescribeFleet", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("InternalServerException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","InternalServerException"}, } }; 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 = DescribeFleetResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void DescribeFleet_InvalidParameterExceptionMarshallTest() { var operation = service_model.FindOperation("DescribeFleet"); var request = InstantiateClassGenerator.Execute(); var marshaller = new DescribeFleetRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("DescribeFleet", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("InvalidParameterException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","InvalidParameterException"}, } }; 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 = DescribeFleetResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void DescribeFleet_ResourceNotFoundExceptionMarshallTest() { var operation = service_model.FindOperation("DescribeFleet"); var request = InstantiateClassGenerator.Execute(); var marshaller = new DescribeFleetRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("DescribeFleet", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("ResourceNotFoundException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","ResourceNotFoundException"}, } }; 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 = DescribeFleetResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void DescribeFleet_ThrottlingExceptionMarshallTest() { var operation = service_model.FindOperation("DescribeFleet"); var request = InstantiateClassGenerator.Execute(); var marshaller = new DescribeFleetRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("DescribeFleet", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("ThrottlingException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","ThrottlingException"}, } }; 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 = DescribeFleetResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void DescribeRobotMarshallTest() { var operation = service_model.FindOperation("DescribeRobot"); var request = InstantiateClassGenerator.Execute(); var marshaller = new DescribeRobotRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("DescribeRobot", 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 = DescribeRobotResponseUnmarshaller.Instance; var response = unmarshaller.Unmarshall(context) as DescribeRobotResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void DescribeRobot_InternalServerExceptionMarshallTest() { var operation = service_model.FindOperation("DescribeRobot"); var request = InstantiateClassGenerator.Execute(); var marshaller = new DescribeRobotRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("DescribeRobot", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("InternalServerException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","InternalServerException"}, } }; 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 = DescribeRobotResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void DescribeRobot_InvalidParameterExceptionMarshallTest() { var operation = service_model.FindOperation("DescribeRobot"); var request = InstantiateClassGenerator.Execute(); var marshaller = new DescribeRobotRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("DescribeRobot", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("InvalidParameterException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","InvalidParameterException"}, } }; 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 = DescribeRobotResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void DescribeRobot_ResourceNotFoundExceptionMarshallTest() { var operation = service_model.FindOperation("DescribeRobot"); var request = InstantiateClassGenerator.Execute(); var marshaller = new DescribeRobotRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("DescribeRobot", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("ResourceNotFoundException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","ResourceNotFoundException"}, } }; 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 = DescribeRobotResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void DescribeRobot_ThrottlingExceptionMarshallTest() { var operation = service_model.FindOperation("DescribeRobot"); var request = InstantiateClassGenerator.Execute(); var marshaller = new DescribeRobotRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("DescribeRobot", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("ThrottlingException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","ThrottlingException"}, } }; 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 = DescribeRobotResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void DescribeRobotApplicationMarshallTest() { var operation = service_model.FindOperation("DescribeRobotApplication"); var request = InstantiateClassGenerator.Execute(); var marshaller = new DescribeRobotApplicationRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("DescribeRobotApplication", 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 = DescribeRobotApplicationResponseUnmarshaller.Instance; var response = unmarshaller.Unmarshall(context) as DescribeRobotApplicationResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void DescribeRobotApplication_InternalServerExceptionMarshallTest() { var operation = service_model.FindOperation("DescribeRobotApplication"); var request = InstantiateClassGenerator.Execute(); var marshaller = new DescribeRobotApplicationRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("DescribeRobotApplication", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("InternalServerException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","InternalServerException"}, } }; 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 = DescribeRobotApplicationResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void DescribeRobotApplication_InvalidParameterExceptionMarshallTest() { var operation = service_model.FindOperation("DescribeRobotApplication"); var request = InstantiateClassGenerator.Execute(); var marshaller = new DescribeRobotApplicationRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("DescribeRobotApplication", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("InvalidParameterException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","InvalidParameterException"}, } }; 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 = DescribeRobotApplicationResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void DescribeRobotApplication_ResourceNotFoundExceptionMarshallTest() { var operation = service_model.FindOperation("DescribeRobotApplication"); var request = InstantiateClassGenerator.Execute(); var marshaller = new DescribeRobotApplicationRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("DescribeRobotApplication", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("ResourceNotFoundException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","ResourceNotFoundException"}, } }; 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 = DescribeRobotApplicationResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void DescribeRobotApplication_ThrottlingExceptionMarshallTest() { var operation = service_model.FindOperation("DescribeRobotApplication"); var request = InstantiateClassGenerator.Execute(); var marshaller = new DescribeRobotApplicationRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("DescribeRobotApplication", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("ThrottlingException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","ThrottlingException"}, } }; 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 = DescribeRobotApplicationResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void DescribeSimulationApplicationMarshallTest() { var operation = service_model.FindOperation("DescribeSimulationApplication"); var request = InstantiateClassGenerator.Execute(); var marshaller = new DescribeSimulationApplicationRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("DescribeSimulationApplication", 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 = DescribeSimulationApplicationResponseUnmarshaller.Instance; var response = unmarshaller.Unmarshall(context) as DescribeSimulationApplicationResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void DescribeSimulationApplication_InternalServerExceptionMarshallTest() { var operation = service_model.FindOperation("DescribeSimulationApplication"); var request = InstantiateClassGenerator.Execute(); var marshaller = new DescribeSimulationApplicationRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("DescribeSimulationApplication", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("InternalServerException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","InternalServerException"}, } }; 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 = DescribeSimulationApplicationResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void DescribeSimulationApplication_InvalidParameterExceptionMarshallTest() { var operation = service_model.FindOperation("DescribeSimulationApplication"); var request = InstantiateClassGenerator.Execute(); var marshaller = new DescribeSimulationApplicationRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("DescribeSimulationApplication", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("InvalidParameterException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","InvalidParameterException"}, } }; 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 = DescribeSimulationApplicationResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void DescribeSimulationApplication_ResourceNotFoundExceptionMarshallTest() { var operation = service_model.FindOperation("DescribeSimulationApplication"); var request = InstantiateClassGenerator.Execute(); var marshaller = new DescribeSimulationApplicationRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("DescribeSimulationApplication", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("ResourceNotFoundException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","ResourceNotFoundException"}, } }; 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 = DescribeSimulationApplicationResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void DescribeSimulationApplication_ThrottlingExceptionMarshallTest() { var operation = service_model.FindOperation("DescribeSimulationApplication"); var request = InstantiateClassGenerator.Execute(); var marshaller = new DescribeSimulationApplicationRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("DescribeSimulationApplication", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("ThrottlingException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","ThrottlingException"}, } }; 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 = DescribeSimulationApplicationResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void DescribeSimulationJobMarshallTest() { var operation = service_model.FindOperation("DescribeSimulationJob"); var request = InstantiateClassGenerator.Execute(); var marshaller = new DescribeSimulationJobRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("DescribeSimulationJob", 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 = DescribeSimulationJobResponseUnmarshaller.Instance; var response = unmarshaller.Unmarshall(context) as DescribeSimulationJobResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void DescribeSimulationJob_InternalServerExceptionMarshallTest() { var operation = service_model.FindOperation("DescribeSimulationJob"); var request = InstantiateClassGenerator.Execute(); var marshaller = new DescribeSimulationJobRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("DescribeSimulationJob", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("InternalServerException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","InternalServerException"}, } }; 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 = DescribeSimulationJobResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void DescribeSimulationJob_InvalidParameterExceptionMarshallTest() { var operation = service_model.FindOperation("DescribeSimulationJob"); var request = InstantiateClassGenerator.Execute(); var marshaller = new DescribeSimulationJobRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("DescribeSimulationJob", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("InvalidParameterException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","InvalidParameterException"}, } }; 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 = DescribeSimulationJobResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void DescribeSimulationJob_ResourceNotFoundExceptionMarshallTest() { var operation = service_model.FindOperation("DescribeSimulationJob"); var request = InstantiateClassGenerator.Execute(); var marshaller = new DescribeSimulationJobRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("DescribeSimulationJob", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("ResourceNotFoundException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","ResourceNotFoundException"}, } }; 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 = DescribeSimulationJobResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void DescribeSimulationJob_ThrottlingExceptionMarshallTest() { var operation = service_model.FindOperation("DescribeSimulationJob"); var request = InstantiateClassGenerator.Execute(); var marshaller = new DescribeSimulationJobRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("DescribeSimulationJob", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("ThrottlingException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","ThrottlingException"}, } }; 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 = DescribeSimulationJobResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void DescribeSimulationJobBatchMarshallTest() { var operation = service_model.FindOperation("DescribeSimulationJobBatch"); var request = InstantiateClassGenerator.Execute(); var marshaller = new DescribeSimulationJobBatchRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("DescribeSimulationJobBatch", 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 = DescribeSimulationJobBatchResponseUnmarshaller.Instance; var response = unmarshaller.Unmarshall(context) as DescribeSimulationJobBatchResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void DescribeSimulationJobBatch_InternalServerExceptionMarshallTest() { var operation = service_model.FindOperation("DescribeSimulationJobBatch"); var request = InstantiateClassGenerator.Execute(); var marshaller = new DescribeSimulationJobBatchRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("DescribeSimulationJobBatch", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("InternalServerException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","InternalServerException"}, } }; 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 = DescribeSimulationJobBatchResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void DescribeSimulationJobBatch_InvalidParameterExceptionMarshallTest() { var operation = service_model.FindOperation("DescribeSimulationJobBatch"); var request = InstantiateClassGenerator.Execute(); var marshaller = new DescribeSimulationJobBatchRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("DescribeSimulationJobBatch", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("InvalidParameterException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","InvalidParameterException"}, } }; 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 = DescribeSimulationJobBatchResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void DescribeSimulationJobBatch_ResourceNotFoundExceptionMarshallTest() { var operation = service_model.FindOperation("DescribeSimulationJobBatch"); var request = InstantiateClassGenerator.Execute(); var marshaller = new DescribeSimulationJobBatchRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("DescribeSimulationJobBatch", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("ResourceNotFoundException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","ResourceNotFoundException"}, } }; 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 = DescribeSimulationJobBatchResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void DescribeWorldMarshallTest() { var operation = service_model.FindOperation("DescribeWorld"); var request = InstantiateClassGenerator.Execute(); var marshaller = new DescribeWorldRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("DescribeWorld", 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 = DescribeWorldResponseUnmarshaller.Instance; var response = unmarshaller.Unmarshall(context) as DescribeWorldResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void DescribeWorld_InternalServerExceptionMarshallTest() { var operation = service_model.FindOperation("DescribeWorld"); var request = InstantiateClassGenerator.Execute(); var marshaller = new DescribeWorldRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("DescribeWorld", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("InternalServerException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","InternalServerException"}, } }; 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 = DescribeWorldResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void DescribeWorld_InvalidParameterExceptionMarshallTest() { var operation = service_model.FindOperation("DescribeWorld"); var request = InstantiateClassGenerator.Execute(); var marshaller = new DescribeWorldRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("DescribeWorld", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("InvalidParameterException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","InvalidParameterException"}, } }; 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 = DescribeWorldResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void DescribeWorld_ResourceNotFoundExceptionMarshallTest() { var operation = service_model.FindOperation("DescribeWorld"); var request = InstantiateClassGenerator.Execute(); var marshaller = new DescribeWorldRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("DescribeWorld", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("ResourceNotFoundException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","ResourceNotFoundException"}, } }; 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 = DescribeWorldResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void DescribeWorld_ThrottlingExceptionMarshallTest() { var operation = service_model.FindOperation("DescribeWorld"); var request = InstantiateClassGenerator.Execute(); var marshaller = new DescribeWorldRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("DescribeWorld", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("ThrottlingException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","ThrottlingException"}, } }; 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 = DescribeWorldResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void DescribeWorldExportJobMarshallTest() { var operation = service_model.FindOperation("DescribeWorldExportJob"); var request = InstantiateClassGenerator.Execute(); var marshaller = new DescribeWorldExportJobRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("DescribeWorldExportJob", 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 = DescribeWorldExportJobResponseUnmarshaller.Instance; var response = unmarshaller.Unmarshall(context) as DescribeWorldExportJobResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void DescribeWorldExportJob_InternalServerExceptionMarshallTest() { var operation = service_model.FindOperation("DescribeWorldExportJob"); var request = InstantiateClassGenerator.Execute(); var marshaller = new DescribeWorldExportJobRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("DescribeWorldExportJob", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("InternalServerException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","InternalServerException"}, } }; 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 = DescribeWorldExportJobResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void DescribeWorldExportJob_InvalidParameterExceptionMarshallTest() { var operation = service_model.FindOperation("DescribeWorldExportJob"); var request = InstantiateClassGenerator.Execute(); var marshaller = new DescribeWorldExportJobRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("DescribeWorldExportJob", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("InvalidParameterException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","InvalidParameterException"}, } }; 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 = DescribeWorldExportJobResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void DescribeWorldExportJob_ResourceNotFoundExceptionMarshallTest() { var operation = service_model.FindOperation("DescribeWorldExportJob"); var request = InstantiateClassGenerator.Execute(); var marshaller = new DescribeWorldExportJobRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("DescribeWorldExportJob", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("ResourceNotFoundException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","ResourceNotFoundException"}, } }; 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 = DescribeWorldExportJobResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void DescribeWorldExportJob_ThrottlingExceptionMarshallTest() { var operation = service_model.FindOperation("DescribeWorldExportJob"); var request = InstantiateClassGenerator.Execute(); var marshaller = new DescribeWorldExportJobRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("DescribeWorldExportJob", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("ThrottlingException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","ThrottlingException"}, } }; 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 = DescribeWorldExportJobResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void DescribeWorldGenerationJobMarshallTest() { var operation = service_model.FindOperation("DescribeWorldGenerationJob"); var request = InstantiateClassGenerator.Execute(); var marshaller = new DescribeWorldGenerationJobRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("DescribeWorldGenerationJob", 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 = DescribeWorldGenerationJobResponseUnmarshaller.Instance; var response = unmarshaller.Unmarshall(context) as DescribeWorldGenerationJobResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void DescribeWorldGenerationJob_InternalServerExceptionMarshallTest() { var operation = service_model.FindOperation("DescribeWorldGenerationJob"); var request = InstantiateClassGenerator.Execute(); var marshaller = new DescribeWorldGenerationJobRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("DescribeWorldGenerationJob", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("InternalServerException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","InternalServerException"}, } }; 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 = DescribeWorldGenerationJobResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void DescribeWorldGenerationJob_InvalidParameterExceptionMarshallTest() { var operation = service_model.FindOperation("DescribeWorldGenerationJob"); var request = InstantiateClassGenerator.Execute(); var marshaller = new DescribeWorldGenerationJobRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("DescribeWorldGenerationJob", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("InvalidParameterException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","InvalidParameterException"}, } }; 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 = DescribeWorldGenerationJobResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void DescribeWorldGenerationJob_ResourceNotFoundExceptionMarshallTest() { var operation = service_model.FindOperation("DescribeWorldGenerationJob"); var request = InstantiateClassGenerator.Execute(); var marshaller = new DescribeWorldGenerationJobRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("DescribeWorldGenerationJob", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("ResourceNotFoundException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","ResourceNotFoundException"}, } }; 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 = DescribeWorldGenerationJobResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void DescribeWorldGenerationJob_ThrottlingExceptionMarshallTest() { var operation = service_model.FindOperation("DescribeWorldGenerationJob"); var request = InstantiateClassGenerator.Execute(); var marshaller = new DescribeWorldGenerationJobRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("DescribeWorldGenerationJob", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("ThrottlingException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","ThrottlingException"}, } }; 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 = DescribeWorldGenerationJobResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void DescribeWorldTemplateMarshallTest() { var operation = service_model.FindOperation("DescribeWorldTemplate"); var request = InstantiateClassGenerator.Execute(); var marshaller = new DescribeWorldTemplateRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("DescribeWorldTemplate", 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 = DescribeWorldTemplateResponseUnmarshaller.Instance; var response = unmarshaller.Unmarshall(context) as DescribeWorldTemplateResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void DescribeWorldTemplate_InternalServerExceptionMarshallTest() { var operation = service_model.FindOperation("DescribeWorldTemplate"); var request = InstantiateClassGenerator.Execute(); var marshaller = new DescribeWorldTemplateRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("DescribeWorldTemplate", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("InternalServerException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","InternalServerException"}, } }; 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 = DescribeWorldTemplateResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void DescribeWorldTemplate_InvalidParameterExceptionMarshallTest() { var operation = service_model.FindOperation("DescribeWorldTemplate"); var request = InstantiateClassGenerator.Execute(); var marshaller = new DescribeWorldTemplateRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("DescribeWorldTemplate", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("InvalidParameterException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","InvalidParameterException"}, } }; 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 = DescribeWorldTemplateResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void DescribeWorldTemplate_ResourceNotFoundExceptionMarshallTest() { var operation = service_model.FindOperation("DescribeWorldTemplate"); var request = InstantiateClassGenerator.Execute(); var marshaller = new DescribeWorldTemplateRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("DescribeWorldTemplate", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("ResourceNotFoundException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","ResourceNotFoundException"}, } }; 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 = DescribeWorldTemplateResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void DescribeWorldTemplate_ThrottlingExceptionMarshallTest() { var operation = service_model.FindOperation("DescribeWorldTemplate"); var request = InstantiateClassGenerator.Execute(); var marshaller = new DescribeWorldTemplateRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("DescribeWorldTemplate", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("ThrottlingException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","ThrottlingException"}, } }; 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 = DescribeWorldTemplateResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void GetWorldTemplateBodyMarshallTest() { var operation = service_model.FindOperation("GetWorldTemplateBody"); var request = InstantiateClassGenerator.Execute(); var marshaller = new GetWorldTemplateBodyRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("GetWorldTemplateBody", 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 = GetWorldTemplateBodyResponseUnmarshaller.Instance; var response = unmarshaller.Unmarshall(context) as GetWorldTemplateBodyResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void GetWorldTemplateBody_InternalServerExceptionMarshallTest() { var operation = service_model.FindOperation("GetWorldTemplateBody"); var request = InstantiateClassGenerator.Execute(); var marshaller = new GetWorldTemplateBodyRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("GetWorldTemplateBody", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("InternalServerException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","InternalServerException"}, } }; 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 = GetWorldTemplateBodyResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void GetWorldTemplateBody_InvalidParameterExceptionMarshallTest() { var operation = service_model.FindOperation("GetWorldTemplateBody"); var request = InstantiateClassGenerator.Execute(); var marshaller = new GetWorldTemplateBodyRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("GetWorldTemplateBody", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("InvalidParameterException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","InvalidParameterException"}, } }; 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 = GetWorldTemplateBodyResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void GetWorldTemplateBody_ResourceNotFoundExceptionMarshallTest() { var operation = service_model.FindOperation("GetWorldTemplateBody"); var request = InstantiateClassGenerator.Execute(); var marshaller = new GetWorldTemplateBodyRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("GetWorldTemplateBody", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("ResourceNotFoundException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","ResourceNotFoundException"}, } }; 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 = GetWorldTemplateBodyResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void GetWorldTemplateBody_ThrottlingExceptionMarshallTest() { var operation = service_model.FindOperation("GetWorldTemplateBody"); var request = InstantiateClassGenerator.Execute(); var marshaller = new GetWorldTemplateBodyRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("GetWorldTemplateBody", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("ThrottlingException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","ThrottlingException"}, } }; 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 = GetWorldTemplateBodyResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void ListDeploymentJobsMarshallTest() { var operation = service_model.FindOperation("ListDeploymentJobs"); var request = InstantiateClassGenerator.Execute(); var marshaller = new ListDeploymentJobsRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("ListDeploymentJobs", 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 = ListDeploymentJobsResponseUnmarshaller.Instance; var response = unmarshaller.Unmarshall(context) as ListDeploymentJobsResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void ListDeploymentJobs_InternalServerExceptionMarshallTest() { var operation = service_model.FindOperation("ListDeploymentJobs"); var request = InstantiateClassGenerator.Execute(); var marshaller = new ListDeploymentJobsRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("ListDeploymentJobs", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("InternalServerException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","InternalServerException"}, } }; 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 = ListDeploymentJobsResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void ListDeploymentJobs_InvalidParameterExceptionMarshallTest() { var operation = service_model.FindOperation("ListDeploymentJobs"); var request = InstantiateClassGenerator.Execute(); var marshaller = new ListDeploymentJobsRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("ListDeploymentJobs", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("InvalidParameterException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","InvalidParameterException"}, } }; 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 = ListDeploymentJobsResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void ListDeploymentJobs_ResourceNotFoundExceptionMarshallTest() { var operation = service_model.FindOperation("ListDeploymentJobs"); var request = InstantiateClassGenerator.Execute(); var marshaller = new ListDeploymentJobsRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("ListDeploymentJobs", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("ResourceNotFoundException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","ResourceNotFoundException"}, } }; 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 = ListDeploymentJobsResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void ListDeploymentJobs_ThrottlingExceptionMarshallTest() { var operation = service_model.FindOperation("ListDeploymentJobs"); var request = InstantiateClassGenerator.Execute(); var marshaller = new ListDeploymentJobsRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("ListDeploymentJobs", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("ThrottlingException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","ThrottlingException"}, } }; 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 = ListDeploymentJobsResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void ListFleetsMarshallTest() { var operation = service_model.FindOperation("ListFleets"); var request = InstantiateClassGenerator.Execute(); var marshaller = new ListFleetsRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("ListFleets", 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 = ListFleetsResponseUnmarshaller.Instance; var response = unmarshaller.Unmarshall(context) as ListFleetsResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void ListFleets_InternalServerExceptionMarshallTest() { var operation = service_model.FindOperation("ListFleets"); var request = InstantiateClassGenerator.Execute(); var marshaller = new ListFleetsRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("ListFleets", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("InternalServerException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","InternalServerException"}, } }; 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 = ListFleetsResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void ListFleets_InvalidParameterExceptionMarshallTest() { var operation = service_model.FindOperation("ListFleets"); var request = InstantiateClassGenerator.Execute(); var marshaller = new ListFleetsRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("ListFleets", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("InvalidParameterException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","InvalidParameterException"}, } }; 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 = ListFleetsResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void ListFleets_ResourceNotFoundExceptionMarshallTest() { var operation = service_model.FindOperation("ListFleets"); var request = InstantiateClassGenerator.Execute(); var marshaller = new ListFleetsRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("ListFleets", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("ResourceNotFoundException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","ResourceNotFoundException"}, } }; 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 = ListFleetsResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void ListFleets_ThrottlingExceptionMarshallTest() { var operation = service_model.FindOperation("ListFleets"); var request = InstantiateClassGenerator.Execute(); var marshaller = new ListFleetsRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("ListFleets", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("ThrottlingException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","ThrottlingException"}, } }; 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 = ListFleetsResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void ListRobotApplicationsMarshallTest() { var operation = service_model.FindOperation("ListRobotApplications"); var request = InstantiateClassGenerator.Execute(); var marshaller = new ListRobotApplicationsRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("ListRobotApplications", 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 = ListRobotApplicationsResponseUnmarshaller.Instance; var response = unmarshaller.Unmarshall(context) as ListRobotApplicationsResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void ListRobotApplications_InternalServerExceptionMarshallTest() { var operation = service_model.FindOperation("ListRobotApplications"); var request = InstantiateClassGenerator.Execute(); var marshaller = new ListRobotApplicationsRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("ListRobotApplications", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("InternalServerException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","InternalServerException"}, } }; 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 = ListRobotApplicationsResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void ListRobotApplications_InvalidParameterExceptionMarshallTest() { var operation = service_model.FindOperation("ListRobotApplications"); var request = InstantiateClassGenerator.Execute(); var marshaller = new ListRobotApplicationsRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("ListRobotApplications", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("InvalidParameterException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","InvalidParameterException"}, } }; 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 = ListRobotApplicationsResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void ListRobotApplications_ThrottlingExceptionMarshallTest() { var operation = service_model.FindOperation("ListRobotApplications"); var request = InstantiateClassGenerator.Execute(); var marshaller = new ListRobotApplicationsRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("ListRobotApplications", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("ThrottlingException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","ThrottlingException"}, } }; 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 = ListRobotApplicationsResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void ListRobotsMarshallTest() { var operation = service_model.FindOperation("ListRobots"); var request = InstantiateClassGenerator.Execute(); var marshaller = new ListRobotsRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("ListRobots", 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 = ListRobotsResponseUnmarshaller.Instance; var response = unmarshaller.Unmarshall(context) as ListRobotsResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void ListRobots_InternalServerExceptionMarshallTest() { var operation = service_model.FindOperation("ListRobots"); var request = InstantiateClassGenerator.Execute(); var marshaller = new ListRobotsRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("ListRobots", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("InternalServerException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","InternalServerException"}, } }; 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 = ListRobotsResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void ListRobots_InvalidParameterExceptionMarshallTest() { var operation = service_model.FindOperation("ListRobots"); var request = InstantiateClassGenerator.Execute(); var marshaller = new ListRobotsRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("ListRobots", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("InvalidParameterException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","InvalidParameterException"}, } }; 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 = ListRobotsResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void ListRobots_ResourceNotFoundExceptionMarshallTest() { var operation = service_model.FindOperation("ListRobots"); var request = InstantiateClassGenerator.Execute(); var marshaller = new ListRobotsRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("ListRobots", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("ResourceNotFoundException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","ResourceNotFoundException"}, } }; 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 = ListRobotsResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void ListRobots_ThrottlingExceptionMarshallTest() { var operation = service_model.FindOperation("ListRobots"); var request = InstantiateClassGenerator.Execute(); var marshaller = new ListRobotsRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("ListRobots", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("ThrottlingException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","ThrottlingException"}, } }; 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 = ListRobotsResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void ListSimulationApplicationsMarshallTest() { var operation = service_model.FindOperation("ListSimulationApplications"); var request = InstantiateClassGenerator.Execute(); var marshaller = new ListSimulationApplicationsRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("ListSimulationApplications", 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 = ListSimulationApplicationsResponseUnmarshaller.Instance; var response = unmarshaller.Unmarshall(context) as ListSimulationApplicationsResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void ListSimulationApplications_InternalServerExceptionMarshallTest() { var operation = service_model.FindOperation("ListSimulationApplications"); var request = InstantiateClassGenerator.Execute(); var marshaller = new ListSimulationApplicationsRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("ListSimulationApplications", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("InternalServerException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","InternalServerException"}, } }; 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 = ListSimulationApplicationsResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void ListSimulationApplications_InvalidParameterExceptionMarshallTest() { var operation = service_model.FindOperation("ListSimulationApplications"); var request = InstantiateClassGenerator.Execute(); var marshaller = new ListSimulationApplicationsRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("ListSimulationApplications", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("InvalidParameterException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","InvalidParameterException"}, } }; 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 = ListSimulationApplicationsResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void ListSimulationApplications_ThrottlingExceptionMarshallTest() { var operation = service_model.FindOperation("ListSimulationApplications"); var request = InstantiateClassGenerator.Execute(); var marshaller = new ListSimulationApplicationsRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("ListSimulationApplications", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("ThrottlingException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","ThrottlingException"}, } }; 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 = ListSimulationApplicationsResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void ListSimulationJobBatchesMarshallTest() { var operation = service_model.FindOperation("ListSimulationJobBatches"); var request = InstantiateClassGenerator.Execute(); var marshaller = new ListSimulationJobBatchesRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("ListSimulationJobBatches", 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 = ListSimulationJobBatchesResponseUnmarshaller.Instance; var response = unmarshaller.Unmarshall(context) as ListSimulationJobBatchesResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void ListSimulationJobBatches_InternalServerExceptionMarshallTest() { var operation = service_model.FindOperation("ListSimulationJobBatches"); var request = InstantiateClassGenerator.Execute(); var marshaller = new ListSimulationJobBatchesRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("ListSimulationJobBatches", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("InternalServerException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","InternalServerException"}, } }; 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 = ListSimulationJobBatchesResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void ListSimulationJobBatches_InvalidParameterExceptionMarshallTest() { var operation = service_model.FindOperation("ListSimulationJobBatches"); var request = InstantiateClassGenerator.Execute(); var marshaller = new ListSimulationJobBatchesRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("ListSimulationJobBatches", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("InvalidParameterException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","InvalidParameterException"}, } }; 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 = ListSimulationJobBatchesResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void ListSimulationJobsMarshallTest() { var operation = service_model.FindOperation("ListSimulationJobs"); var request = InstantiateClassGenerator.Execute(); var marshaller = new ListSimulationJobsRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("ListSimulationJobs", 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 = ListSimulationJobsResponseUnmarshaller.Instance; var response = unmarshaller.Unmarshall(context) as ListSimulationJobsResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void ListSimulationJobs_InternalServerExceptionMarshallTest() { var operation = service_model.FindOperation("ListSimulationJobs"); var request = InstantiateClassGenerator.Execute(); var marshaller = new ListSimulationJobsRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("ListSimulationJobs", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("InternalServerException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","InternalServerException"}, } }; 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 = ListSimulationJobsResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void ListSimulationJobs_InvalidParameterExceptionMarshallTest() { var operation = service_model.FindOperation("ListSimulationJobs"); var request = InstantiateClassGenerator.Execute(); var marshaller = new ListSimulationJobsRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("ListSimulationJobs", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("InvalidParameterException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","InvalidParameterException"}, } }; 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 = ListSimulationJobsResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void ListSimulationJobs_ThrottlingExceptionMarshallTest() { var operation = service_model.FindOperation("ListSimulationJobs"); var request = InstantiateClassGenerator.Execute(); var marshaller = new ListSimulationJobsRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("ListSimulationJobs", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("ThrottlingException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","ThrottlingException"}, } }; 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 = ListSimulationJobsResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] 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("RoboMaker")] public void ListTagsForResource_InternalServerExceptionMarshallTest() { 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("InternalServerException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","InternalServerException"}, } }; 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("RoboMaker")] public void ListTagsForResource_InvalidParameterExceptionMarshallTest() { 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("InvalidParameterException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","InvalidParameterException"}, } }; 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("RoboMaker")] public void ListTagsForResource_ResourceNotFoundExceptionMarshallTest() { 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("ResourceNotFoundException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","ResourceNotFoundException"}, } }; 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("RoboMaker")] public void ListTagsForResource_ThrottlingExceptionMarshallTest() { var operation = service_model.FindOperation("ListTagsForResource"); var request = InstantiateClassGenerator.Execute(); var marshaller = new ListTagsForResourceRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("ListTagsForResource", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("ThrottlingException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","ThrottlingException"}, } }; 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("RoboMaker")] public void ListWorldExportJobsMarshallTest() { var operation = service_model.FindOperation("ListWorldExportJobs"); var request = InstantiateClassGenerator.Execute(); var marshaller = new ListWorldExportJobsRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("ListWorldExportJobs", 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 = ListWorldExportJobsResponseUnmarshaller.Instance; var response = unmarshaller.Unmarshall(context) as ListWorldExportJobsResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void ListWorldExportJobs_InternalServerExceptionMarshallTest() { var operation = service_model.FindOperation("ListWorldExportJobs"); var request = InstantiateClassGenerator.Execute(); var marshaller = new ListWorldExportJobsRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("ListWorldExportJobs", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("InternalServerException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","InternalServerException"}, } }; 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 = ListWorldExportJobsResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void ListWorldExportJobs_InvalidParameterExceptionMarshallTest() { var operation = service_model.FindOperation("ListWorldExportJobs"); var request = InstantiateClassGenerator.Execute(); var marshaller = new ListWorldExportJobsRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("ListWorldExportJobs", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("InvalidParameterException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","InvalidParameterException"}, } }; 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 = ListWorldExportJobsResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void ListWorldExportJobs_ThrottlingExceptionMarshallTest() { var operation = service_model.FindOperation("ListWorldExportJobs"); var request = InstantiateClassGenerator.Execute(); var marshaller = new ListWorldExportJobsRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("ListWorldExportJobs", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("ThrottlingException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","ThrottlingException"}, } }; 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 = ListWorldExportJobsResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void ListWorldGenerationJobsMarshallTest() { var operation = service_model.FindOperation("ListWorldGenerationJobs"); var request = InstantiateClassGenerator.Execute(); var marshaller = new ListWorldGenerationJobsRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("ListWorldGenerationJobs", 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 = ListWorldGenerationJobsResponseUnmarshaller.Instance; var response = unmarshaller.Unmarshall(context) as ListWorldGenerationJobsResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void ListWorldGenerationJobs_InternalServerExceptionMarshallTest() { var operation = service_model.FindOperation("ListWorldGenerationJobs"); var request = InstantiateClassGenerator.Execute(); var marshaller = new ListWorldGenerationJobsRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("ListWorldGenerationJobs", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("InternalServerException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","InternalServerException"}, } }; 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 = ListWorldGenerationJobsResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void ListWorldGenerationJobs_InvalidParameterExceptionMarshallTest() { var operation = service_model.FindOperation("ListWorldGenerationJobs"); var request = InstantiateClassGenerator.Execute(); var marshaller = new ListWorldGenerationJobsRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("ListWorldGenerationJobs", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("InvalidParameterException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","InvalidParameterException"}, } }; 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 = ListWorldGenerationJobsResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void ListWorldGenerationJobs_ThrottlingExceptionMarshallTest() { var operation = service_model.FindOperation("ListWorldGenerationJobs"); var request = InstantiateClassGenerator.Execute(); var marshaller = new ListWorldGenerationJobsRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("ListWorldGenerationJobs", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("ThrottlingException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","ThrottlingException"}, } }; 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 = ListWorldGenerationJobsResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void ListWorldsMarshallTest() { var operation = service_model.FindOperation("ListWorlds"); var request = InstantiateClassGenerator.Execute(); var marshaller = new ListWorldsRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("ListWorlds", 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 = ListWorldsResponseUnmarshaller.Instance; var response = unmarshaller.Unmarshall(context) as ListWorldsResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void ListWorlds_InternalServerExceptionMarshallTest() { var operation = service_model.FindOperation("ListWorlds"); var request = InstantiateClassGenerator.Execute(); var marshaller = new ListWorldsRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("ListWorlds", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("InternalServerException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","InternalServerException"}, } }; 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 = ListWorldsResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void ListWorlds_InvalidParameterExceptionMarshallTest() { var operation = service_model.FindOperation("ListWorlds"); var request = InstantiateClassGenerator.Execute(); var marshaller = new ListWorldsRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("ListWorlds", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("InvalidParameterException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","InvalidParameterException"}, } }; 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 = ListWorldsResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void ListWorlds_ThrottlingExceptionMarshallTest() { var operation = service_model.FindOperation("ListWorlds"); var request = InstantiateClassGenerator.Execute(); var marshaller = new ListWorldsRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("ListWorlds", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("ThrottlingException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","ThrottlingException"}, } }; 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 = ListWorldsResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void ListWorldTemplatesMarshallTest() { var operation = service_model.FindOperation("ListWorldTemplates"); var request = InstantiateClassGenerator.Execute(); var marshaller = new ListWorldTemplatesRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("ListWorldTemplates", 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 = ListWorldTemplatesResponseUnmarshaller.Instance; var response = unmarshaller.Unmarshall(context) as ListWorldTemplatesResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void ListWorldTemplates_InternalServerExceptionMarshallTest() { var operation = service_model.FindOperation("ListWorldTemplates"); var request = InstantiateClassGenerator.Execute(); var marshaller = new ListWorldTemplatesRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("ListWorldTemplates", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("InternalServerException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","InternalServerException"}, } }; 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 = ListWorldTemplatesResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void ListWorldTemplates_InvalidParameterExceptionMarshallTest() { var operation = service_model.FindOperation("ListWorldTemplates"); var request = InstantiateClassGenerator.Execute(); var marshaller = new ListWorldTemplatesRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("ListWorldTemplates", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("InvalidParameterException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","InvalidParameterException"}, } }; 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 = ListWorldTemplatesResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void ListWorldTemplates_ThrottlingExceptionMarshallTest() { var operation = service_model.FindOperation("ListWorldTemplates"); var request = InstantiateClassGenerator.Execute(); var marshaller = new ListWorldTemplatesRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("ListWorldTemplates", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("ThrottlingException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","ThrottlingException"}, } }; 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 = ListWorldTemplatesResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void RegisterRobotMarshallTest() { var operation = service_model.FindOperation("RegisterRobot"); var request = InstantiateClassGenerator.Execute(); var marshaller = new RegisterRobotRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("RegisterRobot", 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 = RegisterRobotResponseUnmarshaller.Instance; var response = unmarshaller.Unmarshall(context) as RegisterRobotResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void RegisterRobot_InternalServerExceptionMarshallTest() { var operation = service_model.FindOperation("RegisterRobot"); var request = InstantiateClassGenerator.Execute(); var marshaller = new RegisterRobotRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("RegisterRobot", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("InternalServerException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","InternalServerException"}, } }; 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 = RegisterRobotResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void RegisterRobot_InvalidParameterExceptionMarshallTest() { var operation = service_model.FindOperation("RegisterRobot"); var request = InstantiateClassGenerator.Execute(); var marshaller = new RegisterRobotRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("RegisterRobot", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("InvalidParameterException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","InvalidParameterException"}, } }; 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 = RegisterRobotResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void RegisterRobot_LimitExceededExceptionMarshallTest() { var operation = service_model.FindOperation("RegisterRobot"); var request = InstantiateClassGenerator.Execute(); var marshaller = new RegisterRobotRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("RegisterRobot", 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 = RegisterRobotResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void RegisterRobot_ResourceNotFoundExceptionMarshallTest() { var operation = service_model.FindOperation("RegisterRobot"); var request = InstantiateClassGenerator.Execute(); var marshaller = new RegisterRobotRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("RegisterRobot", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("ResourceNotFoundException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","ResourceNotFoundException"}, } }; 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 = RegisterRobotResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void RegisterRobot_ThrottlingExceptionMarshallTest() { var operation = service_model.FindOperation("RegisterRobot"); var request = InstantiateClassGenerator.Execute(); var marshaller = new RegisterRobotRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("RegisterRobot", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("ThrottlingException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","ThrottlingException"}, } }; 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 = RegisterRobotResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void RestartSimulationJobMarshallTest() { var operation = service_model.FindOperation("RestartSimulationJob"); var request = InstantiateClassGenerator.Execute(); var marshaller = new RestartSimulationJobRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("RestartSimulationJob", 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 = RestartSimulationJobResponseUnmarshaller.Instance; var response = unmarshaller.Unmarshall(context) as RestartSimulationJobResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void RestartSimulationJob_InternalServerExceptionMarshallTest() { var operation = service_model.FindOperation("RestartSimulationJob"); var request = InstantiateClassGenerator.Execute(); var marshaller = new RestartSimulationJobRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("RestartSimulationJob", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("InternalServerException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","InternalServerException"}, } }; 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 = RestartSimulationJobResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void RestartSimulationJob_InvalidParameterExceptionMarshallTest() { var operation = service_model.FindOperation("RestartSimulationJob"); var request = InstantiateClassGenerator.Execute(); var marshaller = new RestartSimulationJobRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("RestartSimulationJob", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("InvalidParameterException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","InvalidParameterException"}, } }; 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 = RestartSimulationJobResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void RestartSimulationJob_LimitExceededExceptionMarshallTest() { var operation = service_model.FindOperation("RestartSimulationJob"); var request = InstantiateClassGenerator.Execute(); var marshaller = new RestartSimulationJobRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("RestartSimulationJob", 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 = RestartSimulationJobResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void RestartSimulationJob_ResourceNotFoundExceptionMarshallTest() { var operation = service_model.FindOperation("RestartSimulationJob"); var request = InstantiateClassGenerator.Execute(); var marshaller = new RestartSimulationJobRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("RestartSimulationJob", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("ResourceNotFoundException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","ResourceNotFoundException"}, } }; 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 = RestartSimulationJobResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void RestartSimulationJob_ThrottlingExceptionMarshallTest() { var operation = service_model.FindOperation("RestartSimulationJob"); var request = InstantiateClassGenerator.Execute(); var marshaller = new RestartSimulationJobRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("RestartSimulationJob", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("ThrottlingException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","ThrottlingException"}, } }; 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 = RestartSimulationJobResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void StartSimulationJobBatchMarshallTest() { var operation = service_model.FindOperation("StartSimulationJobBatch"); var request = InstantiateClassGenerator.Execute(); var marshaller = new StartSimulationJobBatchRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("StartSimulationJobBatch", 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 = StartSimulationJobBatchResponseUnmarshaller.Instance; var response = unmarshaller.Unmarshall(context) as StartSimulationJobBatchResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void StartSimulationJobBatch_IdempotentParameterMismatchExceptionMarshallTest() { var operation = service_model.FindOperation("StartSimulationJobBatch"); var request = InstantiateClassGenerator.Execute(); var marshaller = new StartSimulationJobBatchRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("StartSimulationJobBatch", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("IdempotentParameterMismatchException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","IdempotentParameterMismatchException"}, } }; 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 = StartSimulationJobBatchResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void StartSimulationJobBatch_InternalServerExceptionMarshallTest() { var operation = service_model.FindOperation("StartSimulationJobBatch"); var request = InstantiateClassGenerator.Execute(); var marshaller = new StartSimulationJobBatchRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("StartSimulationJobBatch", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("InternalServerException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","InternalServerException"}, } }; 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 = StartSimulationJobBatchResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void StartSimulationJobBatch_InvalidParameterExceptionMarshallTest() { var operation = service_model.FindOperation("StartSimulationJobBatch"); var request = InstantiateClassGenerator.Execute(); var marshaller = new StartSimulationJobBatchRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("StartSimulationJobBatch", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("InvalidParameterException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","InvalidParameterException"}, } }; 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 = StartSimulationJobBatchResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void StartSimulationJobBatch_LimitExceededExceptionMarshallTest() { var operation = service_model.FindOperation("StartSimulationJobBatch"); var request = InstantiateClassGenerator.Execute(); var marshaller = new StartSimulationJobBatchRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("StartSimulationJobBatch", 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 = StartSimulationJobBatchResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void StartSimulationJobBatch_ThrottlingExceptionMarshallTest() { var operation = service_model.FindOperation("StartSimulationJobBatch"); var request = InstantiateClassGenerator.Execute(); var marshaller = new StartSimulationJobBatchRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("StartSimulationJobBatch", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("ThrottlingException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","ThrottlingException"}, } }; 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 = StartSimulationJobBatchResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void SyncDeploymentJobMarshallTest() { var operation = service_model.FindOperation("SyncDeploymentJob"); var request = InstantiateClassGenerator.Execute(); var marshaller = new SyncDeploymentJobRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("SyncDeploymentJob", 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 = SyncDeploymentJobResponseUnmarshaller.Instance; var response = unmarshaller.Unmarshall(context) as SyncDeploymentJobResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void SyncDeploymentJob_ConcurrentDeploymentExceptionMarshallTest() { var operation = service_model.FindOperation("SyncDeploymentJob"); var request = InstantiateClassGenerator.Execute(); var marshaller = new SyncDeploymentJobRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("SyncDeploymentJob", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("ConcurrentDeploymentException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","ConcurrentDeploymentException"}, } }; 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 = SyncDeploymentJobResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void SyncDeploymentJob_IdempotentParameterMismatchExceptionMarshallTest() { var operation = service_model.FindOperation("SyncDeploymentJob"); var request = InstantiateClassGenerator.Execute(); var marshaller = new SyncDeploymentJobRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("SyncDeploymentJob", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("IdempotentParameterMismatchException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","IdempotentParameterMismatchException"}, } }; 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 = SyncDeploymentJobResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void SyncDeploymentJob_InternalServerExceptionMarshallTest() { var operation = service_model.FindOperation("SyncDeploymentJob"); var request = InstantiateClassGenerator.Execute(); var marshaller = new SyncDeploymentJobRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("SyncDeploymentJob", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("InternalServerException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","InternalServerException"}, } }; 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 = SyncDeploymentJobResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void SyncDeploymentJob_InvalidParameterExceptionMarshallTest() { var operation = service_model.FindOperation("SyncDeploymentJob"); var request = InstantiateClassGenerator.Execute(); var marshaller = new SyncDeploymentJobRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("SyncDeploymentJob", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("InvalidParameterException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","InvalidParameterException"}, } }; 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 = SyncDeploymentJobResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void SyncDeploymentJob_LimitExceededExceptionMarshallTest() { var operation = service_model.FindOperation("SyncDeploymentJob"); var request = InstantiateClassGenerator.Execute(); var marshaller = new SyncDeploymentJobRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("SyncDeploymentJob", 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 = SyncDeploymentJobResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void SyncDeploymentJob_ResourceNotFoundExceptionMarshallTest() { var operation = service_model.FindOperation("SyncDeploymentJob"); var request = InstantiateClassGenerator.Execute(); var marshaller = new SyncDeploymentJobRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("SyncDeploymentJob", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("ResourceNotFoundException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","ResourceNotFoundException"}, } }; 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 = SyncDeploymentJobResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void SyncDeploymentJob_ThrottlingExceptionMarshallTest() { var operation = service_model.FindOperation("SyncDeploymentJob"); var request = InstantiateClassGenerator.Execute(); var marshaller = new SyncDeploymentJobRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("SyncDeploymentJob", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("ThrottlingException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","ThrottlingException"}, } }; 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 = SyncDeploymentJobResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] 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("RoboMaker")] public void TagResource_InternalServerExceptionMarshallTest() { 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("InternalServerException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","InternalServerException"}, } }; 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("RoboMaker")] public void TagResource_InvalidParameterExceptionMarshallTest() { 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("InvalidParameterException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","InvalidParameterException"}, } }; 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("RoboMaker")] public void TagResource_ResourceNotFoundExceptionMarshallTest() { 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("ResourceNotFoundException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","ResourceNotFoundException"}, } }; 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("RoboMaker")] public void TagResource_ThrottlingExceptionMarshallTest() { 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("ThrottlingException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","ThrottlingException"}, } }; 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("RoboMaker")] 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("RoboMaker")] public void UntagResource_InternalServerExceptionMarshallTest() { 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("InternalServerException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","InternalServerException"}, } }; 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("RoboMaker")] public void UntagResource_InvalidParameterExceptionMarshallTest() { 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("InvalidParameterException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","InvalidParameterException"}, } }; 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("RoboMaker")] public void UntagResource_ResourceNotFoundExceptionMarshallTest() { 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("ResourceNotFoundException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","ResourceNotFoundException"}, } }; 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("RoboMaker")] public void UntagResource_ThrottlingExceptionMarshallTest() { 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("ThrottlingException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","ThrottlingException"}, } }; 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("RoboMaker")] public void UpdateRobotApplicationMarshallTest() { var operation = service_model.FindOperation("UpdateRobotApplication"); var request = InstantiateClassGenerator.Execute(); var marshaller = new UpdateRobotApplicationRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("UpdateRobotApplication", 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 = UpdateRobotApplicationResponseUnmarshaller.Instance; var response = unmarshaller.Unmarshall(context) as UpdateRobotApplicationResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void UpdateRobotApplication_InternalServerExceptionMarshallTest() { var operation = service_model.FindOperation("UpdateRobotApplication"); var request = InstantiateClassGenerator.Execute(); var marshaller = new UpdateRobotApplicationRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("UpdateRobotApplication", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("InternalServerException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","InternalServerException"}, } }; 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 = UpdateRobotApplicationResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void UpdateRobotApplication_InvalidParameterExceptionMarshallTest() { var operation = service_model.FindOperation("UpdateRobotApplication"); var request = InstantiateClassGenerator.Execute(); var marshaller = new UpdateRobotApplicationRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("UpdateRobotApplication", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("InvalidParameterException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","InvalidParameterException"}, } }; 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 = UpdateRobotApplicationResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void UpdateRobotApplication_LimitExceededExceptionMarshallTest() { var operation = service_model.FindOperation("UpdateRobotApplication"); var request = InstantiateClassGenerator.Execute(); var marshaller = new UpdateRobotApplicationRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("UpdateRobotApplication", 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 = UpdateRobotApplicationResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void UpdateRobotApplication_ResourceNotFoundExceptionMarshallTest() { var operation = service_model.FindOperation("UpdateRobotApplication"); var request = InstantiateClassGenerator.Execute(); var marshaller = new UpdateRobotApplicationRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("UpdateRobotApplication", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("ResourceNotFoundException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","ResourceNotFoundException"}, } }; 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 = UpdateRobotApplicationResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void UpdateRobotApplication_ThrottlingExceptionMarshallTest() { var operation = service_model.FindOperation("UpdateRobotApplication"); var request = InstantiateClassGenerator.Execute(); var marshaller = new UpdateRobotApplicationRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("UpdateRobotApplication", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("ThrottlingException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","ThrottlingException"}, } }; 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 = UpdateRobotApplicationResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void UpdateSimulationApplicationMarshallTest() { var operation = service_model.FindOperation("UpdateSimulationApplication"); var request = InstantiateClassGenerator.Execute(); var marshaller = new UpdateSimulationApplicationRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("UpdateSimulationApplication", 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 = UpdateSimulationApplicationResponseUnmarshaller.Instance; var response = unmarshaller.Unmarshall(context) as UpdateSimulationApplicationResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void UpdateSimulationApplication_InternalServerExceptionMarshallTest() { var operation = service_model.FindOperation("UpdateSimulationApplication"); var request = InstantiateClassGenerator.Execute(); var marshaller = new UpdateSimulationApplicationRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("UpdateSimulationApplication", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("InternalServerException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","InternalServerException"}, } }; 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 = UpdateSimulationApplicationResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void UpdateSimulationApplication_InvalidParameterExceptionMarshallTest() { var operation = service_model.FindOperation("UpdateSimulationApplication"); var request = InstantiateClassGenerator.Execute(); var marshaller = new UpdateSimulationApplicationRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("UpdateSimulationApplication", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("InvalidParameterException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","InvalidParameterException"}, } }; 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 = UpdateSimulationApplicationResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void UpdateSimulationApplication_LimitExceededExceptionMarshallTest() { var operation = service_model.FindOperation("UpdateSimulationApplication"); var request = InstantiateClassGenerator.Execute(); var marshaller = new UpdateSimulationApplicationRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("UpdateSimulationApplication", 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 = UpdateSimulationApplicationResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void UpdateSimulationApplication_ResourceNotFoundExceptionMarshallTest() { var operation = service_model.FindOperation("UpdateSimulationApplication"); var request = InstantiateClassGenerator.Execute(); var marshaller = new UpdateSimulationApplicationRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("UpdateSimulationApplication", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("ResourceNotFoundException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","ResourceNotFoundException"}, } }; 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 = UpdateSimulationApplicationResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void UpdateSimulationApplication_ThrottlingExceptionMarshallTest() { var operation = service_model.FindOperation("UpdateSimulationApplication"); var request = InstantiateClassGenerator.Execute(); var marshaller = new UpdateSimulationApplicationRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("UpdateSimulationApplication", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("ThrottlingException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","ThrottlingException"}, } }; 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 = UpdateSimulationApplicationResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void UpdateWorldTemplateMarshallTest() { var operation = service_model.FindOperation("UpdateWorldTemplate"); var request = InstantiateClassGenerator.Execute(); var marshaller = new UpdateWorldTemplateRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("UpdateWorldTemplate", 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 = UpdateWorldTemplateResponseUnmarshaller.Instance; var response = unmarshaller.Unmarshall(context) as UpdateWorldTemplateResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void UpdateWorldTemplate_InternalServerExceptionMarshallTest() { var operation = service_model.FindOperation("UpdateWorldTemplate"); var request = InstantiateClassGenerator.Execute(); var marshaller = new UpdateWorldTemplateRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("UpdateWorldTemplate", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("InternalServerException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","InternalServerException"}, } }; 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 = UpdateWorldTemplateResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void UpdateWorldTemplate_InvalidParameterExceptionMarshallTest() { var operation = service_model.FindOperation("UpdateWorldTemplate"); var request = InstantiateClassGenerator.Execute(); var marshaller = new UpdateWorldTemplateRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("UpdateWorldTemplate", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("InvalidParameterException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","InvalidParameterException"}, } }; 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 = UpdateWorldTemplateResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void UpdateWorldTemplate_ResourceNotFoundExceptionMarshallTest() { var operation = service_model.FindOperation("UpdateWorldTemplate"); var request = InstantiateClassGenerator.Execute(); var marshaller = new UpdateWorldTemplateRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("UpdateWorldTemplate", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("ResourceNotFoundException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","ResourceNotFoundException"}, } }; 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 = UpdateWorldTemplateResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Rest_Json")] [TestCategory("RoboMaker")] public void UpdateWorldTemplate_ThrottlingExceptionMarshallTest() { var operation = service_model.FindOperation("UpdateWorldTemplate"); var request = InstantiateClassGenerator.Execute(); var marshaller = new UpdateWorldTemplateRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("UpdateWorldTemplate", request, internalRequest, service_model); var exception = operation.Exceptions.First(e => e.Name.Equals("ThrottlingException")); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"}, {"x-amzn-ErrorType","ThrottlingException"}, } }; 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 = UpdateWorldTemplateResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } } }