public void MockgetAUJobDetailsTest() { //define all mocked objects as final var mockController = GetMockController<getAUJobDetailsRequest, getAUJobDetailsResponse>(); var mockRequest = new getAUJobDetailsRequest { merchantAuthentication = new merchantAuthenticationType() {name = "mocktest", Item = "mockKey", ItemElementName = ItemChoiceType.transactionKey}, }; var mockResponse = new getAUJobDetailsResponse { refId = "1234", sessionToken = "sessiontoken", Yyyyy = Yyyy, }; var errorResponse = new ANetApiResponse(); var results = new List<String>(); const messageTypeEnum messageTypeOk = messageTypeEnum.Ok; SetMockControllerExpectations<getAUJobDetailsRequest, getAUJobDetailsResponse, getAUJobDetailsController>( 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.Yyyyy); LogHelper.info(Logger, "getAUJobDetails: Details:{0}", controllerResponse.Yyyyy); }
public static void getAUJobDetailsRequest(getAUJobDetailsRequest argument) { if(null != argument) { if(0 <= argument.modifiedTypeFilter) { argument.modifiedTypeFilterSpecified=true;} Paging(argument.paging); } }