Search in sources :

Example 1 with EmptyEventDetails

use of uk.gov.pay.connector.events.eventdetails.EmptyEventDetails in project pay-connector by alphagov.

the class PaymentGatewayStateTransitionsTest method isValidTransition_deniesTransitionWithInvalidEvent.

@Test
public void isValidTransition_deniesTransitionWithInvalidEvent() {
    assertThat(PaymentGatewayStateTransitions.isValidTransition(CAPTURE_READY, CAPTURE_SUBMITTED, new CaptureSubmitted("id", true, "a", new EmptyEventDetails(), ZonedDateTime.now())), is(true));
    assertThat(PaymentGatewayStateTransitions.isValidTransition(CAPTURE_READY, CAPTURE_SUBMITTED, new CaptureErrored("id", true, "a", ZonedDateTime.now())), is(false));
}
Also used : EmptyEventDetails(uk.gov.pay.connector.events.eventdetails.EmptyEventDetails) CaptureSubmitted(uk.gov.pay.connector.events.model.charge.CaptureSubmitted) CaptureErrored(uk.gov.pay.connector.events.model.charge.CaptureErrored) Test(org.junit.Test)

Aggregations

Test (org.junit.Test)1 EmptyEventDetails (uk.gov.pay.connector.events.eventdetails.EmptyEventDetails)1 CaptureErrored (uk.gov.pay.connector.events.model.charge.CaptureErrored)1 CaptureSubmitted (uk.gov.pay.connector.events.model.charge.CaptureSubmitted)1