Search in sources :

Example 1 with CancelledByUser

use of uk.gov.pay.connector.events.model.charge.CancelledByUser in project pay-connector by alphagov.

the class QueueMessageContractTest method verifyCancelledByUserEvent.

@PactVerifyProvider("a cancelled by user message")
public String verifyCancelledByUserEvent() throws JsonProcessingException {
    ChargeEntity charge = aValidChargeEntity().withTransactionId("gateway_transaction_id").withGatewayTransactionId("gateway_transaction_id").build();
    ChargeEventEntity chargeEventEntity = aValidChargeEventEntity().withCharge(charge).build();
    CancelledByUser event = CancelledByUser.from(chargeEventEntity);
    return event.toJsonString();
}
Also used : CancelledByUser(uk.gov.pay.connector.events.model.charge.CancelledByUser) ChargeEntityFixture.aValidChargeEntity(uk.gov.pay.connector.charge.model.domain.ChargeEntityFixture.aValidChargeEntity) ChargeEntity(uk.gov.pay.connector.charge.model.domain.ChargeEntity) ChargeEventEntity(uk.gov.pay.connector.chargeevent.model.domain.ChargeEventEntity) ChargeEventEntityFixture.aValidChargeEventEntity(uk.gov.pay.connector.pact.ChargeEventEntityFixture.aValidChargeEventEntity) PactVerifyProvider(au.com.dius.pact.provider.PactVerifyProvider)

Aggregations

PactVerifyProvider (au.com.dius.pact.provider.PactVerifyProvider)1 ChargeEntity (uk.gov.pay.connector.charge.model.domain.ChargeEntity)1 ChargeEntityFixture.aValidChargeEntity (uk.gov.pay.connector.charge.model.domain.ChargeEntityFixture.aValidChargeEntity)1 ChargeEventEntity (uk.gov.pay.connector.chargeevent.model.domain.ChargeEventEntity)1 CancelledByUser (uk.gov.pay.connector.events.model.charge.CancelledByUser)1 ChargeEventEntityFixture.aValidChargeEventEntity (uk.gov.pay.connector.pact.ChargeEventEntityFixture.aValidChargeEventEntity)1