Search in sources :

Example 1 with PaymentProviders

use of uk.gov.pay.connector.gateway.PaymentProviders in project pay-connector by alphagov.

the class EventFactoryTest method setUp.

@Before
public void setUp() {
    chargeService = mock(ChargeService.class);
    refundDao = mock(RefundDao.class);
    refundService = mock(RefundService.class);
    chargeEventDao = mock(ChargeEventDao.class);
    paymentProviders = mock(PaymentProviders.class);
    PaymentProvider paymentProvider = new SandboxPaymentProvider();
    when(paymentProviders.byName(any(PaymentGatewayName.class))).thenReturn(paymentProvider);
    eventFactory = new EventFactory(chargeService, refundDao, refundService, chargeEventDao, paymentProviders);
}
Also used : PaymentProvider(uk.gov.pay.connector.gateway.PaymentProvider) SandboxPaymentProvider(uk.gov.pay.connector.gateway.sandbox.SandboxPaymentProvider) EventFactory(uk.gov.pay.connector.events.model.EventFactory) RefundService(uk.gov.pay.connector.refund.service.RefundService) RefundDao(uk.gov.pay.connector.refund.dao.RefundDao) ChargeEventDao(uk.gov.pay.connector.chargeevent.dao.ChargeEventDao) PaymentProviders(uk.gov.pay.connector.gateway.PaymentProviders) PaymentGatewayName(uk.gov.pay.connector.gateway.PaymentGatewayName) ChargeService(uk.gov.pay.connector.charge.service.ChargeService) SandboxPaymentProvider(uk.gov.pay.connector.gateway.sandbox.SandboxPaymentProvider) Before(org.junit.Before)

Aggregations

Before (org.junit.Before)1 ChargeService (uk.gov.pay.connector.charge.service.ChargeService)1 ChargeEventDao (uk.gov.pay.connector.chargeevent.dao.ChargeEventDao)1 EventFactory (uk.gov.pay.connector.events.model.EventFactory)1 PaymentGatewayName (uk.gov.pay.connector.gateway.PaymentGatewayName)1 PaymentProvider (uk.gov.pay.connector.gateway.PaymentProvider)1 PaymentProviders (uk.gov.pay.connector.gateway.PaymentProviders)1 SandboxPaymentProvider (uk.gov.pay.connector.gateway.sandbox.SandboxPaymentProvider)1 RefundDao (uk.gov.pay.connector.refund.dao.RefundDao)1 RefundService (uk.gov.pay.connector.refund.service.RefundService)1