public void GetSessionTokenMarshallTest() { var operation = service_model.FindOperation("GetSessionToken"); var request = InstantiateClassGenerator.Execute <GetSessionTokenRequest>(); var marshaller = new GetSessionTokenRequestMarshaller(); 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 = GetSessionTokenResponseUnmarshaller.Instance.Unmarshall(context) as GetSessionTokenResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); }
public void GetSessionToken_RegionDisabledExceptionMarshallTest() { var operation = service_model.FindOperation("GetSessionToken"); var request = InstantiateClassGenerator.Execute <GetSessionTokenRequest>(); var marshaller = new GetSessionTokenRequestMarshaller(); 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("RegionDisabledException")); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(exception); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), true, null, true); var response = GetSessionTokenResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); }
public void GetSessionTokenMarshallTest() { var operation = service_model.FindOperation("GetSessionToken"); var request = InstantiateClassGenerator.Execute<GetSessionTokenRequest>(); var marshaller = new GetSessionTokenRequestMarshaller(); 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 = GetSessionTokenResponseUnmarshaller.Instance.Unmarshall(context) as GetSessionTokenResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); }