public void MockgetCustomerPaymentProfileTest()
	    {
		    //define all mocked objects as final
            var mockController = GetMockController<getCustomerPaymentProfileRequest, getCustomerPaymentProfileResponse>();
            var mockRequest = new getCustomerPaymentProfileRequest
                {
                    merchantAuthentication = new merchantAuthenticationType {name = "mocktest", Item = "mockKey", ItemElementName = ItemChoiceType.transactionKey},
                };
            var customerPaymentProfileMaskedType = new customerPaymentProfileMaskedType
                {
                    customerPaymentProfileId = "1234",
                };
            var mockResponse = new getCustomerPaymentProfileResponse
                {
                    refId = "1234",
                    sessionToken = "sessiontoken",
                    paymentProfile = customerPaymentProfileMaskedType,
                };

		    var errorResponse = new ANetApiResponse();
		    var results = new List<String>();
            const messageTypeEnum messageTypeOk = messageTypeEnum.Ok;

            SetMockControllerExpectations<getCustomerPaymentProfileRequest, getCustomerPaymentProfileResponse, getCustomerPaymentProfileController>(
                mockController.MockObject, mockRequest, mockResponse, errorResponse, results, messageTypeOk);
            mockController.MockObject.Execute(AuthorizeNet.Environment.CUSTOM);
            //mockController.MockObject.Execute();
            // or var controllerResponse = mockController.MockObject.ExecuteWithApiResponse(AuthorizeNet.Environment.CUSTOM);
            var controllerResponse = mockController.MockObject.GetApiResponse();
            Assert.IsNotNull(controllerResponse);

            Assert.IsNotNull(controllerResponse.paymentProfile);
            LogHelper.info(Logger, "getCustomerPaymentProfile: Details:{0}", controllerResponse.paymentProfile);
	    }
 public static void customerPaymentProfileMaskedType(customerPaymentProfileMaskedType argument)
 {
     if (null != argument)
     {
         customerPaymentProfileBaseType(argument);
         paymentMaskedType(argument.payment);
         driversLicenseMaskedType(argument.driversLicense);
     }
 }
	    public void MockARBGetSubscriptionTest()
	    {
		    //define all mocked objects as final
            var mockController = GetMockController<ARBGetSubscriptionRequest, ARBGetSubscriptionResponse>();
            var mockRequest = new ARBGetSubscriptionRequest
                {
                    merchantAuthentication = new merchantAuthenticationType() {name = "mocktest", Item = "mockKey", ItemElementName = ItemChoiceType.transactionKey},
                    subscriptionId = "1234"
                };

            var customerPaymentProfileMaskedType = new customerPaymentProfileMaskedType
                {
                    customerPaymentProfileId = "1234",
                };

            Random rnd = new Random(DateTime.Now.Millisecond);
            var SubscriptionMaskedType = new ARBSubscriptionMaskedType()
            {
                name = "Test",
                paymentSchedule = new paymentScheduleType
                {
                    interval = new paymentScheduleTypeInterval
                    {
                        length = 1,
                        unit = ARBSubscriptionUnitEnum.months,
                    },
                    startDate = DateTime.UtcNow,
                    totalOccurrences = 12
                },
                amount = 9.99M,
                amountSpecified = true,
                trialAmount = 100,
                trialAmountSpecified = true,
                status = ARBSubscriptionStatusEnum.active,
                statusSpecified = true,
                profile = new subscriptionCustomerProfileType()
                {
                    paymentProfile = customerPaymentProfileMaskedType,

                },
                order = new orderType { description = string.Format("member monthly {0}", rnd.Next(99999)) }               
            };

            var mockResponse = new ARBGetSubscriptionResponse
                {
                    refId = "1234",
                    sessionToken = "sessiontoken",
                    subscription = SubscriptionMaskedType
                };

		    var errorResponse = new ANetApiResponse();
		    var results = new List<String>();
            const messageTypeEnum messageTypeOk = messageTypeEnum.Ok;

            SetMockControllerExpectations<ARBGetSubscriptionRequest, ARBGetSubscriptionResponse, ARBGetSubscriptionController>(
                mockController.MockObject, mockRequest, mockResponse, errorResponse, results, messageTypeOk);
            mockController.MockObject.Execute(AuthorizeNet.Environment.CUSTOM);
            //mockController.MockObject.Execute();
            // or var controllerResponse = mockController.MockObject.ExecuteWithApiResponse(AuthorizeNet.Environment.CUSTOM);
            var controllerResponse = mockController.MockObject.GetApiResponse();
            Assert.IsNotNull(controllerResponse);

            Assert.IsNotNull(controllerResponse.subscription);
            LogHelper.info(Logger, "ARBGetSubscription: Details:{0}", controllerResponse.subscription);
	    }
 public static void customerPaymentProfileMaskedType ( customerPaymentProfileMaskedType request)
 {
     if (null != request)
     {
         paymentMaskedType(request.payment);
     }
 }