public void CreateCloudFrontOriginAccessIdentityMarshallTest()
        {
            var operation = service_model.FindOperation("CreateCloudFrontOriginAccessIdentity");

            var request = InstantiateClassGenerator.Execute<CreateCloudFrontOriginAccessIdentityRequest>();
            var marshaller = new CreateCloudFrontOriginAccessIdentityRequestMarshaller();

            var internalRequest = marshaller.Marshall(request);
            RequestValidator.Validate("CreateCloudFrontOriginAccessIdentity", request, internalRequest, service_model);            

            var webResponse = new WebResponseData
            {
                Headers = {
                    {"ETag","ETag_Value"},
                    {"Location","Location_Value"},
                    {"x-amzn-RequestId", Guid.NewGuid().ToString()},
                    {"x-amz-crc32","0"}
                }
            };
            
            var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute();            
            var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), false, webResponse);
            ResponseUnmarshaller unmarshaller = CreateCloudFrontOriginAccessIdentityResponseUnmarshaller.Instance;
            var response = unmarshaller.Unmarshall(context)
                as CreateCloudFrontOriginAccessIdentityResponse;   
            InstantiateClassGenerator.ValidateObjectFullyInstantiated(response);       
        }
        public void AssociateVPCWithHostedZoneMarshallTest()
        {
            var operation = service_model.FindOperation("AssociateVPCWithHostedZone");

            var request = InstantiateClassGenerator.Execute<AssociateVPCWithHostedZoneRequest>();
            var marshaller = new AssociateVPCWithHostedZoneRequestMarshaller();

            var internalRequest = marshaller.Marshall(request);
            RequestValidator.Validate("AssociateVPCWithHostedZone", request, internalRequest, service_model);            

            var webResponse = new WebResponseData
            {
                Headers = {
                    {"x-amzn-RequestId", Guid.NewGuid().ToString()},
                    {"x-amz-crc32","0"}
                }
            };
            
            var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute();            
            var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), false, webResponse);
            ResponseUnmarshaller unmarshaller = AssociateVPCWithHostedZoneResponseUnmarshaller.Instance;
            var response = unmarshaller.Unmarshall(context)
                as AssociateVPCWithHostedZoneResponse;   
            InstantiateClassGenerator.ValidateObjectFullyInstantiated(response);       
        }
        public void ContinueUpdateRollbackMarshallTest()
        {
            var operation = service_model.FindOperation("ContinueUpdateRollback");

            var request = InstantiateClassGenerator.Execute<ContinueUpdateRollbackRequest>();
            var marshaller = new ContinueUpdateRollbackRequestMarshaller();
            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 = ContinueUpdateRollbackResponseUnmarshaller.Instance.Unmarshall(context)
                as ContinueUpdateRollbackResponse;
            InstantiateClassGenerator.ValidateObjectFullyInstantiated(response);
        }
        public void AcceptVpcPeeringConnectionMarshallTest()
        {
            var operation = service_model.FindOperation("AcceptVpcPeeringConnection");

            var request = InstantiateClassGenerator.Execute<AcceptVpcPeeringConnectionRequest>();
            var marshaller = new AcceptVpcPeeringConnectionRequestMarshaller();
            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();
            UnmarshallerContext context = new EC2UnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), false, new WebResponseData());
            var response = AcceptVpcPeeringConnectionResponseUnmarshaller.Instance.Unmarshall(context)
                as AcceptVpcPeeringConnectionResponse;
            InstantiateClassGenerator.ValidateObjectFullyInstantiated(response);
        }
        public void AddSourceIdentifierToSubscriptionMarshallTest()
        {
            var operation = service_model.FindOperation("AddSourceIdentifierToSubscription");

            var request = InstantiateClassGenerator.Execute<AddSourceIdentifierToSubscriptionRequest>();
            var marshaller = new AddSourceIdentifierToSubscriptionRequestMarshaller();
            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 = AddSourceIdentifierToSubscriptionResponseUnmarshaller.Instance.Unmarshall(context)
                as AddSourceIdentifierToSubscriptionResponse;   
            InstantiateClassGenerator.ValidateObjectFullyInstantiated(response);       
        }
        public void AuthorizeClusterSecurityGroupIngressMarshallTest()
        {
            var operation = service_model.FindOperation("AuthorizeClusterSecurityGroupIngress");

            var request = InstantiateClassGenerator.Execute<AuthorizeClusterSecurityGroupIngressRequest>();
            var marshaller = new AuthorizeClusterSecurityGroupIngressRequestMarshaller();
            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 = AuthorizeClusterSecurityGroupIngressResponseUnmarshaller.Instance.Unmarshall(context)
                as AuthorizeClusterSecurityGroupIngressResponse;   
            InstantiateClassGenerator.ValidateObjectFullyInstantiated(response);       
        }
Example #7
0
        public void DescribeScheduledInstanceAvailabilityMarshallTest()
        {
            var operation = service_model.FindOperation("DescribeScheduledInstanceAvailability");

            var request = InstantiateClassGenerator.Execute<DescribeScheduledInstanceAvailabilityRequest>();
            var marshaller = new DescribeScheduledInstanceAvailabilityRequestMarshaller();
            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();
            UnmarshallerContext context = new EC2UnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), false, new WebResponseData());
            var response = DescribeScheduledInstanceAvailabilityResponseUnmarshaller.Instance.Unmarshall(context)
                as DescribeScheduledInstanceAvailabilityResponse;   
            InstantiateClassGenerator.ValidateObjectFullyInstantiated(response);       
        }
        public void DescribeEnvironmentManagedActionsMarshallTest()
        {
            var operation = service_model.FindOperation("DescribeEnvironmentManagedActions");

            var request = InstantiateClassGenerator.Execute<DescribeEnvironmentManagedActionsRequest>();
            var marshaller = new DescribeEnvironmentManagedActionsRequestMarshaller();
            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 = DescribeEnvironmentManagedActionsResponseUnmarshaller.Instance.Unmarshall(context)
                as DescribeEnvironmentManagedActionsResponse;   
            InstantiateClassGenerator.ValidateObjectFullyInstantiated(response);       
        }
        public void SetLoadBalancerPoliciesForBackendServerMarshallTest()
        {
            var operation = service_model.FindOperation("SetLoadBalancerPoliciesForBackendServer");

            var request = InstantiateClassGenerator.Execute<SetLoadBalancerPoliciesForBackendServerRequest>();
            var marshaller = new SetLoadBalancerPoliciesForBackendServerRequestMarshaller();
            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 = SetLoadBalancerPoliciesForBackendServerResponseUnmarshaller.Instance.Unmarshall(context)
                as SetLoadBalancerPoliciesForBackendServerResponse;   
            InstantiateClassGenerator.ValidateObjectFullyInstantiated(response);       
        }
 string Generate(ServiceModel model, string operationName)
 {
     var operation = model.Operations.First(x => x.Name == operationName);
     var generator = new XmlSampleGenerator(model, operation);
     return generator.Execute();
 }
        public void GetIdentityMailFromDomainAttributesMarshallTest()
        {
            var operation = service_model.FindOperation("GetIdentityMailFromDomainAttributes");

            var request = InstantiateClassGenerator.Execute<GetIdentityMailFromDomainAttributesRequest>();
            var marshaller = new GetIdentityMailFromDomainAttributesRequestMarshaller();
            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 = GetIdentityMailFromDomainAttributesResponseUnmarshaller.Instance.Unmarshall(context)
                as GetIdentityMailFromDomainAttributesResponse;   
            InstantiateClassGenerator.ValidateObjectFullyInstantiated(response);       
        }