Search in sources :

Example 1 with StateMachineProvider

use of org.killbill.billing.payment.glue.PaymentModule.StateMachineProvider in project killbill by killbill.

the class TestStateMachineProvider method testStateMachineProvider.

@Test(groups = "fast", description = "https://github.com/killbill/killbill/issues/226")
public void testStateMachineProvider() throws Exception {
    final StateMachineProvider retryStateMachineProvider = new StateMachineProvider(PaymentModule.DEFAULT_STATE_MACHINE_RETRY_XML);
    final StateMachineConfig retryStateMachineConfig = retryStateMachineProvider.get();
    Assert.assertEquals(retryStateMachineConfig.getStateMachines().length, 1);
    final StateMachineProvider paymentStateMachineProvider = new StateMachineProvider(PaymentModule.DEFAULT_STATE_MACHINE_PAYMENT_XML);
    final StateMachineConfig paymentStateMachineConfig = paymentStateMachineProvider.get();
    Assert.assertEquals(paymentStateMachineConfig.getStateMachines().length, 8);
}
Also used : StateMachineProvider(org.killbill.billing.payment.glue.PaymentModule.StateMachineProvider) StateMachineConfig(org.killbill.automaton.StateMachineConfig) Test(org.testng.annotations.Test)

Aggregations

StateMachineConfig (org.killbill.automaton.StateMachineConfig)1 StateMachineProvider (org.killbill.billing.payment.glue.PaymentModule.StateMachineProvider)1 Test (org.testng.annotations.Test)1