Package org.axonframework.test.utils

Examples of org.axonframework.test.utils.CallbackBehavior.handle()


    public void testFixtureApi_WhenTimeElapses_UsingCallbackBehavior() throws Throwable {
        UUID identifier = UUID.randomUUID();
        UUID identifier2 = UUID.randomUUID();
        AnnotatedSagaTestFixture fixture = new AnnotatedSagaTestFixture(StubSaga.class);
        CallbackBehavior commandHandler = mock(CallbackBehavior.class);
        when(commandHandler.handle(eq("Say hi!"), isA(MetaData.class))).thenReturn("Hi again!");
        fixture.setCallbackBehavior(commandHandler);
        fixture.registerCommandGateway(StubGateway.class);

        fixture.givenAggregate(identifier).published(new TriggerSagaStartEvent(identifier.toString()))
               .andThenAggregate(identifier2).published(new TriggerExistingSagaEvent(identifier2.toString()))
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.