Package org.axonframework.domain

Examples of org.axonframework.domain.AggregateRoot


    @Test
    public void testObtainAndReleaseLocks() {
        PessimisticLockManager manager = new PessimisticLockManager();
        UUID identifier = UUID.randomUUID();
        AggregateRoot aggregateRoot = mock(AggregateRoot.class);
        when(aggregateRoot.getIdentifier()).thenReturn(identifier);

        assertFalse(manager.validateLock(aggregateRoot));

        manager.obtainLock(identifier);
        assertTrue(manager.validateLock(aggregateRoot));
View Full Code Here

TOP

Related Classes of org.axonframework.domain.AggregateRoot

Copyright © 2018 www.massapicom. 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.