/* * 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 sns-2010-03-31.normal.json service model. */ using System; using System.IO; using System.Linq; using System.Text; using Microsoft.VisualStudio.TestTools.UnitTesting; using Amazon.SimpleNotificationService; using Amazon.SimpleNotificationService.Model; using Amazon.SimpleNotificationService.Model.Internal.MarshallTransformations; using Amazon.Runtime.Internal.Transform; using ServiceClientGenerator; using AWSSDK_DotNet35.UnitTests.TestTools; namespace AWSSDK_DotNet35.UnitTests.Marshalling { [TestClass] public class SimpleNotificationServiceMarshallingTests { static readonly ServiceModel service_model = Utils.LoadServiceModel("sns"); [TestMethod] [TestCategory("UnitTest")] [TestCategory("Query")] [TestCategory("SimpleNotificationService")] public void AddPermissionMarshallTest() { var operation = service_model.FindOperation("AddPermission"); var request = InstantiateClassGenerator.Execute(); var marshaller = new AddPermissionRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Query")] [TestCategory("SimpleNotificationService")] public void AddPermission_AuthorizationErrorExceptionMarshallTest() { var operation = service_model.FindOperation("AddPermission"); var request = InstantiateClassGenerator.Execute(); var marshaller = new AddPermissionRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); var exception = operation.Exceptions.First(e => e.Name.Equals("AuthorizationErrorException")); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, null, true); var response = AddPermissionResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Query")] [TestCategory("SimpleNotificationService")] public void AddPermission_InternalErrorExceptionMarshallTest() { var operation = service_model.FindOperation("AddPermission"); var request = InstantiateClassGenerator.Execute(); var marshaller = new AddPermissionRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); var exception = operation.Exceptions.First(e => e.Name.Equals("InternalErrorException")); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, null, true); var response = AddPermissionResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Query")] [TestCategory("SimpleNotificationService")] public void AddPermission_InvalidParameterExceptionMarshallTest() { var operation = service_model.FindOperation("AddPermission"); var request = InstantiateClassGenerator.Execute(); var marshaller = new AddPermissionRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); var exception = operation.Exceptions.First(e => e.Name.Equals("InvalidParameterException")); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, null, true); var response = AddPermissionResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Query")] [TestCategory("SimpleNotificationService")] public void AddPermission_NotFoundExceptionMarshallTest() { var operation = service_model.FindOperation("AddPermission"); var request = InstantiateClassGenerator.Execute(); var marshaller = new AddPermissionRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); var exception = operation.Exceptions.First(e => e.Name.Equals("NotFoundException")); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, null, true); var response = AddPermissionResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Query")] [TestCategory("SimpleNotificationService")] public void CheckIfPhoneNumberIsOptedOutMarshallTest() { var operation = service_model.FindOperation("CheckIfPhoneNumberIsOptedOut"); var request = InstantiateClassGenerator.Execute(); var marshaller = new CheckIfPhoneNumberIsOptedOutRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), false, null); var response = CheckIfPhoneNumberIsOptedOutResponseUnmarshaller.Instance.Unmarshall(context) as CheckIfPhoneNumberIsOptedOutResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Query")] [TestCategory("SimpleNotificationService")] public void CheckIfPhoneNumberIsOptedOut_AuthorizationErrorExceptionMarshallTest() { var operation = service_model.FindOperation("CheckIfPhoneNumberIsOptedOut"); var request = InstantiateClassGenerator.Execute(); var marshaller = new CheckIfPhoneNumberIsOptedOutRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); var exception = operation.Exceptions.First(e => e.Name.Equals("AuthorizationErrorException")); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, null, true); var response = CheckIfPhoneNumberIsOptedOutResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Query")] [TestCategory("SimpleNotificationService")] public void CheckIfPhoneNumberIsOptedOut_InternalErrorExceptionMarshallTest() { var operation = service_model.FindOperation("CheckIfPhoneNumberIsOptedOut"); var request = InstantiateClassGenerator.Execute(); var marshaller = new CheckIfPhoneNumberIsOptedOutRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); var exception = operation.Exceptions.First(e => e.Name.Equals("InternalErrorException")); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, null, true); var response = CheckIfPhoneNumberIsOptedOutResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Query")] [TestCategory("SimpleNotificationService")] public void CheckIfPhoneNumberIsOptedOut_InvalidParameterExceptionMarshallTest() { var operation = service_model.FindOperation("CheckIfPhoneNumberIsOptedOut"); var request = InstantiateClassGenerator.Execute(); var marshaller = new CheckIfPhoneNumberIsOptedOutRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); var exception = operation.Exceptions.First(e => e.Name.Equals("InvalidParameterException")); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, null, true); var response = CheckIfPhoneNumberIsOptedOutResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Query")] [TestCategory("SimpleNotificationService")] public void CheckIfPhoneNumberIsOptedOut_ThrottledExceptionMarshallTest() { var operation = service_model.FindOperation("CheckIfPhoneNumberIsOptedOut"); var request = InstantiateClassGenerator.Execute(); var marshaller = new CheckIfPhoneNumberIsOptedOutRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); var exception = operation.Exceptions.First(e => e.Name.Equals("ThrottledException")); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, null, true); var response = CheckIfPhoneNumberIsOptedOutResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Query")] [TestCategory("SimpleNotificationService")] public void ConfirmSubscriptionMarshallTest() { var operation = service_model.FindOperation("ConfirmSubscription"); var request = InstantiateClassGenerator.Execute(); var marshaller = new ConfirmSubscriptionRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), false, null); var response = ConfirmSubscriptionResponseUnmarshaller.Instance.Unmarshall(context) as ConfirmSubscriptionResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Query")] [TestCategory("SimpleNotificationService")] public void ConfirmSubscription_AuthorizationErrorExceptionMarshallTest() { var operation = service_model.FindOperation("ConfirmSubscription"); var request = InstantiateClassGenerator.Execute(); var marshaller = new ConfirmSubscriptionRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); var exception = operation.Exceptions.First(e => e.Name.Equals("AuthorizationErrorException")); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, null, true); var response = ConfirmSubscriptionResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Query")] [TestCategory("SimpleNotificationService")] public void ConfirmSubscription_FilterPolicyLimitExceededExceptionMarshallTest() { var operation = service_model.FindOperation("ConfirmSubscription"); var request = InstantiateClassGenerator.Execute(); var marshaller = new ConfirmSubscriptionRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); var exception = operation.Exceptions.First(e => e.Name.Equals("FilterPolicyLimitExceededException")); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, null, true); var response = ConfirmSubscriptionResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Query")] [TestCategory("SimpleNotificationService")] public void ConfirmSubscription_InternalErrorExceptionMarshallTest() { var operation = service_model.FindOperation("ConfirmSubscription"); var request = InstantiateClassGenerator.Execute(); var marshaller = new ConfirmSubscriptionRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); var exception = operation.Exceptions.First(e => e.Name.Equals("InternalErrorException")); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, null, true); var response = ConfirmSubscriptionResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Query")] [TestCategory("SimpleNotificationService")] public void ConfirmSubscription_InvalidParameterExceptionMarshallTest() { var operation = service_model.FindOperation("ConfirmSubscription"); var request = InstantiateClassGenerator.Execute(); var marshaller = new ConfirmSubscriptionRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); var exception = operation.Exceptions.First(e => e.Name.Equals("InvalidParameterException")); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, null, true); var response = ConfirmSubscriptionResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Query")] [TestCategory("SimpleNotificationService")] public void ConfirmSubscription_NotFoundExceptionMarshallTest() { var operation = service_model.FindOperation("ConfirmSubscription"); var request = InstantiateClassGenerator.Execute(); var marshaller = new ConfirmSubscriptionRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); var exception = operation.Exceptions.First(e => e.Name.Equals("NotFoundException")); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, null, true); var response = ConfirmSubscriptionResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Query")] [TestCategory("SimpleNotificationService")] public void ConfirmSubscription_SubscriptionLimitExceededExceptionMarshallTest() { var operation = service_model.FindOperation("ConfirmSubscription"); var request = InstantiateClassGenerator.Execute(); var marshaller = new ConfirmSubscriptionRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); var exception = operation.Exceptions.First(e => e.Name.Equals("SubscriptionLimitExceededException")); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, null, true); var response = ConfirmSubscriptionResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Query")] [TestCategory("SimpleNotificationService")] public void CreatePlatformApplicationMarshallTest() { var operation = service_model.FindOperation("CreatePlatformApplication"); var request = InstantiateClassGenerator.Execute(); var marshaller = new CreatePlatformApplicationRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), false, null); var response = CreatePlatformApplicationResponseUnmarshaller.Instance.Unmarshall(context) as CreatePlatformApplicationResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Query")] [TestCategory("SimpleNotificationService")] public void CreatePlatformApplication_AuthorizationErrorExceptionMarshallTest() { var operation = service_model.FindOperation("CreatePlatformApplication"); var request = InstantiateClassGenerator.Execute(); var marshaller = new CreatePlatformApplicationRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); var exception = operation.Exceptions.First(e => e.Name.Equals("AuthorizationErrorException")); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, null, true); var response = CreatePlatformApplicationResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Query")] [TestCategory("SimpleNotificationService")] public void CreatePlatformApplication_InternalErrorExceptionMarshallTest() { var operation = service_model.FindOperation("CreatePlatformApplication"); var request = InstantiateClassGenerator.Execute(); var marshaller = new CreatePlatformApplicationRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); var exception = operation.Exceptions.First(e => e.Name.Equals("InternalErrorException")); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, null, true); var response = CreatePlatformApplicationResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Query")] [TestCategory("SimpleNotificationService")] public void CreatePlatformApplication_InvalidParameterExceptionMarshallTest() { var operation = service_model.FindOperation("CreatePlatformApplication"); var request = InstantiateClassGenerator.Execute(); var marshaller = new CreatePlatformApplicationRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); var exception = operation.Exceptions.First(e => e.Name.Equals("InvalidParameterException")); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, null, true); var response = CreatePlatformApplicationResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Query")] [TestCategory("SimpleNotificationService")] public void CreatePlatformEndpointMarshallTest() { var operation = service_model.FindOperation("CreatePlatformEndpoint"); var request = InstantiateClassGenerator.Execute(); var marshaller = new CreatePlatformEndpointRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), false, null); var response = CreatePlatformEndpointResponseUnmarshaller.Instance.Unmarshall(context) as CreatePlatformEndpointResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Query")] [TestCategory("SimpleNotificationService")] public void CreatePlatformEndpoint_AuthorizationErrorExceptionMarshallTest() { var operation = service_model.FindOperation("CreatePlatformEndpoint"); var request = InstantiateClassGenerator.Execute(); var marshaller = new CreatePlatformEndpointRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); var exception = operation.Exceptions.First(e => e.Name.Equals("AuthorizationErrorException")); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, null, true); var response = CreatePlatformEndpointResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Query")] [TestCategory("SimpleNotificationService")] public void CreatePlatformEndpoint_InternalErrorExceptionMarshallTest() { var operation = service_model.FindOperation("CreatePlatformEndpoint"); var request = InstantiateClassGenerator.Execute(); var marshaller = new CreatePlatformEndpointRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); var exception = operation.Exceptions.First(e => e.Name.Equals("InternalErrorException")); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, null, true); var response = CreatePlatformEndpointResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Query")] [TestCategory("SimpleNotificationService")] public void CreatePlatformEndpoint_InvalidParameterExceptionMarshallTest() { var operation = service_model.FindOperation("CreatePlatformEndpoint"); var request = InstantiateClassGenerator.Execute(); var marshaller = new CreatePlatformEndpointRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); var exception = operation.Exceptions.First(e => e.Name.Equals("InvalidParameterException")); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, null, true); var response = CreatePlatformEndpointResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Query")] [TestCategory("SimpleNotificationService")] public void CreatePlatformEndpoint_NotFoundExceptionMarshallTest() { var operation = service_model.FindOperation("CreatePlatformEndpoint"); var request = InstantiateClassGenerator.Execute(); var marshaller = new CreatePlatformEndpointRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); var exception = operation.Exceptions.First(e => e.Name.Equals("NotFoundException")); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, null, true); var response = CreatePlatformEndpointResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Query")] [TestCategory("SimpleNotificationService")] public void CreateSMSSandboxPhoneNumberMarshallTest() { var operation = service_model.FindOperation("CreateSMSSandboxPhoneNumber"); var request = InstantiateClassGenerator.Execute(); var marshaller = new CreateSMSSandboxPhoneNumberRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), false, null); var response = CreateSMSSandboxPhoneNumberResponseUnmarshaller.Instance.Unmarshall(context) as CreateSMSSandboxPhoneNumberResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Query")] [TestCategory("SimpleNotificationService")] public void CreateSMSSandboxPhoneNumber_AuthorizationErrorExceptionMarshallTest() { var operation = service_model.FindOperation("CreateSMSSandboxPhoneNumber"); var request = InstantiateClassGenerator.Execute(); var marshaller = new CreateSMSSandboxPhoneNumberRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); var exception = operation.Exceptions.First(e => e.Name.Equals("AuthorizationErrorException")); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, null, true); var response = CreateSMSSandboxPhoneNumberResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Query")] [TestCategory("SimpleNotificationService")] public void CreateSMSSandboxPhoneNumber_InternalErrorExceptionMarshallTest() { var operation = service_model.FindOperation("CreateSMSSandboxPhoneNumber"); var request = InstantiateClassGenerator.Execute(); var marshaller = new CreateSMSSandboxPhoneNumberRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); var exception = operation.Exceptions.First(e => e.Name.Equals("InternalErrorException")); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, null, true); var response = CreateSMSSandboxPhoneNumberResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Query")] [TestCategory("SimpleNotificationService")] public void CreateSMSSandboxPhoneNumber_InvalidParameterExceptionMarshallTest() { var operation = service_model.FindOperation("CreateSMSSandboxPhoneNumber"); var request = InstantiateClassGenerator.Execute(); var marshaller = new CreateSMSSandboxPhoneNumberRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); var exception = operation.Exceptions.First(e => e.Name.Equals("InvalidParameterException")); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, null, true); var response = CreateSMSSandboxPhoneNumberResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Query")] [TestCategory("SimpleNotificationService")] public void CreateSMSSandboxPhoneNumber_OptedOutExceptionMarshallTest() { var operation = service_model.FindOperation("CreateSMSSandboxPhoneNumber"); var request = InstantiateClassGenerator.Execute(); var marshaller = new CreateSMSSandboxPhoneNumberRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); var exception = operation.Exceptions.First(e => e.Name.Equals("OptedOutException")); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, null, true); var response = CreateSMSSandboxPhoneNumberResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Query")] [TestCategory("SimpleNotificationService")] public void CreateSMSSandboxPhoneNumber_ThrottledExceptionMarshallTest() { var operation = service_model.FindOperation("CreateSMSSandboxPhoneNumber"); var request = InstantiateClassGenerator.Execute(); var marshaller = new CreateSMSSandboxPhoneNumberRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); var exception = operation.Exceptions.First(e => e.Name.Equals("ThrottledException")); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, null, true); var response = CreateSMSSandboxPhoneNumberResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Query")] [TestCategory("SimpleNotificationService")] public void CreateSMSSandboxPhoneNumber_UserErrorExceptionMarshallTest() { var operation = service_model.FindOperation("CreateSMSSandboxPhoneNumber"); var request = InstantiateClassGenerator.Execute(); var marshaller = new CreateSMSSandboxPhoneNumberRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); var exception = operation.Exceptions.First(e => e.Name.Equals("UserErrorException")); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, null, true); var response = CreateSMSSandboxPhoneNumberResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Query")] [TestCategory("SimpleNotificationService")] public void CreateTopicMarshallTest() { var operation = service_model.FindOperation("CreateTopic"); var request = InstantiateClassGenerator.Execute(); var marshaller = new CreateTopicRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), false, null); var response = CreateTopicResponseUnmarshaller.Instance.Unmarshall(context) as CreateTopicResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Query")] [TestCategory("SimpleNotificationService")] public void CreateTopic_AuthorizationErrorExceptionMarshallTest() { var operation = service_model.FindOperation("CreateTopic"); var request = InstantiateClassGenerator.Execute(); var marshaller = new CreateTopicRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); var exception = operation.Exceptions.First(e => e.Name.Equals("AuthorizationErrorException")); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, null, true); var response = CreateTopicResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Query")] [TestCategory("SimpleNotificationService")] public void CreateTopic_ConcurrentAccessExceptionMarshallTest() { var operation = service_model.FindOperation("CreateTopic"); var request = InstantiateClassGenerator.Execute(); var marshaller = new CreateTopicRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); var exception = operation.Exceptions.First(e => e.Name.Equals("ConcurrentAccessException")); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, null, true); var response = CreateTopicResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Query")] [TestCategory("SimpleNotificationService")] public void CreateTopic_InternalErrorExceptionMarshallTest() { var operation = service_model.FindOperation("CreateTopic"); var request = InstantiateClassGenerator.Execute(); var marshaller = new CreateTopicRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); var exception = operation.Exceptions.First(e => e.Name.Equals("InternalErrorException")); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, null, true); var response = CreateTopicResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Query")] [TestCategory("SimpleNotificationService")] public void CreateTopic_InvalidParameterExceptionMarshallTest() { var operation = service_model.FindOperation("CreateTopic"); var request = InstantiateClassGenerator.Execute(); var marshaller = new CreateTopicRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); var exception = operation.Exceptions.First(e => e.Name.Equals("InvalidParameterException")); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, null, true); var response = CreateTopicResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Query")] [TestCategory("SimpleNotificationService")] public void CreateTopic_InvalidSecurityExceptionMarshallTest() { var operation = service_model.FindOperation("CreateTopic"); var request = InstantiateClassGenerator.Execute(); var marshaller = new CreateTopicRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); var exception = operation.Exceptions.First(e => e.Name.Equals("InvalidSecurityException")); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, null, true); var response = CreateTopicResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Query")] [TestCategory("SimpleNotificationService")] public void CreateTopic_StaleTagExceptionMarshallTest() { var operation = service_model.FindOperation("CreateTopic"); var request = InstantiateClassGenerator.Execute(); var marshaller = new CreateTopicRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); var exception = operation.Exceptions.First(e => e.Name.Equals("StaleTagException")); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, null, true); var response = CreateTopicResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Query")] [TestCategory("SimpleNotificationService")] public void CreateTopic_TagLimitExceededExceptionMarshallTest() { var operation = service_model.FindOperation("CreateTopic"); var request = InstantiateClassGenerator.Execute(); var marshaller = new CreateTopicRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); var exception = operation.Exceptions.First(e => e.Name.Equals("TagLimitExceededException")); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, null, true); var response = CreateTopicResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Query")] [TestCategory("SimpleNotificationService")] public void CreateTopic_TagPolicyExceptionMarshallTest() { var operation = service_model.FindOperation("CreateTopic"); var request = InstantiateClassGenerator.Execute(); var marshaller = new CreateTopicRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); var exception = operation.Exceptions.First(e => e.Name.Equals("TagPolicyException")); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, null, true); var response = CreateTopicResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Query")] [TestCategory("SimpleNotificationService")] public void CreateTopic_TopicLimitExceededExceptionMarshallTest() { var operation = service_model.FindOperation("CreateTopic"); var request = InstantiateClassGenerator.Execute(); var marshaller = new CreateTopicRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); var exception = operation.Exceptions.First(e => e.Name.Equals("TopicLimitExceededException")); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, null, true); var response = CreateTopicResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Query")] [TestCategory("SimpleNotificationService")] public void DeleteEndpointMarshallTest() { var operation = service_model.FindOperation("DeleteEndpoint"); var request = InstantiateClassGenerator.Execute(); var marshaller = new DeleteEndpointRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Query")] [TestCategory("SimpleNotificationService")] public void DeleteEndpoint_AuthorizationErrorExceptionMarshallTest() { var operation = service_model.FindOperation("DeleteEndpoint"); var request = InstantiateClassGenerator.Execute(); var marshaller = new DeleteEndpointRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); var exception = operation.Exceptions.First(e => e.Name.Equals("AuthorizationErrorException")); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, null, true); var response = DeleteEndpointResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Query")] [TestCategory("SimpleNotificationService")] public void DeleteEndpoint_InternalErrorExceptionMarshallTest() { var operation = service_model.FindOperation("DeleteEndpoint"); var request = InstantiateClassGenerator.Execute(); var marshaller = new DeleteEndpointRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); var exception = operation.Exceptions.First(e => e.Name.Equals("InternalErrorException")); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, null, true); var response = DeleteEndpointResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Query")] [TestCategory("SimpleNotificationService")] public void DeleteEndpoint_InvalidParameterExceptionMarshallTest() { var operation = service_model.FindOperation("DeleteEndpoint"); var request = InstantiateClassGenerator.Execute(); var marshaller = new DeleteEndpointRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); var exception = operation.Exceptions.First(e => e.Name.Equals("InvalidParameterException")); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, null, true); var response = DeleteEndpointResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Query")] [TestCategory("SimpleNotificationService")] public void DeletePlatformApplicationMarshallTest() { var operation = service_model.FindOperation("DeletePlatformApplication"); var request = InstantiateClassGenerator.Execute(); var marshaller = new DeletePlatformApplicationRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Query")] [TestCategory("SimpleNotificationService")] public void DeletePlatformApplication_AuthorizationErrorExceptionMarshallTest() { var operation = service_model.FindOperation("DeletePlatformApplication"); var request = InstantiateClassGenerator.Execute(); var marshaller = new DeletePlatformApplicationRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); var exception = operation.Exceptions.First(e => e.Name.Equals("AuthorizationErrorException")); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, null, true); var response = DeletePlatformApplicationResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Query")] [TestCategory("SimpleNotificationService")] public void DeletePlatformApplication_InternalErrorExceptionMarshallTest() { var operation = service_model.FindOperation("DeletePlatformApplication"); var request = InstantiateClassGenerator.Execute(); var marshaller = new DeletePlatformApplicationRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); var exception = operation.Exceptions.First(e => e.Name.Equals("InternalErrorException")); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, null, true); var response = DeletePlatformApplicationResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Query")] [TestCategory("SimpleNotificationService")] public void DeletePlatformApplication_InvalidParameterExceptionMarshallTest() { var operation = service_model.FindOperation("DeletePlatformApplication"); var request = InstantiateClassGenerator.Execute(); var marshaller = new DeletePlatformApplicationRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); var exception = operation.Exceptions.First(e => e.Name.Equals("InvalidParameterException")); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, null, true); var response = DeletePlatformApplicationResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Query")] [TestCategory("SimpleNotificationService")] public void DeleteSMSSandboxPhoneNumberMarshallTest() { var operation = service_model.FindOperation("DeleteSMSSandboxPhoneNumber"); var request = InstantiateClassGenerator.Execute(); var marshaller = new DeleteSMSSandboxPhoneNumberRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), false, null); var response = DeleteSMSSandboxPhoneNumberResponseUnmarshaller.Instance.Unmarshall(context) as DeleteSMSSandboxPhoneNumberResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Query")] [TestCategory("SimpleNotificationService")] public void DeleteSMSSandboxPhoneNumber_AuthorizationErrorExceptionMarshallTest() { var operation = service_model.FindOperation("DeleteSMSSandboxPhoneNumber"); var request = InstantiateClassGenerator.Execute(); var marshaller = new DeleteSMSSandboxPhoneNumberRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); var exception = operation.Exceptions.First(e => e.Name.Equals("AuthorizationErrorException")); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, null, true); var response = DeleteSMSSandboxPhoneNumberResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Query")] [TestCategory("SimpleNotificationService")] public void DeleteSMSSandboxPhoneNumber_InternalErrorExceptionMarshallTest() { var operation = service_model.FindOperation("DeleteSMSSandboxPhoneNumber"); var request = InstantiateClassGenerator.Execute(); var marshaller = new DeleteSMSSandboxPhoneNumberRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); var exception = operation.Exceptions.First(e => e.Name.Equals("InternalErrorException")); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, null, true); var response = DeleteSMSSandboxPhoneNumberResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Query")] [TestCategory("SimpleNotificationService")] public void DeleteSMSSandboxPhoneNumber_InvalidParameterExceptionMarshallTest() { var operation = service_model.FindOperation("DeleteSMSSandboxPhoneNumber"); var request = InstantiateClassGenerator.Execute(); var marshaller = new DeleteSMSSandboxPhoneNumberRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); var exception = operation.Exceptions.First(e => e.Name.Equals("InvalidParameterException")); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, null, true); var response = DeleteSMSSandboxPhoneNumberResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Query")] [TestCategory("SimpleNotificationService")] public void DeleteSMSSandboxPhoneNumber_ResourceNotFoundExceptionMarshallTest() { var operation = service_model.FindOperation("DeleteSMSSandboxPhoneNumber"); var request = InstantiateClassGenerator.Execute(); var marshaller = new DeleteSMSSandboxPhoneNumberRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); var exception = operation.Exceptions.First(e => e.Name.Equals("ResourceNotFoundException")); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, null, true); var response = DeleteSMSSandboxPhoneNumberResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Query")] [TestCategory("SimpleNotificationService")] public void DeleteSMSSandboxPhoneNumber_ThrottledExceptionMarshallTest() { var operation = service_model.FindOperation("DeleteSMSSandboxPhoneNumber"); var request = InstantiateClassGenerator.Execute(); var marshaller = new DeleteSMSSandboxPhoneNumberRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); var exception = operation.Exceptions.First(e => e.Name.Equals("ThrottledException")); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, null, true); var response = DeleteSMSSandboxPhoneNumberResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Query")] [TestCategory("SimpleNotificationService")] public void DeleteSMSSandboxPhoneNumber_UserErrorExceptionMarshallTest() { var operation = service_model.FindOperation("DeleteSMSSandboxPhoneNumber"); var request = InstantiateClassGenerator.Execute(); var marshaller = new DeleteSMSSandboxPhoneNumberRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); var exception = operation.Exceptions.First(e => e.Name.Equals("UserErrorException")); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, null, true); var response = DeleteSMSSandboxPhoneNumberResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Query")] [TestCategory("SimpleNotificationService")] public void DeleteTopicMarshallTest() { var operation = service_model.FindOperation("DeleteTopic"); var request = InstantiateClassGenerator.Execute(); var marshaller = new DeleteTopicRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Query")] [TestCategory("SimpleNotificationService")] public void DeleteTopic_AuthorizationErrorExceptionMarshallTest() { var operation = service_model.FindOperation("DeleteTopic"); var request = InstantiateClassGenerator.Execute(); var marshaller = new DeleteTopicRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); var exception = operation.Exceptions.First(e => e.Name.Equals("AuthorizationErrorException")); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, null, true); var response = DeleteTopicResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Query")] [TestCategory("SimpleNotificationService")] public void DeleteTopic_ConcurrentAccessExceptionMarshallTest() { var operation = service_model.FindOperation("DeleteTopic"); var request = InstantiateClassGenerator.Execute(); var marshaller = new DeleteTopicRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); var exception = operation.Exceptions.First(e => e.Name.Equals("ConcurrentAccessException")); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, null, true); var response = DeleteTopicResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Query")] [TestCategory("SimpleNotificationService")] public void DeleteTopic_InternalErrorExceptionMarshallTest() { var operation = service_model.FindOperation("DeleteTopic"); var request = InstantiateClassGenerator.Execute(); var marshaller = new DeleteTopicRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); var exception = operation.Exceptions.First(e => e.Name.Equals("InternalErrorException")); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, null, true); var response = DeleteTopicResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Query")] [TestCategory("SimpleNotificationService")] public void DeleteTopic_InvalidParameterExceptionMarshallTest() { var operation = service_model.FindOperation("DeleteTopic"); var request = InstantiateClassGenerator.Execute(); var marshaller = new DeleteTopicRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); var exception = operation.Exceptions.First(e => e.Name.Equals("InvalidParameterException")); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, null, true); var response = DeleteTopicResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Query")] [TestCategory("SimpleNotificationService")] public void DeleteTopic_NotFoundExceptionMarshallTest() { var operation = service_model.FindOperation("DeleteTopic"); var request = InstantiateClassGenerator.Execute(); var marshaller = new DeleteTopicRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); var exception = operation.Exceptions.First(e => e.Name.Equals("NotFoundException")); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, null, true); var response = DeleteTopicResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Query")] [TestCategory("SimpleNotificationService")] public void DeleteTopic_StaleTagExceptionMarshallTest() { var operation = service_model.FindOperation("DeleteTopic"); var request = InstantiateClassGenerator.Execute(); var marshaller = new DeleteTopicRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); var exception = operation.Exceptions.First(e => e.Name.Equals("StaleTagException")); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, null, true); var response = DeleteTopicResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Query")] [TestCategory("SimpleNotificationService")] public void DeleteTopic_TagPolicyExceptionMarshallTest() { var operation = service_model.FindOperation("DeleteTopic"); var request = InstantiateClassGenerator.Execute(); var marshaller = new DeleteTopicRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); var exception = operation.Exceptions.First(e => e.Name.Equals("TagPolicyException")); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, null, true); var response = DeleteTopicResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Query")] [TestCategory("SimpleNotificationService")] public void GetDataProtectionPolicyMarshallTest() { var operation = service_model.FindOperation("GetDataProtectionPolicy"); var request = InstantiateClassGenerator.Execute(); var marshaller = new GetDataProtectionPolicyRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), false, null); var response = GetDataProtectionPolicyResponseUnmarshaller.Instance.Unmarshall(context) as GetDataProtectionPolicyResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Query")] [TestCategory("SimpleNotificationService")] public void GetDataProtectionPolicy_AuthorizationErrorExceptionMarshallTest() { var operation = service_model.FindOperation("GetDataProtectionPolicy"); var request = InstantiateClassGenerator.Execute(); var marshaller = new GetDataProtectionPolicyRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); var exception = operation.Exceptions.First(e => e.Name.Equals("AuthorizationErrorException")); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, null, true); var response = GetDataProtectionPolicyResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Query")] [TestCategory("SimpleNotificationService")] public void GetDataProtectionPolicy_InternalErrorExceptionMarshallTest() { var operation = service_model.FindOperation("GetDataProtectionPolicy"); var request = InstantiateClassGenerator.Execute(); var marshaller = new GetDataProtectionPolicyRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); var exception = operation.Exceptions.First(e => e.Name.Equals("InternalErrorException")); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, null, true); var response = GetDataProtectionPolicyResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Query")] [TestCategory("SimpleNotificationService")] public void GetDataProtectionPolicy_InvalidParameterExceptionMarshallTest() { var operation = service_model.FindOperation("GetDataProtectionPolicy"); var request = InstantiateClassGenerator.Execute(); var marshaller = new GetDataProtectionPolicyRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); var exception = operation.Exceptions.First(e => e.Name.Equals("InvalidParameterException")); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, null, true); var response = GetDataProtectionPolicyResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Query")] [TestCategory("SimpleNotificationService")] public void GetDataProtectionPolicy_InvalidSecurityExceptionMarshallTest() { var operation = service_model.FindOperation("GetDataProtectionPolicy"); var request = InstantiateClassGenerator.Execute(); var marshaller = new GetDataProtectionPolicyRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); var exception = operation.Exceptions.First(e => e.Name.Equals("InvalidSecurityException")); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, null, true); var response = GetDataProtectionPolicyResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Query")] [TestCategory("SimpleNotificationService")] public void GetDataProtectionPolicy_NotFoundExceptionMarshallTest() { var operation = service_model.FindOperation("GetDataProtectionPolicy"); var request = InstantiateClassGenerator.Execute(); var marshaller = new GetDataProtectionPolicyRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); var exception = operation.Exceptions.First(e => e.Name.Equals("NotFoundException")); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, null, true); var response = GetDataProtectionPolicyResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Query")] [TestCategory("SimpleNotificationService")] public void GetEndpointAttributesMarshallTest() { var operation = service_model.FindOperation("GetEndpointAttributes"); var request = InstantiateClassGenerator.Execute(); var marshaller = new GetEndpointAttributesRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), false, null); var response = GetEndpointAttributesResponseUnmarshaller.Instance.Unmarshall(context) as GetEndpointAttributesResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Query")] [TestCategory("SimpleNotificationService")] public void GetEndpointAttributes_AuthorizationErrorExceptionMarshallTest() { var operation = service_model.FindOperation("GetEndpointAttributes"); var request = InstantiateClassGenerator.Execute(); var marshaller = new GetEndpointAttributesRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); var exception = operation.Exceptions.First(e => e.Name.Equals("AuthorizationErrorException")); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, null, true); var response = GetEndpointAttributesResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Query")] [TestCategory("SimpleNotificationService")] public void GetEndpointAttributes_InternalErrorExceptionMarshallTest() { var operation = service_model.FindOperation("GetEndpointAttributes"); var request = InstantiateClassGenerator.Execute(); var marshaller = new GetEndpointAttributesRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); var exception = operation.Exceptions.First(e => e.Name.Equals("InternalErrorException")); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, null, true); var response = GetEndpointAttributesResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Query")] [TestCategory("SimpleNotificationService")] public void GetEndpointAttributes_InvalidParameterExceptionMarshallTest() { var operation = service_model.FindOperation("GetEndpointAttributes"); var request = InstantiateClassGenerator.Execute(); var marshaller = new GetEndpointAttributesRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); var exception = operation.Exceptions.First(e => e.Name.Equals("InvalidParameterException")); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, null, true); var response = GetEndpointAttributesResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Query")] [TestCategory("SimpleNotificationService")] public void GetEndpointAttributes_NotFoundExceptionMarshallTest() { var operation = service_model.FindOperation("GetEndpointAttributes"); var request = InstantiateClassGenerator.Execute(); var marshaller = new GetEndpointAttributesRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); var exception = operation.Exceptions.First(e => e.Name.Equals("NotFoundException")); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, null, true); var response = GetEndpointAttributesResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Query")] [TestCategory("SimpleNotificationService")] public void GetPlatformApplicationAttributesMarshallTest() { var operation = service_model.FindOperation("GetPlatformApplicationAttributes"); var request = InstantiateClassGenerator.Execute(); var marshaller = new GetPlatformApplicationAttributesRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), false, null); var response = GetPlatformApplicationAttributesResponseUnmarshaller.Instance.Unmarshall(context) as GetPlatformApplicationAttributesResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Query")] [TestCategory("SimpleNotificationService")] public void GetPlatformApplicationAttributes_AuthorizationErrorExceptionMarshallTest() { var operation = service_model.FindOperation("GetPlatformApplicationAttributes"); var request = InstantiateClassGenerator.Execute(); var marshaller = new GetPlatformApplicationAttributesRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); var exception = operation.Exceptions.First(e => e.Name.Equals("AuthorizationErrorException")); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, null, true); var response = GetPlatformApplicationAttributesResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Query")] [TestCategory("SimpleNotificationService")] public void GetPlatformApplicationAttributes_InternalErrorExceptionMarshallTest() { var operation = service_model.FindOperation("GetPlatformApplicationAttributes"); var request = InstantiateClassGenerator.Execute(); var marshaller = new GetPlatformApplicationAttributesRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); var exception = operation.Exceptions.First(e => e.Name.Equals("InternalErrorException")); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, null, true); var response = GetPlatformApplicationAttributesResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Query")] [TestCategory("SimpleNotificationService")] public void GetPlatformApplicationAttributes_InvalidParameterExceptionMarshallTest() { var operation = service_model.FindOperation("GetPlatformApplicationAttributes"); var request = InstantiateClassGenerator.Execute(); var marshaller = new GetPlatformApplicationAttributesRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); var exception = operation.Exceptions.First(e => e.Name.Equals("InvalidParameterException")); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, null, true); var response = GetPlatformApplicationAttributesResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Query")] [TestCategory("SimpleNotificationService")] public void GetPlatformApplicationAttributes_NotFoundExceptionMarshallTest() { var operation = service_model.FindOperation("GetPlatformApplicationAttributes"); var request = InstantiateClassGenerator.Execute(); var marshaller = new GetPlatformApplicationAttributesRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); var exception = operation.Exceptions.First(e => e.Name.Equals("NotFoundException")); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, null, true); var response = GetPlatformApplicationAttributesResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Query")] [TestCategory("SimpleNotificationService")] public void GetSMSAttributesMarshallTest() { var operation = service_model.FindOperation("GetSMSAttributes"); var request = InstantiateClassGenerator.Execute(); var marshaller = new GetSMSAttributesRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), false, null); var response = GetSMSAttributesResponseUnmarshaller.Instance.Unmarshall(context) as GetSMSAttributesResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Query")] [TestCategory("SimpleNotificationService")] public void GetSMSAttributes_AuthorizationErrorExceptionMarshallTest() { var operation = service_model.FindOperation("GetSMSAttributes"); var request = InstantiateClassGenerator.Execute(); var marshaller = new GetSMSAttributesRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); var exception = operation.Exceptions.First(e => e.Name.Equals("AuthorizationErrorException")); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, null, true); var response = GetSMSAttributesResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Query")] [TestCategory("SimpleNotificationService")] public void GetSMSAttributes_InternalErrorExceptionMarshallTest() { var operation = service_model.FindOperation("GetSMSAttributes"); var request = InstantiateClassGenerator.Execute(); var marshaller = new GetSMSAttributesRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); var exception = operation.Exceptions.First(e => e.Name.Equals("InternalErrorException")); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, null, true); var response = GetSMSAttributesResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Query")] [TestCategory("SimpleNotificationService")] public void GetSMSAttributes_InvalidParameterExceptionMarshallTest() { var operation = service_model.FindOperation("GetSMSAttributes"); var request = InstantiateClassGenerator.Execute(); var marshaller = new GetSMSAttributesRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); var exception = operation.Exceptions.First(e => e.Name.Equals("InvalidParameterException")); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, null, true); var response = GetSMSAttributesResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Query")] [TestCategory("SimpleNotificationService")] public void GetSMSAttributes_ThrottledExceptionMarshallTest() { var operation = service_model.FindOperation("GetSMSAttributes"); var request = InstantiateClassGenerator.Execute(); var marshaller = new GetSMSAttributesRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); var exception = operation.Exceptions.First(e => e.Name.Equals("ThrottledException")); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, null, true); var response = GetSMSAttributesResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Query")] [TestCategory("SimpleNotificationService")] public void GetSMSSandboxAccountStatusMarshallTest() { var operation = service_model.FindOperation("GetSMSSandboxAccountStatus"); var request = InstantiateClassGenerator.Execute(); var marshaller = new GetSMSSandboxAccountStatusRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), false, null); var response = GetSMSSandboxAccountStatusResponseUnmarshaller.Instance.Unmarshall(context) as GetSMSSandboxAccountStatusResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Query")] [TestCategory("SimpleNotificationService")] public void GetSMSSandboxAccountStatus_AuthorizationErrorExceptionMarshallTest() { var operation = service_model.FindOperation("GetSMSSandboxAccountStatus"); var request = InstantiateClassGenerator.Execute(); var marshaller = new GetSMSSandboxAccountStatusRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); var exception = operation.Exceptions.First(e => e.Name.Equals("AuthorizationErrorException")); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, null, true); var response = GetSMSSandboxAccountStatusResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Query")] [TestCategory("SimpleNotificationService")] public void GetSMSSandboxAccountStatus_InternalErrorExceptionMarshallTest() { var operation = service_model.FindOperation("GetSMSSandboxAccountStatus"); var request = InstantiateClassGenerator.Execute(); var marshaller = new GetSMSSandboxAccountStatusRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); var exception = operation.Exceptions.First(e => e.Name.Equals("InternalErrorException")); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, null, true); var response = GetSMSSandboxAccountStatusResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Query")] [TestCategory("SimpleNotificationService")] public void GetSMSSandboxAccountStatus_ThrottledExceptionMarshallTest() { var operation = service_model.FindOperation("GetSMSSandboxAccountStatus"); var request = InstantiateClassGenerator.Execute(); var marshaller = new GetSMSSandboxAccountStatusRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); var exception = operation.Exceptions.First(e => e.Name.Equals("ThrottledException")); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, null, true); var response = GetSMSSandboxAccountStatusResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Query")] [TestCategory("SimpleNotificationService")] public void GetSubscriptionAttributesMarshallTest() { var operation = service_model.FindOperation("GetSubscriptionAttributes"); var request = InstantiateClassGenerator.Execute(); var marshaller = new GetSubscriptionAttributesRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), false, null); var response = GetSubscriptionAttributesResponseUnmarshaller.Instance.Unmarshall(context) as GetSubscriptionAttributesResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Query")] [TestCategory("SimpleNotificationService")] public void GetSubscriptionAttributes_AuthorizationErrorExceptionMarshallTest() { var operation = service_model.FindOperation("GetSubscriptionAttributes"); var request = InstantiateClassGenerator.Execute(); var marshaller = new GetSubscriptionAttributesRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); var exception = operation.Exceptions.First(e => e.Name.Equals("AuthorizationErrorException")); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, null, true); var response = GetSubscriptionAttributesResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Query")] [TestCategory("SimpleNotificationService")] public void GetSubscriptionAttributes_InternalErrorExceptionMarshallTest() { var operation = service_model.FindOperation("GetSubscriptionAttributes"); var request = InstantiateClassGenerator.Execute(); var marshaller = new GetSubscriptionAttributesRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); var exception = operation.Exceptions.First(e => e.Name.Equals("InternalErrorException")); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, null, true); var response = GetSubscriptionAttributesResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Query")] [TestCategory("SimpleNotificationService")] public void GetSubscriptionAttributes_InvalidParameterExceptionMarshallTest() { var operation = service_model.FindOperation("GetSubscriptionAttributes"); var request = InstantiateClassGenerator.Execute(); var marshaller = new GetSubscriptionAttributesRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); var exception = operation.Exceptions.First(e => e.Name.Equals("InvalidParameterException")); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, null, true); var response = GetSubscriptionAttributesResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Query")] [TestCategory("SimpleNotificationService")] public void GetSubscriptionAttributes_NotFoundExceptionMarshallTest() { var operation = service_model.FindOperation("GetSubscriptionAttributes"); var request = InstantiateClassGenerator.Execute(); var marshaller = new GetSubscriptionAttributesRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); var exception = operation.Exceptions.First(e => e.Name.Equals("NotFoundException")); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, null, true); var response = GetSubscriptionAttributesResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Query")] [TestCategory("SimpleNotificationService")] public void GetTopicAttributesMarshallTest() { var operation = service_model.FindOperation("GetTopicAttributes"); var request = InstantiateClassGenerator.Execute(); var marshaller = new GetTopicAttributesRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), false, null); var response = GetTopicAttributesResponseUnmarshaller.Instance.Unmarshall(context) as GetTopicAttributesResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Query")] [TestCategory("SimpleNotificationService")] public void GetTopicAttributes_AuthorizationErrorExceptionMarshallTest() { var operation = service_model.FindOperation("GetTopicAttributes"); var request = InstantiateClassGenerator.Execute(); var marshaller = new GetTopicAttributesRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); var exception = operation.Exceptions.First(e => e.Name.Equals("AuthorizationErrorException")); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, null, true); var response = GetTopicAttributesResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Query")] [TestCategory("SimpleNotificationService")] public void GetTopicAttributes_InternalErrorExceptionMarshallTest() { var operation = service_model.FindOperation("GetTopicAttributes"); var request = InstantiateClassGenerator.Execute(); var marshaller = new GetTopicAttributesRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); var exception = operation.Exceptions.First(e => e.Name.Equals("InternalErrorException")); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, null, true); var response = GetTopicAttributesResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Query")] [TestCategory("SimpleNotificationService")] public void GetTopicAttributes_InvalidParameterExceptionMarshallTest() { var operation = service_model.FindOperation("GetTopicAttributes"); var request = InstantiateClassGenerator.Execute(); var marshaller = new GetTopicAttributesRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); var exception = operation.Exceptions.First(e => e.Name.Equals("InvalidParameterException")); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, null, true); var response = GetTopicAttributesResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Query")] [TestCategory("SimpleNotificationService")] public void GetTopicAttributes_InvalidSecurityExceptionMarshallTest() { var operation = service_model.FindOperation("GetTopicAttributes"); var request = InstantiateClassGenerator.Execute(); var marshaller = new GetTopicAttributesRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); var exception = operation.Exceptions.First(e => e.Name.Equals("InvalidSecurityException")); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, null, true); var response = GetTopicAttributesResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Query")] [TestCategory("SimpleNotificationService")] public void GetTopicAttributes_NotFoundExceptionMarshallTest() { var operation = service_model.FindOperation("GetTopicAttributes"); var request = InstantiateClassGenerator.Execute(); var marshaller = new GetTopicAttributesRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); var exception = operation.Exceptions.First(e => e.Name.Equals("NotFoundException")); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, null, true); var response = GetTopicAttributesResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Query")] [TestCategory("SimpleNotificationService")] public void ListEndpointsByPlatformApplicationMarshallTest() { var operation = service_model.FindOperation("ListEndpointsByPlatformApplication"); var request = InstantiateClassGenerator.Execute(); var marshaller = new ListEndpointsByPlatformApplicationRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), false, null); var response = ListEndpointsByPlatformApplicationResponseUnmarshaller.Instance.Unmarshall(context) as ListEndpointsByPlatformApplicationResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Query")] [TestCategory("SimpleNotificationService")] public void ListEndpointsByPlatformApplication_AuthorizationErrorExceptionMarshallTest() { var operation = service_model.FindOperation("ListEndpointsByPlatformApplication"); var request = InstantiateClassGenerator.Execute(); var marshaller = new ListEndpointsByPlatformApplicationRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); var exception = operation.Exceptions.First(e => e.Name.Equals("AuthorizationErrorException")); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, null, true); var response = ListEndpointsByPlatformApplicationResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Query")] [TestCategory("SimpleNotificationService")] public void ListEndpointsByPlatformApplication_InternalErrorExceptionMarshallTest() { var operation = service_model.FindOperation("ListEndpointsByPlatformApplication"); var request = InstantiateClassGenerator.Execute(); var marshaller = new ListEndpointsByPlatformApplicationRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); var exception = operation.Exceptions.First(e => e.Name.Equals("InternalErrorException")); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, null, true); var response = ListEndpointsByPlatformApplicationResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Query")] [TestCategory("SimpleNotificationService")] public void ListEndpointsByPlatformApplication_InvalidParameterExceptionMarshallTest() { var operation = service_model.FindOperation("ListEndpointsByPlatformApplication"); var request = InstantiateClassGenerator.Execute(); var marshaller = new ListEndpointsByPlatformApplicationRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); var exception = operation.Exceptions.First(e => e.Name.Equals("InvalidParameterException")); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, null, true); var response = ListEndpointsByPlatformApplicationResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Query")] [TestCategory("SimpleNotificationService")] public void ListEndpointsByPlatformApplication_NotFoundExceptionMarshallTest() { var operation = service_model.FindOperation("ListEndpointsByPlatformApplication"); var request = InstantiateClassGenerator.Execute(); var marshaller = new ListEndpointsByPlatformApplicationRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); var exception = operation.Exceptions.First(e => e.Name.Equals("NotFoundException")); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, null, true); var response = ListEndpointsByPlatformApplicationResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Query")] [TestCategory("SimpleNotificationService")] public void ListOriginationNumbersMarshallTest() { var operation = service_model.FindOperation("ListOriginationNumbers"); var request = InstantiateClassGenerator.Execute(); var marshaller = new ListOriginationNumbersRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), false, null); var response = ListOriginationNumbersResponseUnmarshaller.Instance.Unmarshall(context) as ListOriginationNumbersResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Query")] [TestCategory("SimpleNotificationService")] public void ListOriginationNumbers_AuthorizationErrorExceptionMarshallTest() { var operation = service_model.FindOperation("ListOriginationNumbers"); var request = InstantiateClassGenerator.Execute(); var marshaller = new ListOriginationNumbersRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); var exception = operation.Exceptions.First(e => e.Name.Equals("AuthorizationErrorException")); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, null, true); var response = ListOriginationNumbersResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Query")] [TestCategory("SimpleNotificationService")] public void ListOriginationNumbers_InternalErrorExceptionMarshallTest() { var operation = service_model.FindOperation("ListOriginationNumbers"); var request = InstantiateClassGenerator.Execute(); var marshaller = new ListOriginationNumbersRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); var exception = operation.Exceptions.First(e => e.Name.Equals("InternalErrorException")); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, null, true); var response = ListOriginationNumbersResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Query")] [TestCategory("SimpleNotificationService")] public void ListOriginationNumbers_InvalidParameterExceptionMarshallTest() { var operation = service_model.FindOperation("ListOriginationNumbers"); var request = InstantiateClassGenerator.Execute(); var marshaller = new ListOriginationNumbersRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); var exception = operation.Exceptions.First(e => e.Name.Equals("InvalidParameterException")); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, null, true); var response = ListOriginationNumbersResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Query")] [TestCategory("SimpleNotificationService")] public void ListOriginationNumbers_ThrottledExceptionMarshallTest() { var operation = service_model.FindOperation("ListOriginationNumbers"); var request = InstantiateClassGenerator.Execute(); var marshaller = new ListOriginationNumbersRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); var exception = operation.Exceptions.First(e => e.Name.Equals("ThrottledException")); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, null, true); var response = ListOriginationNumbersResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Query")] [TestCategory("SimpleNotificationService")] public void ListOriginationNumbers_ValidationExceptionMarshallTest() { var operation = service_model.FindOperation("ListOriginationNumbers"); var request = InstantiateClassGenerator.Execute(); var marshaller = new ListOriginationNumbersRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); var exception = operation.Exceptions.First(e => e.Name.Equals("ValidationException")); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, null, true); var response = ListOriginationNumbersResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Query")] [TestCategory("SimpleNotificationService")] public void ListPhoneNumbersOptedOutMarshallTest() { var operation = service_model.FindOperation("ListPhoneNumbersOptedOut"); var request = InstantiateClassGenerator.Execute(); var marshaller = new ListPhoneNumbersOptedOutRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), false, null); var response = ListPhoneNumbersOptedOutResponseUnmarshaller.Instance.Unmarshall(context) as ListPhoneNumbersOptedOutResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Query")] [TestCategory("SimpleNotificationService")] public void ListPhoneNumbersOptedOut_AuthorizationErrorExceptionMarshallTest() { var operation = service_model.FindOperation("ListPhoneNumbersOptedOut"); var request = InstantiateClassGenerator.Execute(); var marshaller = new ListPhoneNumbersOptedOutRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); var exception = operation.Exceptions.First(e => e.Name.Equals("AuthorizationErrorException")); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, null, true); var response = ListPhoneNumbersOptedOutResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Query")] [TestCategory("SimpleNotificationService")] public void ListPhoneNumbersOptedOut_InternalErrorExceptionMarshallTest() { var operation = service_model.FindOperation("ListPhoneNumbersOptedOut"); var request = InstantiateClassGenerator.Execute(); var marshaller = new ListPhoneNumbersOptedOutRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); var exception = operation.Exceptions.First(e => e.Name.Equals("InternalErrorException")); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, null, true); var response = ListPhoneNumbersOptedOutResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Query")] [TestCategory("SimpleNotificationService")] public void ListPhoneNumbersOptedOut_InvalidParameterExceptionMarshallTest() { var operation = service_model.FindOperation("ListPhoneNumbersOptedOut"); var request = InstantiateClassGenerator.Execute(); var marshaller = new ListPhoneNumbersOptedOutRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); var exception = operation.Exceptions.First(e => e.Name.Equals("InvalidParameterException")); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, null, true); var response = ListPhoneNumbersOptedOutResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Query")] [TestCategory("SimpleNotificationService")] public void ListPhoneNumbersOptedOut_ThrottledExceptionMarshallTest() { var operation = service_model.FindOperation("ListPhoneNumbersOptedOut"); var request = InstantiateClassGenerator.Execute(); var marshaller = new ListPhoneNumbersOptedOutRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); var exception = operation.Exceptions.First(e => e.Name.Equals("ThrottledException")); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, null, true); var response = ListPhoneNumbersOptedOutResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Query")] [TestCategory("SimpleNotificationService")] public void ListPlatformApplicationsMarshallTest() { var operation = service_model.FindOperation("ListPlatformApplications"); var request = InstantiateClassGenerator.Execute(); var marshaller = new ListPlatformApplicationsRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), false, null); var response = ListPlatformApplicationsResponseUnmarshaller.Instance.Unmarshall(context) as ListPlatformApplicationsResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Query")] [TestCategory("SimpleNotificationService")] public void ListPlatformApplications_AuthorizationErrorExceptionMarshallTest() { var operation = service_model.FindOperation("ListPlatformApplications"); var request = InstantiateClassGenerator.Execute(); var marshaller = new ListPlatformApplicationsRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); var exception = operation.Exceptions.First(e => e.Name.Equals("AuthorizationErrorException")); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, null, true); var response = ListPlatformApplicationsResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Query")] [TestCategory("SimpleNotificationService")] public void ListPlatformApplications_InternalErrorExceptionMarshallTest() { var operation = service_model.FindOperation("ListPlatformApplications"); var request = InstantiateClassGenerator.Execute(); var marshaller = new ListPlatformApplicationsRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); var exception = operation.Exceptions.First(e => e.Name.Equals("InternalErrorException")); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, null, true); var response = ListPlatformApplicationsResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Query")] [TestCategory("SimpleNotificationService")] public void ListPlatformApplications_InvalidParameterExceptionMarshallTest() { var operation = service_model.FindOperation("ListPlatformApplications"); var request = InstantiateClassGenerator.Execute(); var marshaller = new ListPlatformApplicationsRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); var exception = operation.Exceptions.First(e => e.Name.Equals("InvalidParameterException")); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, null, true); var response = ListPlatformApplicationsResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Query")] [TestCategory("SimpleNotificationService")] public void ListSMSSandboxPhoneNumbersMarshallTest() { var operation = service_model.FindOperation("ListSMSSandboxPhoneNumbers"); var request = InstantiateClassGenerator.Execute(); var marshaller = new ListSMSSandboxPhoneNumbersRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), false, null); var response = ListSMSSandboxPhoneNumbersResponseUnmarshaller.Instance.Unmarshall(context) as ListSMSSandboxPhoneNumbersResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Query")] [TestCategory("SimpleNotificationService")] public void ListSMSSandboxPhoneNumbers_AuthorizationErrorExceptionMarshallTest() { var operation = service_model.FindOperation("ListSMSSandboxPhoneNumbers"); var request = InstantiateClassGenerator.Execute(); var marshaller = new ListSMSSandboxPhoneNumbersRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); var exception = operation.Exceptions.First(e => e.Name.Equals("AuthorizationErrorException")); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, null, true); var response = ListSMSSandboxPhoneNumbersResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Query")] [TestCategory("SimpleNotificationService")] public void ListSMSSandboxPhoneNumbers_InternalErrorExceptionMarshallTest() { var operation = service_model.FindOperation("ListSMSSandboxPhoneNumbers"); var request = InstantiateClassGenerator.Execute(); var marshaller = new ListSMSSandboxPhoneNumbersRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); var exception = operation.Exceptions.First(e => e.Name.Equals("InternalErrorException")); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, null, true); var response = ListSMSSandboxPhoneNumbersResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Query")] [TestCategory("SimpleNotificationService")] public void ListSMSSandboxPhoneNumbers_InvalidParameterExceptionMarshallTest() { var operation = service_model.FindOperation("ListSMSSandboxPhoneNumbers"); var request = InstantiateClassGenerator.Execute(); var marshaller = new ListSMSSandboxPhoneNumbersRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); var exception = operation.Exceptions.First(e => e.Name.Equals("InvalidParameterException")); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, null, true); var response = ListSMSSandboxPhoneNumbersResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Query")] [TestCategory("SimpleNotificationService")] public void ListSMSSandboxPhoneNumbers_ResourceNotFoundExceptionMarshallTest() { var operation = service_model.FindOperation("ListSMSSandboxPhoneNumbers"); var request = InstantiateClassGenerator.Execute(); var marshaller = new ListSMSSandboxPhoneNumbersRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); var exception = operation.Exceptions.First(e => e.Name.Equals("ResourceNotFoundException")); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, null, true); var response = ListSMSSandboxPhoneNumbersResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Query")] [TestCategory("SimpleNotificationService")] public void ListSMSSandboxPhoneNumbers_ThrottledExceptionMarshallTest() { var operation = service_model.FindOperation("ListSMSSandboxPhoneNumbers"); var request = InstantiateClassGenerator.Execute(); var marshaller = new ListSMSSandboxPhoneNumbersRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); var exception = operation.Exceptions.First(e => e.Name.Equals("ThrottledException")); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, null, true); var response = ListSMSSandboxPhoneNumbersResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Query")] [TestCategory("SimpleNotificationService")] public void ListSubscriptionsMarshallTest() { var operation = service_model.FindOperation("ListSubscriptions"); var request = InstantiateClassGenerator.Execute(); var marshaller = new ListSubscriptionsRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), false, null); var response = ListSubscriptionsResponseUnmarshaller.Instance.Unmarshall(context) as ListSubscriptionsResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Query")] [TestCategory("SimpleNotificationService")] public void ListSubscriptions_AuthorizationErrorExceptionMarshallTest() { var operation = service_model.FindOperation("ListSubscriptions"); var request = InstantiateClassGenerator.Execute(); var marshaller = new ListSubscriptionsRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); var exception = operation.Exceptions.First(e => e.Name.Equals("AuthorizationErrorException")); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, null, true); var response = ListSubscriptionsResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Query")] [TestCategory("SimpleNotificationService")] public void ListSubscriptions_InternalErrorExceptionMarshallTest() { var operation = service_model.FindOperation("ListSubscriptions"); var request = InstantiateClassGenerator.Execute(); var marshaller = new ListSubscriptionsRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); var exception = operation.Exceptions.First(e => e.Name.Equals("InternalErrorException")); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, null, true); var response = ListSubscriptionsResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Query")] [TestCategory("SimpleNotificationService")] public void ListSubscriptions_InvalidParameterExceptionMarshallTest() { var operation = service_model.FindOperation("ListSubscriptions"); var request = InstantiateClassGenerator.Execute(); var marshaller = new ListSubscriptionsRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); var exception = operation.Exceptions.First(e => e.Name.Equals("InvalidParameterException")); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, null, true); var response = ListSubscriptionsResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Query")] [TestCategory("SimpleNotificationService")] public void ListSubscriptionsByTopicMarshallTest() { var operation = service_model.FindOperation("ListSubscriptionsByTopic"); var request = InstantiateClassGenerator.Execute(); var marshaller = new ListSubscriptionsByTopicRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), false, null); var response = ListSubscriptionsByTopicResponseUnmarshaller.Instance.Unmarshall(context) as ListSubscriptionsByTopicResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Query")] [TestCategory("SimpleNotificationService")] public void ListSubscriptionsByTopic_AuthorizationErrorExceptionMarshallTest() { var operation = service_model.FindOperation("ListSubscriptionsByTopic"); var request = InstantiateClassGenerator.Execute(); var marshaller = new ListSubscriptionsByTopicRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); var exception = operation.Exceptions.First(e => e.Name.Equals("AuthorizationErrorException")); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, null, true); var response = ListSubscriptionsByTopicResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Query")] [TestCategory("SimpleNotificationService")] public void ListSubscriptionsByTopic_InternalErrorExceptionMarshallTest() { var operation = service_model.FindOperation("ListSubscriptionsByTopic"); var request = InstantiateClassGenerator.Execute(); var marshaller = new ListSubscriptionsByTopicRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); var exception = operation.Exceptions.First(e => e.Name.Equals("InternalErrorException")); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, null, true); var response = ListSubscriptionsByTopicResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Query")] [TestCategory("SimpleNotificationService")] public void ListSubscriptionsByTopic_InvalidParameterExceptionMarshallTest() { var operation = service_model.FindOperation("ListSubscriptionsByTopic"); var request = InstantiateClassGenerator.Execute(); var marshaller = new ListSubscriptionsByTopicRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); var exception = operation.Exceptions.First(e => e.Name.Equals("InvalidParameterException")); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, null, true); var response = ListSubscriptionsByTopicResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Query")] [TestCategory("SimpleNotificationService")] public void ListSubscriptionsByTopic_NotFoundExceptionMarshallTest() { var operation = service_model.FindOperation("ListSubscriptionsByTopic"); var request = InstantiateClassGenerator.Execute(); var marshaller = new ListSubscriptionsByTopicRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); var exception = operation.Exceptions.First(e => e.Name.Equals("NotFoundException")); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, null, true); var response = ListSubscriptionsByTopicResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Query")] [TestCategory("SimpleNotificationService")] public void ListTagsForResourceMarshallTest() { var operation = service_model.FindOperation("ListTagsForResource"); var request = InstantiateClassGenerator.Execute(); var marshaller = new ListTagsForResourceRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), false, null); var response = ListTagsForResourceResponseUnmarshaller.Instance.Unmarshall(context) as ListTagsForResourceResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Query")] [TestCategory("SimpleNotificationService")] public void ListTagsForResource_AuthorizationErrorExceptionMarshallTest() { var operation = service_model.FindOperation("ListTagsForResource"); var request = InstantiateClassGenerator.Execute(); var marshaller = new ListTagsForResourceRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); var exception = operation.Exceptions.First(e => e.Name.Equals("AuthorizationErrorException")); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, null, true); var response = ListTagsForResourceResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Query")] [TestCategory("SimpleNotificationService")] public void ListTagsForResource_ConcurrentAccessExceptionMarshallTest() { var operation = service_model.FindOperation("ListTagsForResource"); var request = InstantiateClassGenerator.Execute(); var marshaller = new ListTagsForResourceRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); var exception = operation.Exceptions.First(e => e.Name.Equals("ConcurrentAccessException")); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, null, true); var response = ListTagsForResourceResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Query")] [TestCategory("SimpleNotificationService")] public void ListTagsForResource_InvalidParameterExceptionMarshallTest() { var operation = service_model.FindOperation("ListTagsForResource"); var request = InstantiateClassGenerator.Execute(); var marshaller = new ListTagsForResourceRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); var exception = operation.Exceptions.First(e => e.Name.Equals("InvalidParameterException")); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, null, true); var response = ListTagsForResourceResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Query")] [TestCategory("SimpleNotificationService")] public void ListTagsForResource_ResourceNotFoundExceptionMarshallTest() { var operation = service_model.FindOperation("ListTagsForResource"); var request = InstantiateClassGenerator.Execute(); var marshaller = new ListTagsForResourceRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); var exception = operation.Exceptions.First(e => e.Name.Equals("ResourceNotFoundException")); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, null, true); var response = ListTagsForResourceResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Query")] [TestCategory("SimpleNotificationService")] public void ListTagsForResource_TagPolicyExceptionMarshallTest() { var operation = service_model.FindOperation("ListTagsForResource"); var request = InstantiateClassGenerator.Execute(); var marshaller = new ListTagsForResourceRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); var exception = operation.Exceptions.First(e => e.Name.Equals("TagPolicyException")); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, null, true); var response = ListTagsForResourceResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Query")] [TestCategory("SimpleNotificationService")] public void ListTopicsMarshallTest() { var operation = service_model.FindOperation("ListTopics"); var request = InstantiateClassGenerator.Execute(); var marshaller = new ListTopicsRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), false, null); var response = ListTopicsResponseUnmarshaller.Instance.Unmarshall(context) as ListTopicsResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Query")] [TestCategory("SimpleNotificationService")] public void ListTopics_AuthorizationErrorExceptionMarshallTest() { var operation = service_model.FindOperation("ListTopics"); var request = InstantiateClassGenerator.Execute(); var marshaller = new ListTopicsRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); var exception = operation.Exceptions.First(e => e.Name.Equals("AuthorizationErrorException")); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, null, true); var response = ListTopicsResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Query")] [TestCategory("SimpleNotificationService")] public void ListTopics_InternalErrorExceptionMarshallTest() { var operation = service_model.FindOperation("ListTopics"); var request = InstantiateClassGenerator.Execute(); var marshaller = new ListTopicsRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); var exception = operation.Exceptions.First(e => e.Name.Equals("InternalErrorException")); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, null, true); var response = ListTopicsResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Query")] [TestCategory("SimpleNotificationService")] public void ListTopics_InvalidParameterExceptionMarshallTest() { var operation = service_model.FindOperation("ListTopics"); var request = InstantiateClassGenerator.Execute(); var marshaller = new ListTopicsRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); var exception = operation.Exceptions.First(e => e.Name.Equals("InvalidParameterException")); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, null, true); var response = ListTopicsResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Query")] [TestCategory("SimpleNotificationService")] public void OptInPhoneNumberMarshallTest() { var operation = service_model.FindOperation("OptInPhoneNumber"); var request = InstantiateClassGenerator.Execute(); var marshaller = new OptInPhoneNumberRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), false, null); var response = OptInPhoneNumberResponseUnmarshaller.Instance.Unmarshall(context) as OptInPhoneNumberResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Query")] [TestCategory("SimpleNotificationService")] public void OptInPhoneNumber_AuthorizationErrorExceptionMarshallTest() { var operation = service_model.FindOperation("OptInPhoneNumber"); var request = InstantiateClassGenerator.Execute(); var marshaller = new OptInPhoneNumberRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); var exception = operation.Exceptions.First(e => e.Name.Equals("AuthorizationErrorException")); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, null, true); var response = OptInPhoneNumberResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Query")] [TestCategory("SimpleNotificationService")] public void OptInPhoneNumber_InternalErrorExceptionMarshallTest() { var operation = service_model.FindOperation("OptInPhoneNumber"); var request = InstantiateClassGenerator.Execute(); var marshaller = new OptInPhoneNumberRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); var exception = operation.Exceptions.First(e => e.Name.Equals("InternalErrorException")); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, null, true); var response = OptInPhoneNumberResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Query")] [TestCategory("SimpleNotificationService")] public void OptInPhoneNumber_InvalidParameterExceptionMarshallTest() { var operation = service_model.FindOperation("OptInPhoneNumber"); var request = InstantiateClassGenerator.Execute(); var marshaller = new OptInPhoneNumberRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); var exception = operation.Exceptions.First(e => e.Name.Equals("InvalidParameterException")); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, null, true); var response = OptInPhoneNumberResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Query")] [TestCategory("SimpleNotificationService")] public void OptInPhoneNumber_ThrottledExceptionMarshallTest() { var operation = service_model.FindOperation("OptInPhoneNumber"); var request = InstantiateClassGenerator.Execute(); var marshaller = new OptInPhoneNumberRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); var exception = operation.Exceptions.First(e => e.Name.Equals("ThrottledException")); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, null, true); var response = OptInPhoneNumberResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Query")] [TestCategory("SimpleNotificationService")] public void PublishMarshallTest() { var operation = service_model.FindOperation("Publish"); var request = InstantiateClassGenerator.Execute(); var marshaller = new PublishRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), false, null); var response = PublishResponseUnmarshaller.Instance.Unmarshall(context) as PublishResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Query")] [TestCategory("SimpleNotificationService")] public void Publish_AuthorizationErrorExceptionMarshallTest() { var operation = service_model.FindOperation("Publish"); var request = InstantiateClassGenerator.Execute(); var marshaller = new PublishRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); var exception = operation.Exceptions.First(e => e.Name.Equals("AuthorizationErrorException")); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, null, true); var response = PublishResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Query")] [TestCategory("SimpleNotificationService")] public void Publish_EndpointDisabledExceptionMarshallTest() { var operation = service_model.FindOperation("Publish"); var request = InstantiateClassGenerator.Execute(); var marshaller = new PublishRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); var exception = operation.Exceptions.First(e => e.Name.Equals("EndpointDisabledException")); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, null, true); var response = PublishResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Query")] [TestCategory("SimpleNotificationService")] public void Publish_InternalErrorExceptionMarshallTest() { var operation = service_model.FindOperation("Publish"); var request = InstantiateClassGenerator.Execute(); var marshaller = new PublishRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); var exception = operation.Exceptions.First(e => e.Name.Equals("InternalErrorException")); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, null, true); var response = PublishResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Query")] [TestCategory("SimpleNotificationService")] public void Publish_InvalidParameterExceptionMarshallTest() { var operation = service_model.FindOperation("Publish"); var request = InstantiateClassGenerator.Execute(); var marshaller = new PublishRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); var exception = operation.Exceptions.First(e => e.Name.Equals("InvalidParameterException")); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, null, true); var response = PublishResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Query")] [TestCategory("SimpleNotificationService")] public void Publish_InvalidParameterValueExceptionMarshallTest() { var operation = service_model.FindOperation("Publish"); var request = InstantiateClassGenerator.Execute(); var marshaller = new PublishRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); var exception = operation.Exceptions.First(e => e.Name.Equals("InvalidParameterValueException")); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, null, true); var response = PublishResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Query")] [TestCategory("SimpleNotificationService")] public void Publish_InvalidSecurityExceptionMarshallTest() { var operation = service_model.FindOperation("Publish"); var request = InstantiateClassGenerator.Execute(); var marshaller = new PublishRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); var exception = operation.Exceptions.First(e => e.Name.Equals("InvalidSecurityException")); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, null, true); var response = PublishResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Query")] [TestCategory("SimpleNotificationService")] public void Publish_KMSAccessDeniedExceptionMarshallTest() { var operation = service_model.FindOperation("Publish"); var request = InstantiateClassGenerator.Execute(); var marshaller = new PublishRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); var exception = operation.Exceptions.First(e => e.Name.Equals("KMSAccessDeniedException")); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, null, true); var response = PublishResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Query")] [TestCategory("SimpleNotificationService")] public void Publish_KMSDisabledExceptionMarshallTest() { var operation = service_model.FindOperation("Publish"); var request = InstantiateClassGenerator.Execute(); var marshaller = new PublishRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); var exception = operation.Exceptions.First(e => e.Name.Equals("KMSDisabledException")); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, null, true); var response = PublishResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Query")] [TestCategory("SimpleNotificationService")] public void Publish_KMSInvalidStateExceptionMarshallTest() { var operation = service_model.FindOperation("Publish"); var request = InstantiateClassGenerator.Execute(); var marshaller = new PublishRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); var exception = operation.Exceptions.First(e => e.Name.Equals("KMSInvalidStateException")); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, null, true); var response = PublishResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Query")] [TestCategory("SimpleNotificationService")] public void Publish_KMSNotFoundExceptionMarshallTest() { var operation = service_model.FindOperation("Publish"); var request = InstantiateClassGenerator.Execute(); var marshaller = new PublishRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); var exception = operation.Exceptions.First(e => e.Name.Equals("KMSNotFoundException")); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, null, true); var response = PublishResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Query")] [TestCategory("SimpleNotificationService")] public void Publish_KMSOptInRequiredExceptionMarshallTest() { var operation = service_model.FindOperation("Publish"); var request = InstantiateClassGenerator.Execute(); var marshaller = new PublishRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); var exception = operation.Exceptions.First(e => e.Name.Equals("KMSOptInRequiredException")); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, null, true); var response = PublishResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Query")] [TestCategory("SimpleNotificationService")] public void Publish_KMSThrottlingExceptionMarshallTest() { var operation = service_model.FindOperation("Publish"); var request = InstantiateClassGenerator.Execute(); var marshaller = new PublishRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); var exception = operation.Exceptions.First(e => e.Name.Equals("KMSThrottlingException")); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, null, true); var response = PublishResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Query")] [TestCategory("SimpleNotificationService")] public void Publish_NotFoundExceptionMarshallTest() { var operation = service_model.FindOperation("Publish"); var request = InstantiateClassGenerator.Execute(); var marshaller = new PublishRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); var exception = operation.Exceptions.First(e => e.Name.Equals("NotFoundException")); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, null, true); var response = PublishResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Query")] [TestCategory("SimpleNotificationService")] public void Publish_PlatformApplicationDisabledExceptionMarshallTest() { var operation = service_model.FindOperation("Publish"); var request = InstantiateClassGenerator.Execute(); var marshaller = new PublishRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); var exception = operation.Exceptions.First(e => e.Name.Equals("PlatformApplicationDisabledException")); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, null, true); var response = PublishResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Query")] [TestCategory("SimpleNotificationService")] public void Publish_ValidationExceptionMarshallTest() { var operation = service_model.FindOperation("Publish"); var request = InstantiateClassGenerator.Execute(); var marshaller = new PublishRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); var exception = operation.Exceptions.First(e => e.Name.Equals("ValidationException")); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, null, true); var response = PublishResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Query")] [TestCategory("SimpleNotificationService")] public void PublishBatchMarshallTest() { var operation = service_model.FindOperation("PublishBatch"); var request = InstantiateClassGenerator.Execute(); var marshaller = new PublishBatchRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), false, null); var response = PublishBatchResponseUnmarshaller.Instance.Unmarshall(context) as PublishBatchResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Query")] [TestCategory("SimpleNotificationService")] public void PublishBatch_AuthorizationErrorExceptionMarshallTest() { var operation = service_model.FindOperation("PublishBatch"); var request = InstantiateClassGenerator.Execute(); var marshaller = new PublishBatchRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); var exception = operation.Exceptions.First(e => e.Name.Equals("AuthorizationErrorException")); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, null, true); var response = PublishBatchResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Query")] [TestCategory("SimpleNotificationService")] public void PublishBatch_BatchEntryIdsNotDistinctExceptionMarshallTest() { var operation = service_model.FindOperation("PublishBatch"); var request = InstantiateClassGenerator.Execute(); var marshaller = new PublishBatchRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); var exception = operation.Exceptions.First(e => e.Name.Equals("BatchEntryIdsNotDistinctException")); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, null, true); var response = PublishBatchResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Query")] [TestCategory("SimpleNotificationService")] public void PublishBatch_BatchRequestTooLongExceptionMarshallTest() { var operation = service_model.FindOperation("PublishBatch"); var request = InstantiateClassGenerator.Execute(); var marshaller = new PublishBatchRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); var exception = operation.Exceptions.First(e => e.Name.Equals("BatchRequestTooLongException")); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, null, true); var response = PublishBatchResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Query")] [TestCategory("SimpleNotificationService")] public void PublishBatch_EmptyBatchRequestExceptionMarshallTest() { var operation = service_model.FindOperation("PublishBatch"); var request = InstantiateClassGenerator.Execute(); var marshaller = new PublishBatchRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); var exception = operation.Exceptions.First(e => e.Name.Equals("EmptyBatchRequestException")); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, null, true); var response = PublishBatchResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Query")] [TestCategory("SimpleNotificationService")] public void PublishBatch_EndpointDisabledExceptionMarshallTest() { var operation = service_model.FindOperation("PublishBatch"); var request = InstantiateClassGenerator.Execute(); var marshaller = new PublishBatchRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); var exception = operation.Exceptions.First(e => e.Name.Equals("EndpointDisabledException")); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, null, true); var response = PublishBatchResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Query")] [TestCategory("SimpleNotificationService")] public void PublishBatch_InternalErrorExceptionMarshallTest() { var operation = service_model.FindOperation("PublishBatch"); var request = InstantiateClassGenerator.Execute(); var marshaller = new PublishBatchRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); var exception = operation.Exceptions.First(e => e.Name.Equals("InternalErrorException")); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, null, true); var response = PublishBatchResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Query")] [TestCategory("SimpleNotificationService")] public void PublishBatch_InvalidBatchEntryIdExceptionMarshallTest() { var operation = service_model.FindOperation("PublishBatch"); var request = InstantiateClassGenerator.Execute(); var marshaller = new PublishBatchRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); var exception = operation.Exceptions.First(e => e.Name.Equals("InvalidBatchEntryIdException")); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, null, true); var response = PublishBatchResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Query")] [TestCategory("SimpleNotificationService")] public void PublishBatch_InvalidParameterExceptionMarshallTest() { var operation = service_model.FindOperation("PublishBatch"); var request = InstantiateClassGenerator.Execute(); var marshaller = new PublishBatchRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); var exception = operation.Exceptions.First(e => e.Name.Equals("InvalidParameterException")); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, null, true); var response = PublishBatchResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Query")] [TestCategory("SimpleNotificationService")] public void PublishBatch_InvalidParameterValueExceptionMarshallTest() { var operation = service_model.FindOperation("PublishBatch"); var request = InstantiateClassGenerator.Execute(); var marshaller = new PublishBatchRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); var exception = operation.Exceptions.First(e => e.Name.Equals("InvalidParameterValueException")); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, null, true); var response = PublishBatchResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Query")] [TestCategory("SimpleNotificationService")] public void PublishBatch_InvalidSecurityExceptionMarshallTest() { var operation = service_model.FindOperation("PublishBatch"); var request = InstantiateClassGenerator.Execute(); var marshaller = new PublishBatchRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); var exception = operation.Exceptions.First(e => e.Name.Equals("InvalidSecurityException")); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, null, true); var response = PublishBatchResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Query")] [TestCategory("SimpleNotificationService")] public void PublishBatch_KMSAccessDeniedExceptionMarshallTest() { var operation = service_model.FindOperation("PublishBatch"); var request = InstantiateClassGenerator.Execute(); var marshaller = new PublishBatchRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); var exception = operation.Exceptions.First(e => e.Name.Equals("KMSAccessDeniedException")); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, null, true); var response = PublishBatchResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Query")] [TestCategory("SimpleNotificationService")] public void PublishBatch_KMSDisabledExceptionMarshallTest() { var operation = service_model.FindOperation("PublishBatch"); var request = InstantiateClassGenerator.Execute(); var marshaller = new PublishBatchRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); var exception = operation.Exceptions.First(e => e.Name.Equals("KMSDisabledException")); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, null, true); var response = PublishBatchResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Query")] [TestCategory("SimpleNotificationService")] public void PublishBatch_KMSInvalidStateExceptionMarshallTest() { var operation = service_model.FindOperation("PublishBatch"); var request = InstantiateClassGenerator.Execute(); var marshaller = new PublishBatchRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); var exception = operation.Exceptions.First(e => e.Name.Equals("KMSInvalidStateException")); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, null, true); var response = PublishBatchResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Query")] [TestCategory("SimpleNotificationService")] public void PublishBatch_KMSNotFoundExceptionMarshallTest() { var operation = service_model.FindOperation("PublishBatch"); var request = InstantiateClassGenerator.Execute(); var marshaller = new PublishBatchRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); var exception = operation.Exceptions.First(e => e.Name.Equals("KMSNotFoundException")); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, null, true); var response = PublishBatchResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Query")] [TestCategory("SimpleNotificationService")] public void PublishBatch_KMSOptInRequiredExceptionMarshallTest() { var operation = service_model.FindOperation("PublishBatch"); var request = InstantiateClassGenerator.Execute(); var marshaller = new PublishBatchRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); var exception = operation.Exceptions.First(e => e.Name.Equals("KMSOptInRequiredException")); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, null, true); var response = PublishBatchResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Query")] [TestCategory("SimpleNotificationService")] public void PublishBatch_KMSThrottlingExceptionMarshallTest() { var operation = service_model.FindOperation("PublishBatch"); var request = InstantiateClassGenerator.Execute(); var marshaller = new PublishBatchRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); var exception = operation.Exceptions.First(e => e.Name.Equals("KMSThrottlingException")); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, null, true); var response = PublishBatchResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Query")] [TestCategory("SimpleNotificationService")] public void PublishBatch_NotFoundExceptionMarshallTest() { var operation = service_model.FindOperation("PublishBatch"); var request = InstantiateClassGenerator.Execute(); var marshaller = new PublishBatchRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); var exception = operation.Exceptions.First(e => e.Name.Equals("NotFoundException")); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, null, true); var response = PublishBatchResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Query")] [TestCategory("SimpleNotificationService")] public void PublishBatch_PlatformApplicationDisabledExceptionMarshallTest() { var operation = service_model.FindOperation("PublishBatch"); var request = InstantiateClassGenerator.Execute(); var marshaller = new PublishBatchRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); var exception = operation.Exceptions.First(e => e.Name.Equals("PlatformApplicationDisabledException")); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, null, true); var response = PublishBatchResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Query")] [TestCategory("SimpleNotificationService")] public void PublishBatch_TooManyEntriesInBatchRequestExceptionMarshallTest() { var operation = service_model.FindOperation("PublishBatch"); var request = InstantiateClassGenerator.Execute(); var marshaller = new PublishBatchRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); var exception = operation.Exceptions.First(e => e.Name.Equals("TooManyEntriesInBatchRequestException")); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, null, true); var response = PublishBatchResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Query")] [TestCategory("SimpleNotificationService")] public void PublishBatch_ValidationExceptionMarshallTest() { var operation = service_model.FindOperation("PublishBatch"); var request = InstantiateClassGenerator.Execute(); var marshaller = new PublishBatchRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); var exception = operation.Exceptions.First(e => e.Name.Equals("ValidationException")); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, null, true); var response = PublishBatchResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Query")] [TestCategory("SimpleNotificationService")] public void PutDataProtectionPolicyMarshallTest() { var operation = service_model.FindOperation("PutDataProtectionPolicy"); var request = InstantiateClassGenerator.Execute(); var marshaller = new PutDataProtectionPolicyRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Query")] [TestCategory("SimpleNotificationService")] public void PutDataProtectionPolicy_AuthorizationErrorExceptionMarshallTest() { var operation = service_model.FindOperation("PutDataProtectionPolicy"); var request = InstantiateClassGenerator.Execute(); var marshaller = new PutDataProtectionPolicyRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); var exception = operation.Exceptions.First(e => e.Name.Equals("AuthorizationErrorException")); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, null, true); var response = PutDataProtectionPolicyResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Query")] [TestCategory("SimpleNotificationService")] public void PutDataProtectionPolicy_InternalErrorExceptionMarshallTest() { var operation = service_model.FindOperation("PutDataProtectionPolicy"); var request = InstantiateClassGenerator.Execute(); var marshaller = new PutDataProtectionPolicyRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); var exception = operation.Exceptions.First(e => e.Name.Equals("InternalErrorException")); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, null, true); var response = PutDataProtectionPolicyResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Query")] [TestCategory("SimpleNotificationService")] public void PutDataProtectionPolicy_InvalidParameterExceptionMarshallTest() { var operation = service_model.FindOperation("PutDataProtectionPolicy"); var request = InstantiateClassGenerator.Execute(); var marshaller = new PutDataProtectionPolicyRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); var exception = operation.Exceptions.First(e => e.Name.Equals("InvalidParameterException")); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, null, true); var response = PutDataProtectionPolicyResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Query")] [TestCategory("SimpleNotificationService")] public void PutDataProtectionPolicy_InvalidSecurityExceptionMarshallTest() { var operation = service_model.FindOperation("PutDataProtectionPolicy"); var request = InstantiateClassGenerator.Execute(); var marshaller = new PutDataProtectionPolicyRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); var exception = operation.Exceptions.First(e => e.Name.Equals("InvalidSecurityException")); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, null, true); var response = PutDataProtectionPolicyResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Query")] [TestCategory("SimpleNotificationService")] public void PutDataProtectionPolicy_NotFoundExceptionMarshallTest() { var operation = service_model.FindOperation("PutDataProtectionPolicy"); var request = InstantiateClassGenerator.Execute(); var marshaller = new PutDataProtectionPolicyRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); var exception = operation.Exceptions.First(e => e.Name.Equals("NotFoundException")); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, null, true); var response = PutDataProtectionPolicyResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Query")] [TestCategory("SimpleNotificationService")] public void RemovePermissionMarshallTest() { var operation = service_model.FindOperation("RemovePermission"); var request = InstantiateClassGenerator.Execute(); var marshaller = new RemovePermissionRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Query")] [TestCategory("SimpleNotificationService")] public void RemovePermission_AuthorizationErrorExceptionMarshallTest() { var operation = service_model.FindOperation("RemovePermission"); var request = InstantiateClassGenerator.Execute(); var marshaller = new RemovePermissionRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); var exception = operation.Exceptions.First(e => e.Name.Equals("AuthorizationErrorException")); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, null, true); var response = RemovePermissionResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Query")] [TestCategory("SimpleNotificationService")] public void RemovePermission_InternalErrorExceptionMarshallTest() { var operation = service_model.FindOperation("RemovePermission"); var request = InstantiateClassGenerator.Execute(); var marshaller = new RemovePermissionRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); var exception = operation.Exceptions.First(e => e.Name.Equals("InternalErrorException")); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, null, true); var response = RemovePermissionResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Query")] [TestCategory("SimpleNotificationService")] public void RemovePermission_InvalidParameterExceptionMarshallTest() { var operation = service_model.FindOperation("RemovePermission"); var request = InstantiateClassGenerator.Execute(); var marshaller = new RemovePermissionRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); var exception = operation.Exceptions.First(e => e.Name.Equals("InvalidParameterException")); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, null, true); var response = RemovePermissionResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Query")] [TestCategory("SimpleNotificationService")] public void RemovePermission_NotFoundExceptionMarshallTest() { var operation = service_model.FindOperation("RemovePermission"); var request = InstantiateClassGenerator.Execute(); var marshaller = new RemovePermissionRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); var exception = operation.Exceptions.First(e => e.Name.Equals("NotFoundException")); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, null, true); var response = RemovePermissionResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Query")] [TestCategory("SimpleNotificationService")] public void SetEndpointAttributesMarshallTest() { var operation = service_model.FindOperation("SetEndpointAttributes"); var request = InstantiateClassGenerator.Execute(); var marshaller = new SetEndpointAttributesRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Query")] [TestCategory("SimpleNotificationService")] public void SetEndpointAttributes_AuthorizationErrorExceptionMarshallTest() { var operation = service_model.FindOperation("SetEndpointAttributes"); var request = InstantiateClassGenerator.Execute(); var marshaller = new SetEndpointAttributesRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); var exception = operation.Exceptions.First(e => e.Name.Equals("AuthorizationErrorException")); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, null, true); var response = SetEndpointAttributesResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Query")] [TestCategory("SimpleNotificationService")] public void SetEndpointAttributes_InternalErrorExceptionMarshallTest() { var operation = service_model.FindOperation("SetEndpointAttributes"); var request = InstantiateClassGenerator.Execute(); var marshaller = new SetEndpointAttributesRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); var exception = operation.Exceptions.First(e => e.Name.Equals("InternalErrorException")); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, null, true); var response = SetEndpointAttributesResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Query")] [TestCategory("SimpleNotificationService")] public void SetEndpointAttributes_InvalidParameterExceptionMarshallTest() { var operation = service_model.FindOperation("SetEndpointAttributes"); var request = InstantiateClassGenerator.Execute(); var marshaller = new SetEndpointAttributesRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); var exception = operation.Exceptions.First(e => e.Name.Equals("InvalidParameterException")); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, null, true); var response = SetEndpointAttributesResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Query")] [TestCategory("SimpleNotificationService")] public void SetEndpointAttributes_NotFoundExceptionMarshallTest() { var operation = service_model.FindOperation("SetEndpointAttributes"); var request = InstantiateClassGenerator.Execute(); var marshaller = new SetEndpointAttributesRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); var exception = operation.Exceptions.First(e => e.Name.Equals("NotFoundException")); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, null, true); var response = SetEndpointAttributesResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Query")] [TestCategory("SimpleNotificationService")] public void SetPlatformApplicationAttributesMarshallTest() { var operation = service_model.FindOperation("SetPlatformApplicationAttributes"); var request = InstantiateClassGenerator.Execute(); var marshaller = new SetPlatformApplicationAttributesRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Query")] [TestCategory("SimpleNotificationService")] public void SetPlatformApplicationAttributes_AuthorizationErrorExceptionMarshallTest() { var operation = service_model.FindOperation("SetPlatformApplicationAttributes"); var request = InstantiateClassGenerator.Execute(); var marshaller = new SetPlatformApplicationAttributesRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); var exception = operation.Exceptions.First(e => e.Name.Equals("AuthorizationErrorException")); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, null, true); var response = SetPlatformApplicationAttributesResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Query")] [TestCategory("SimpleNotificationService")] public void SetPlatformApplicationAttributes_InternalErrorExceptionMarshallTest() { var operation = service_model.FindOperation("SetPlatformApplicationAttributes"); var request = InstantiateClassGenerator.Execute(); var marshaller = new SetPlatformApplicationAttributesRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); var exception = operation.Exceptions.First(e => e.Name.Equals("InternalErrorException")); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, null, true); var response = SetPlatformApplicationAttributesResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Query")] [TestCategory("SimpleNotificationService")] public void SetPlatformApplicationAttributes_InvalidParameterExceptionMarshallTest() { var operation = service_model.FindOperation("SetPlatformApplicationAttributes"); var request = InstantiateClassGenerator.Execute(); var marshaller = new SetPlatformApplicationAttributesRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); var exception = operation.Exceptions.First(e => e.Name.Equals("InvalidParameterException")); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, null, true); var response = SetPlatformApplicationAttributesResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Query")] [TestCategory("SimpleNotificationService")] public void SetPlatformApplicationAttributes_NotFoundExceptionMarshallTest() { var operation = service_model.FindOperation("SetPlatformApplicationAttributes"); var request = InstantiateClassGenerator.Execute(); var marshaller = new SetPlatformApplicationAttributesRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); var exception = operation.Exceptions.First(e => e.Name.Equals("NotFoundException")); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, null, true); var response = SetPlatformApplicationAttributesResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Query")] [TestCategory("SimpleNotificationService")] public void SetSMSAttributesMarshallTest() { var operation = service_model.FindOperation("SetSMSAttributes"); var request = InstantiateClassGenerator.Execute(); var marshaller = new SetSMSAttributesRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), false, null); var response = SetSMSAttributesResponseUnmarshaller.Instance.Unmarshall(context) as SetSMSAttributesResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Query")] [TestCategory("SimpleNotificationService")] public void SetSMSAttributes_AuthorizationErrorExceptionMarshallTest() { var operation = service_model.FindOperation("SetSMSAttributes"); var request = InstantiateClassGenerator.Execute(); var marshaller = new SetSMSAttributesRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); var exception = operation.Exceptions.First(e => e.Name.Equals("AuthorizationErrorException")); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, null, true); var response = SetSMSAttributesResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Query")] [TestCategory("SimpleNotificationService")] public void SetSMSAttributes_InternalErrorExceptionMarshallTest() { var operation = service_model.FindOperation("SetSMSAttributes"); var request = InstantiateClassGenerator.Execute(); var marshaller = new SetSMSAttributesRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); var exception = operation.Exceptions.First(e => e.Name.Equals("InternalErrorException")); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, null, true); var response = SetSMSAttributesResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Query")] [TestCategory("SimpleNotificationService")] public void SetSMSAttributes_InvalidParameterExceptionMarshallTest() { var operation = service_model.FindOperation("SetSMSAttributes"); var request = InstantiateClassGenerator.Execute(); var marshaller = new SetSMSAttributesRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); var exception = operation.Exceptions.First(e => e.Name.Equals("InvalidParameterException")); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, null, true); var response = SetSMSAttributesResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Query")] [TestCategory("SimpleNotificationService")] public void SetSMSAttributes_ThrottledExceptionMarshallTest() { var operation = service_model.FindOperation("SetSMSAttributes"); var request = InstantiateClassGenerator.Execute(); var marshaller = new SetSMSAttributesRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); var exception = operation.Exceptions.First(e => e.Name.Equals("ThrottledException")); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, null, true); var response = SetSMSAttributesResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Query")] [TestCategory("SimpleNotificationService")] public void SetSubscriptionAttributesMarshallTest() { var operation = service_model.FindOperation("SetSubscriptionAttributes"); var request = InstantiateClassGenerator.Execute(); var marshaller = new SetSubscriptionAttributesRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Query")] [TestCategory("SimpleNotificationService")] public void SetSubscriptionAttributes_AuthorizationErrorExceptionMarshallTest() { var operation = service_model.FindOperation("SetSubscriptionAttributes"); var request = InstantiateClassGenerator.Execute(); var marshaller = new SetSubscriptionAttributesRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); var exception = operation.Exceptions.First(e => e.Name.Equals("AuthorizationErrorException")); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, null, true); var response = SetSubscriptionAttributesResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Query")] [TestCategory("SimpleNotificationService")] public void SetSubscriptionAttributes_FilterPolicyLimitExceededExceptionMarshallTest() { var operation = service_model.FindOperation("SetSubscriptionAttributes"); var request = InstantiateClassGenerator.Execute(); var marshaller = new SetSubscriptionAttributesRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); var exception = operation.Exceptions.First(e => e.Name.Equals("FilterPolicyLimitExceededException")); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, null, true); var response = SetSubscriptionAttributesResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Query")] [TestCategory("SimpleNotificationService")] public void SetSubscriptionAttributes_InternalErrorExceptionMarshallTest() { var operation = service_model.FindOperation("SetSubscriptionAttributes"); var request = InstantiateClassGenerator.Execute(); var marshaller = new SetSubscriptionAttributesRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); var exception = operation.Exceptions.First(e => e.Name.Equals("InternalErrorException")); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, null, true); var response = SetSubscriptionAttributesResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Query")] [TestCategory("SimpleNotificationService")] public void SetSubscriptionAttributes_InvalidParameterExceptionMarshallTest() { var operation = service_model.FindOperation("SetSubscriptionAttributes"); var request = InstantiateClassGenerator.Execute(); var marshaller = new SetSubscriptionAttributesRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); var exception = operation.Exceptions.First(e => e.Name.Equals("InvalidParameterException")); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, null, true); var response = SetSubscriptionAttributesResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Query")] [TestCategory("SimpleNotificationService")] public void SetSubscriptionAttributes_NotFoundExceptionMarshallTest() { var operation = service_model.FindOperation("SetSubscriptionAttributes"); var request = InstantiateClassGenerator.Execute(); var marshaller = new SetSubscriptionAttributesRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); var exception = operation.Exceptions.First(e => e.Name.Equals("NotFoundException")); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, null, true); var response = SetSubscriptionAttributesResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Query")] [TestCategory("SimpleNotificationService")] public void SetTopicAttributesMarshallTest() { var operation = service_model.FindOperation("SetTopicAttributes"); var request = InstantiateClassGenerator.Execute(); var marshaller = new SetTopicAttributesRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Query")] [TestCategory("SimpleNotificationService")] public void SetTopicAttributes_AuthorizationErrorExceptionMarshallTest() { var operation = service_model.FindOperation("SetTopicAttributes"); var request = InstantiateClassGenerator.Execute(); var marshaller = new SetTopicAttributesRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); var exception = operation.Exceptions.First(e => e.Name.Equals("AuthorizationErrorException")); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, null, true); var response = SetTopicAttributesResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Query")] [TestCategory("SimpleNotificationService")] public void SetTopicAttributes_InternalErrorExceptionMarshallTest() { var operation = service_model.FindOperation("SetTopicAttributes"); var request = InstantiateClassGenerator.Execute(); var marshaller = new SetTopicAttributesRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); var exception = operation.Exceptions.First(e => e.Name.Equals("InternalErrorException")); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, null, true); var response = SetTopicAttributesResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Query")] [TestCategory("SimpleNotificationService")] public void SetTopicAttributes_InvalidParameterExceptionMarshallTest() { var operation = service_model.FindOperation("SetTopicAttributes"); var request = InstantiateClassGenerator.Execute(); var marshaller = new SetTopicAttributesRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); var exception = operation.Exceptions.First(e => e.Name.Equals("InvalidParameterException")); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, null, true); var response = SetTopicAttributesResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Query")] [TestCategory("SimpleNotificationService")] public void SetTopicAttributes_InvalidSecurityExceptionMarshallTest() { var operation = service_model.FindOperation("SetTopicAttributes"); var request = InstantiateClassGenerator.Execute(); var marshaller = new SetTopicAttributesRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); var exception = operation.Exceptions.First(e => e.Name.Equals("InvalidSecurityException")); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, null, true); var response = SetTopicAttributesResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Query")] [TestCategory("SimpleNotificationService")] public void SetTopicAttributes_NotFoundExceptionMarshallTest() { var operation = service_model.FindOperation("SetTopicAttributes"); var request = InstantiateClassGenerator.Execute(); var marshaller = new SetTopicAttributesRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); var exception = operation.Exceptions.First(e => e.Name.Equals("NotFoundException")); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, null, true); var response = SetTopicAttributesResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Query")] [TestCategory("SimpleNotificationService")] public void SubscribeMarshallTest() { var operation = service_model.FindOperation("Subscribe"); var request = InstantiateClassGenerator.Execute(); var marshaller = new SubscribeRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), false, null); var response = SubscribeResponseUnmarshaller.Instance.Unmarshall(context) as SubscribeResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Query")] [TestCategory("SimpleNotificationService")] public void Subscribe_AuthorizationErrorExceptionMarshallTest() { var operation = service_model.FindOperation("Subscribe"); var request = InstantiateClassGenerator.Execute(); var marshaller = new SubscribeRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); var exception = operation.Exceptions.First(e => e.Name.Equals("AuthorizationErrorException")); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, null, true); var response = SubscribeResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Query")] [TestCategory("SimpleNotificationService")] public void Subscribe_FilterPolicyLimitExceededExceptionMarshallTest() { var operation = service_model.FindOperation("Subscribe"); var request = InstantiateClassGenerator.Execute(); var marshaller = new SubscribeRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); var exception = operation.Exceptions.First(e => e.Name.Equals("FilterPolicyLimitExceededException")); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, null, true); var response = SubscribeResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Query")] [TestCategory("SimpleNotificationService")] public void Subscribe_InternalErrorExceptionMarshallTest() { var operation = service_model.FindOperation("Subscribe"); var request = InstantiateClassGenerator.Execute(); var marshaller = new SubscribeRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); var exception = operation.Exceptions.First(e => e.Name.Equals("InternalErrorException")); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, null, true); var response = SubscribeResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Query")] [TestCategory("SimpleNotificationService")] public void Subscribe_InvalidParameterExceptionMarshallTest() { var operation = service_model.FindOperation("Subscribe"); var request = InstantiateClassGenerator.Execute(); var marshaller = new SubscribeRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); var exception = operation.Exceptions.First(e => e.Name.Equals("InvalidParameterException")); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, null, true); var response = SubscribeResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Query")] [TestCategory("SimpleNotificationService")] public void Subscribe_InvalidSecurityExceptionMarshallTest() { var operation = service_model.FindOperation("Subscribe"); var request = InstantiateClassGenerator.Execute(); var marshaller = new SubscribeRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); var exception = operation.Exceptions.First(e => e.Name.Equals("InvalidSecurityException")); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, null, true); var response = SubscribeResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Query")] [TestCategory("SimpleNotificationService")] public void Subscribe_NotFoundExceptionMarshallTest() { var operation = service_model.FindOperation("Subscribe"); var request = InstantiateClassGenerator.Execute(); var marshaller = new SubscribeRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); var exception = operation.Exceptions.First(e => e.Name.Equals("NotFoundException")); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, null, true); var response = SubscribeResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Query")] [TestCategory("SimpleNotificationService")] public void Subscribe_SubscriptionLimitExceededExceptionMarshallTest() { var operation = service_model.FindOperation("Subscribe"); var request = InstantiateClassGenerator.Execute(); var marshaller = new SubscribeRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); var exception = operation.Exceptions.First(e => e.Name.Equals("SubscriptionLimitExceededException")); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, null, true); var response = SubscribeResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Query")] [TestCategory("SimpleNotificationService")] public void TagResourceMarshallTest() { var operation = service_model.FindOperation("TagResource"); var request = InstantiateClassGenerator.Execute(); var marshaller = new TagResourceRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), false, null); var response = TagResourceResponseUnmarshaller.Instance.Unmarshall(context) as TagResourceResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Query")] [TestCategory("SimpleNotificationService")] public void TagResource_AuthorizationErrorExceptionMarshallTest() { var operation = service_model.FindOperation("TagResource"); var request = InstantiateClassGenerator.Execute(); var marshaller = new TagResourceRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); var exception = operation.Exceptions.First(e => e.Name.Equals("AuthorizationErrorException")); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, null, true); var response = TagResourceResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Query")] [TestCategory("SimpleNotificationService")] public void TagResource_ConcurrentAccessExceptionMarshallTest() { var operation = service_model.FindOperation("TagResource"); var request = InstantiateClassGenerator.Execute(); var marshaller = new TagResourceRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); var exception = operation.Exceptions.First(e => e.Name.Equals("ConcurrentAccessException")); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, null, true); var response = TagResourceResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Query")] [TestCategory("SimpleNotificationService")] public void TagResource_InvalidParameterExceptionMarshallTest() { var operation = service_model.FindOperation("TagResource"); var request = InstantiateClassGenerator.Execute(); var marshaller = new TagResourceRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); var exception = operation.Exceptions.First(e => e.Name.Equals("InvalidParameterException")); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, null, true); var response = TagResourceResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Query")] [TestCategory("SimpleNotificationService")] public void TagResource_ResourceNotFoundExceptionMarshallTest() { var operation = service_model.FindOperation("TagResource"); var request = InstantiateClassGenerator.Execute(); var marshaller = new TagResourceRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); var exception = operation.Exceptions.First(e => e.Name.Equals("ResourceNotFoundException")); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, null, true); var response = TagResourceResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Query")] [TestCategory("SimpleNotificationService")] public void TagResource_StaleTagExceptionMarshallTest() { var operation = service_model.FindOperation("TagResource"); var request = InstantiateClassGenerator.Execute(); var marshaller = new TagResourceRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); var exception = operation.Exceptions.First(e => e.Name.Equals("StaleTagException")); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, null, true); var response = TagResourceResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Query")] [TestCategory("SimpleNotificationService")] public void TagResource_TagLimitExceededExceptionMarshallTest() { var operation = service_model.FindOperation("TagResource"); var request = InstantiateClassGenerator.Execute(); var marshaller = new TagResourceRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); var exception = operation.Exceptions.First(e => e.Name.Equals("TagLimitExceededException")); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, null, true); var response = TagResourceResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Query")] [TestCategory("SimpleNotificationService")] public void TagResource_TagPolicyExceptionMarshallTest() { var operation = service_model.FindOperation("TagResource"); var request = InstantiateClassGenerator.Execute(); var marshaller = new TagResourceRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); var exception = operation.Exceptions.First(e => e.Name.Equals("TagPolicyException")); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, null, true); var response = TagResourceResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Query")] [TestCategory("SimpleNotificationService")] public void UnsubscribeMarshallTest() { var operation = service_model.FindOperation("Unsubscribe"); var request = InstantiateClassGenerator.Execute(); var marshaller = new UnsubscribeRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Query")] [TestCategory("SimpleNotificationService")] public void Unsubscribe_AuthorizationErrorExceptionMarshallTest() { var operation = service_model.FindOperation("Unsubscribe"); var request = InstantiateClassGenerator.Execute(); var marshaller = new UnsubscribeRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); var exception = operation.Exceptions.First(e => e.Name.Equals("AuthorizationErrorException")); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, null, true); var response = UnsubscribeResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Query")] [TestCategory("SimpleNotificationService")] public void Unsubscribe_InternalErrorExceptionMarshallTest() { var operation = service_model.FindOperation("Unsubscribe"); var request = InstantiateClassGenerator.Execute(); var marshaller = new UnsubscribeRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); var exception = operation.Exceptions.First(e => e.Name.Equals("InternalErrorException")); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, null, true); var response = UnsubscribeResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Query")] [TestCategory("SimpleNotificationService")] public void Unsubscribe_InvalidParameterExceptionMarshallTest() { var operation = service_model.FindOperation("Unsubscribe"); var request = InstantiateClassGenerator.Execute(); var marshaller = new UnsubscribeRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); var exception = operation.Exceptions.First(e => e.Name.Equals("InvalidParameterException")); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, null, true); var response = UnsubscribeResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Query")] [TestCategory("SimpleNotificationService")] public void Unsubscribe_InvalidSecurityExceptionMarshallTest() { var operation = service_model.FindOperation("Unsubscribe"); var request = InstantiateClassGenerator.Execute(); var marshaller = new UnsubscribeRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); var exception = operation.Exceptions.First(e => e.Name.Equals("InvalidSecurityException")); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, null, true); var response = UnsubscribeResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Query")] [TestCategory("SimpleNotificationService")] public void Unsubscribe_NotFoundExceptionMarshallTest() { var operation = service_model.FindOperation("Unsubscribe"); var request = InstantiateClassGenerator.Execute(); var marshaller = new UnsubscribeRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); var exception = operation.Exceptions.First(e => e.Name.Equals("NotFoundException")); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, null, true); var response = UnsubscribeResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Query")] [TestCategory("SimpleNotificationService")] public void UntagResourceMarshallTest() { var operation = service_model.FindOperation("UntagResource"); var request = InstantiateClassGenerator.Execute(); var marshaller = new UntagResourceRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), false, null); var response = UntagResourceResponseUnmarshaller.Instance.Unmarshall(context) as UntagResourceResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Query")] [TestCategory("SimpleNotificationService")] public void UntagResource_AuthorizationErrorExceptionMarshallTest() { var operation = service_model.FindOperation("UntagResource"); var request = InstantiateClassGenerator.Execute(); var marshaller = new UntagResourceRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); var exception = operation.Exceptions.First(e => e.Name.Equals("AuthorizationErrorException")); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, null, true); var response = UntagResourceResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Query")] [TestCategory("SimpleNotificationService")] public void UntagResource_ConcurrentAccessExceptionMarshallTest() { var operation = service_model.FindOperation("UntagResource"); var request = InstantiateClassGenerator.Execute(); var marshaller = new UntagResourceRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); var exception = operation.Exceptions.First(e => e.Name.Equals("ConcurrentAccessException")); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, null, true); var response = UntagResourceResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Query")] [TestCategory("SimpleNotificationService")] public void UntagResource_InvalidParameterExceptionMarshallTest() { var operation = service_model.FindOperation("UntagResource"); var request = InstantiateClassGenerator.Execute(); var marshaller = new UntagResourceRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); var exception = operation.Exceptions.First(e => e.Name.Equals("InvalidParameterException")); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, null, true); var response = UntagResourceResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Query")] [TestCategory("SimpleNotificationService")] public void UntagResource_ResourceNotFoundExceptionMarshallTest() { var operation = service_model.FindOperation("UntagResource"); var request = InstantiateClassGenerator.Execute(); var marshaller = new UntagResourceRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); var exception = operation.Exceptions.First(e => e.Name.Equals("ResourceNotFoundException")); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, null, true); var response = UntagResourceResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Query")] [TestCategory("SimpleNotificationService")] public void UntagResource_StaleTagExceptionMarshallTest() { var operation = service_model.FindOperation("UntagResource"); var request = InstantiateClassGenerator.Execute(); var marshaller = new UntagResourceRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); var exception = operation.Exceptions.First(e => e.Name.Equals("StaleTagException")); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, null, true); var response = UntagResourceResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Query")] [TestCategory("SimpleNotificationService")] public void UntagResource_TagLimitExceededExceptionMarshallTest() { var operation = service_model.FindOperation("UntagResource"); var request = InstantiateClassGenerator.Execute(); var marshaller = new UntagResourceRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); var exception = operation.Exceptions.First(e => e.Name.Equals("TagLimitExceededException")); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, null, true); var response = UntagResourceResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Query")] [TestCategory("SimpleNotificationService")] public void UntagResource_TagPolicyExceptionMarshallTest() { var operation = service_model.FindOperation("UntagResource"); var request = InstantiateClassGenerator.Execute(); var marshaller = new UntagResourceRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); var exception = operation.Exceptions.First(e => e.Name.Equals("TagPolicyException")); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, null, true); var response = UntagResourceResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Query")] [TestCategory("SimpleNotificationService")] public void VerifySMSSandboxPhoneNumberMarshallTest() { var operation = service_model.FindOperation("VerifySMSSandboxPhoneNumber"); var request = InstantiateClassGenerator.Execute(); var marshaller = new VerifySMSSandboxPhoneNumberRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), false, null); var response = VerifySMSSandboxPhoneNumberResponseUnmarshaller.Instance.Unmarshall(context) as VerifySMSSandboxPhoneNumberResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Query")] [TestCategory("SimpleNotificationService")] public void VerifySMSSandboxPhoneNumber_AuthorizationErrorExceptionMarshallTest() { var operation = service_model.FindOperation("VerifySMSSandboxPhoneNumber"); var request = InstantiateClassGenerator.Execute(); var marshaller = new VerifySMSSandboxPhoneNumberRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); var exception = operation.Exceptions.First(e => e.Name.Equals("AuthorizationErrorException")); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, null, true); var response = VerifySMSSandboxPhoneNumberResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Query")] [TestCategory("SimpleNotificationService")] public void VerifySMSSandboxPhoneNumber_InternalErrorExceptionMarshallTest() { var operation = service_model.FindOperation("VerifySMSSandboxPhoneNumber"); var request = InstantiateClassGenerator.Execute(); var marshaller = new VerifySMSSandboxPhoneNumberRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); var exception = operation.Exceptions.First(e => e.Name.Equals("InternalErrorException")); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, null, true); var response = VerifySMSSandboxPhoneNumberResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Query")] [TestCategory("SimpleNotificationService")] public void VerifySMSSandboxPhoneNumber_InvalidParameterExceptionMarshallTest() { var operation = service_model.FindOperation("VerifySMSSandboxPhoneNumber"); var request = InstantiateClassGenerator.Execute(); var marshaller = new VerifySMSSandboxPhoneNumberRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); var exception = operation.Exceptions.First(e => e.Name.Equals("InvalidParameterException")); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, null, true); var response = VerifySMSSandboxPhoneNumberResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Query")] [TestCategory("SimpleNotificationService")] public void VerifySMSSandboxPhoneNumber_ResourceNotFoundExceptionMarshallTest() { var operation = service_model.FindOperation("VerifySMSSandboxPhoneNumber"); var request = InstantiateClassGenerator.Execute(); var marshaller = new VerifySMSSandboxPhoneNumberRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); var exception = operation.Exceptions.First(e => e.Name.Equals("ResourceNotFoundException")); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, null, true); var response = VerifySMSSandboxPhoneNumberResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Query")] [TestCategory("SimpleNotificationService")] public void VerifySMSSandboxPhoneNumber_ThrottledExceptionMarshallTest() { var operation = service_model.FindOperation("VerifySMSSandboxPhoneNumber"); var request = InstantiateClassGenerator.Execute(); var marshaller = new VerifySMSSandboxPhoneNumberRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); var exception = operation.Exceptions.First(e => e.Name.Equals("ThrottledException")); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, null, true); var response = VerifySMSSandboxPhoneNumberResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } [TestMethod] [TestCategory("UnitTest")] [TestCategory("Query")] [TestCategory("SimpleNotificationService")] public void VerifySMSSandboxPhoneNumber_VerificationExceptionMarshallTest() { var operation = service_model.FindOperation("VerifySMSSandboxPhoneNumber"); var request = InstantiateClassGenerator.Execute(); var marshaller = new VerifySMSSandboxPhoneNumberRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); var exception = operation.Exceptions.First(e => e.Name.Equals("VerificationException")); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, null, true); var response = VerifySMSSandboxPhoneNumberResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); } } }