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

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

            SetMockControllerExpectations<sendCustomerTransactionReceiptRequest, sendCustomerTransactionReceiptResponse, sendCustomerTransactionReceiptController>(
                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);

	    }
コード例 #2
0
 public static void sendCustomerTransactionReceiptRequest(sendCustomerTransactionReceiptRequest argument)
 {
     if (null != argument)
     {
         emailSettingsType(argument.emailSettings);
     }
 }
コード例 #3
0
 public static void sendCustomerTransactionReceiptRequest(sendCustomerTransactionReceiptRequest request) { }