Exemplo n.º 1
0
        public void Settlement_Close_Batch_Request_Returns_Successfully()
        {
            var paymentsControllerTests = new PaymentsControllerTests();

            paymentsControllerTests.Credit_Card_Present_AuthorizationOnly_And_PriorAuthCapture_Requests_Returns_Successfully();
            paymentsControllerTests.Credit_Card_Not_Present_Charge_Authorization_And_Capture_Request_Returns_Successfully();
            paymentsControllerTests.Credit_Card_Not_Present_Include_Addres_Request_Returns_Successfully();

            // Arrange
            var request = new BatchCloseRequest()
            {
                DeveloperApplication = new DeveloperApplication()
                {
                    DeveloperId = 12345678,
                    Version     = "1.2"
                }
            };
            var apiContext = new APIContext();
            var controller = new BatchesController();

            // Act
            var response = controller.ProcessRequest <BatchCloseResponse>(apiContext, request);

            // Assert
            Assert.IsNotNull(response);
            Assert.IsTrue(response.Success);
        }
Exemplo n.º 2
0
 public BatchesControllerTest()
 {
     _serviceMock = new Mock <IBatchService>();
     _mapperMock  = new Mock <IMapper>();
     _loggerMock  = new Mock <ILogger <BatchesController> >();
     controller   = new BatchesController(_serviceMock.Object, _mapperMock.Object, _loggerMock.Object);
 }
        public void Settlement_Close_Batch_Request_Returns_Successfully()
        {
            var paymentsControllerTests = new PaymentsControllerTests();
            paymentsControllerTests.Credit_Card_Present_AuthorizationOnly_And_PriorAuthCapture_Requests_Returns_Successfully();
            paymentsControllerTests.Credit_Card_Not_Present_Charge_Authorization_And_Capture_Request_Returns_Successfully();
            paymentsControllerTests.Credit_Card_Not_Present_Include_Addres_Request_Returns_Successfully();

            // Arrange
            var request = new BatchCloseRequest()
            {
                DeveloperApplication = new DeveloperApplication()
                {
                    DeveloperId = 12345678, 
                    Version = "1.2"
                }
            };
            var apiContext = new APIContext();
            var controller = new BatchesController();

            // Act
            var response = controller.ProcessRequest<BatchCloseResponse>(apiContext, request);

            // Assert
            Assert.IsNotNull(response);
            Assert.IsTrue(response.Success);
        }
Exemplo n.º 4
0
        public void Settlement_Retrieving_Current_Batch_Request_Returns_Successfully()
        {
            // Arrange
            var request    = new BatchCurrentRequest();
            var apiContext = new APIContext();
            var controller = new BatchesController();

            // Act
            var response = controller.ProcessRequest <BatchCurrentResponse>(apiContext, request);

            // Assert
            Assert.IsNotNull(response);
            Assert.IsTrue(response.Success);
        }
        public void Settlement_Retrieving_Current_Batch_Request_Returns_Successfully()
        {
            // Arrange
            var request = new BatchCurrentRequest();
            var apiContext = new APIContext();
            var controller = new BatchesController();

            // Act
            var response = controller.ProcessRequest<BatchCurrentResponse>(apiContext, request);

            // Assert
            Assert.IsNotNull(response);
            Assert.IsTrue(response.Success);
        }