Examples of onEventRegistered()


Examples of org.axonframework.unitofwork.UnitOfWorkListener.onEventRegistered()

        );
        testSubject.subscribe(StubCommand.class.getName(), stubHandler);
        stubHandler.setRepository(testSubject
                                          .createRepository(new GenericAggregateFactory<StubAggregate>(StubAggregate.class)));
        final UnitOfWorkListener mockUnitOfWorkListener = mock(UnitOfWorkListener.class);
        when(mockUnitOfWorkListener.onEventRegistered(isA(UnitOfWork.class), any(EventMessage.class)))
                .thenAnswer(new ReturnsArgumentAt(1));
        when(mockHandlerInterceptor.handle(any(CommandMessage.class),
                                           any(UnitOfWork.class),
                                           any(InterceptorChain.class)))
                .thenAnswer(new Answer<Object>() {
View Full Code Here

Examples of org.axonframework.unitofwork.UnitOfWorkListener.onEventRegistered()

        testSubject.subscribe(CreateCommand.class.getName(), stubHandler);
        testSubject.subscribe(ErrorCommand.class.getName(), stubHandler);
        stubHandler.setRepository(testSubject
                                          .createRepository(new GenericAggregateFactory<StubAggregate>(StubAggregate.class)));
        final UnitOfWorkListener mockUnitOfWorkListener = mock(UnitOfWorkListener.class);
        when(mockUnitOfWorkListener.onEventRegistered(isA(UnitOfWork.class), any(EventMessage.class)))
                .thenAnswer(new Parameter(1));
        when(mockInterceptor.handle(any(CommandMessage.class), any(UnitOfWork.class), any(InterceptorChain.class)))
                .thenAnswer(new Answer<Object>() {
                    @Override
                    public Object answer(InvocationOnMock invocation) throws Throwable {
View Full Code Here

Examples of org.axonframework.unitofwork.UnitOfWorkListener.onEventRegistered()

                garbageCollectionPrevention.put(aggregate, new Object());
                return aggregate;
            }
        }).when(spiedRepository).load(isA(Object.class));
        final UnitOfWorkListener mockUnitOfWorkListener = mock(UnitOfWorkListener.class);
        when(mockUnitOfWorkListener.onEventRegistered(isA(UnitOfWork.class), any(EventMessage.class)))
                .thenAnswer(new Answer<Object>() {
                    @Override
                    public Object answer(InvocationOnMock invocation) throws Throwable {
                        return invocation.getArguments()[0];
                    }
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.