public void DisableHealthServiceAccessForOrganization_ConcurrentModificationExceptionMarshallTest() { var operation = service_model.FindOperation("DisableHealthServiceAccessForOrganization"); var request = InstantiateClassGenerator.Execute <DisableHealthServiceAccessForOrganizationRequest>(); var marshaller = new DisableHealthServiceAccessForOrganizationRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var jsonRequest = UTF8Encoding.UTF8.GetString(internalRequest.Content); Comparer.CompareObjectToJson <DisableHealthServiceAccessForOrganizationRequest>(request, jsonRequest); var exception = operation.Exceptions.First(e => e.Name.Equals("ConcurrentModificationException")); var jsonResponse = new JsonSampleGenerator(service_model, exception).Execute(); var webResponse = new WebResponseData { Headers = { { "x-amzn-RequestId", Guid.NewGuid().ToString() }, { "x-amz-crc32", "0" }, { "x-amzn-ErrorType", "ConcurrentModificationException" }, { "Content-Length", UTF8Encoding.UTF8.GetBytes(jsonResponse).Length.ToString() } } }; var context = new JsonUnmarshallerContext(Utils.CreateStreamFromString(jsonResponse), true, webResponse, true); var response = DisableHealthServiceAccessForOrganizationResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); }
public void DisableHealthServiceAccessForOrganizationMarshallTest() { var request = InstantiateClassGenerator.Execute <DisableHealthServiceAccessForOrganizationRequest>(); var marshaller = new DisableHealthServiceAccessForOrganizationRequestMarshaller(); var internalRequest = marshaller.Marshall(request); }