Examples of StubDomainEvent


Examples of org.axonframework.domain.StubDomainEvent

        inOrder.verify(decorator2.lastSpy).next();
        inOrder.verify(decorator1.lastSpy).next();

        inOrder.verify(decorator2.lastSpy).next();
        inOrder.verify(decorator1.lastSpy).next();
        aggregate.apply(new StubDomainEvent());
        aggregate.apply(new StubDomainEvent());
    }
View Full Code Here

Examples of org.axonframework.domain.StubDomainEvent

                new SimpleDomainEventStream(new GenericDomainEventMessage<String>(identifier, (long) 3,
                                                                                  "Mock contents",
                                                                                  MetaData.emptyInstance()
                )));
        TestAggregate aggregate = testSubject.load(identifier);
        aggregate.apply(new StubDomainEvent());
        aggregate.apply(new StubDomainEvent());

        CurrentUnitOfWork.commit();

        InOrder inOrder = Mockito.inOrder(decorator1.lastSpy, decorator2.lastSpy);
        inOrder.verify(decorator1.lastSpy).next();
View Full Code Here

Examples of org.axonframework.domain.StubDomainEvent

        public StubCommandAnnotatedAggregate(CreateCommand createCommand, MetaData metaData, UnitOfWork unitOfWork,
                                             @org.axonframework.common.annotation.MetaData("notExist") String value) {
            super(createCommand.getId());
            Assert.assertNotNull(unitOfWork);
            Assert.assertNull(value);
            apply(new StubDomainEvent());
        }
View Full Code Here

Examples of org.axonframework.domain.StubDomainEvent

        FileSystemEventStore eventStore = new FileSystemEventStore(new SimpleEventFileResolver(eventFileBaseDir));

        GenericDomainEventMessage<StubDomainEvent> event1 = new GenericDomainEventMessage<StubDomainEvent>(
                aggregateIdentifier,
                0,
                new StubDomainEvent());
        GenericDomainEventMessage<StubDomainEvent> event2 = new GenericDomainEventMessage<StubDomainEvent>(
                aggregateIdentifier,
                1,
                new StubDomainEvent());
        GenericDomainEventMessage<StubDomainEvent> event3 = new GenericDomainEventMessage<StubDomainEvent>(
                aggregateIdentifier,
                2,
                new StubDomainEvent());
        DomainEventStream stream = new SimpleDomainEventStream(event1, event2, event3);
        eventStore.appendEvents("test", stream);

        DomainEventStream eventStream = eventStore.readEvents("test", aggregateIdentifier);
        List<DomainEventMessage<?>> domainEvents = new ArrayList<DomainEventMessage<?>>();
View Full Code Here

Examples of org.axonframework.domain.StubDomainEvent

        FileSystemEventStore eventStore = new FileSystemEventStore(new SimpleEventFileResolver(eventFileBaseDir));

        GenericDomainEventMessage<StubDomainEvent> event1 = new GenericDomainEventMessage<StubDomainEvent>(
                aggregateIdentifier,
                0,
                new StubDomainEvent());
        GenericDomainEventMessage<StubDomainEvent> event2 = new GenericDomainEventMessage<StubDomainEvent>(
                aggregateIdentifier,
                1,
                new StubDomainEvent());
        DomainEventStream stream = new SimpleDomainEventStream(event1, event2);
        eventStore.appendEvents("test", stream);

        GenericDomainEventMessage<StubDomainEvent> event3 = new GenericDomainEventMessage<StubDomainEvent>(
                aggregateIdentifier,
                0,
                new StubDomainEvent());
        DomainEventStream stream2 = new SimpleDomainEventStream(event3);
        eventStore.appendEvents("test", stream2);
    }
View Full Code Here

Examples of org.axonframework.domain.StubDomainEvent

                                                                   new SimpleEventFileResolver(eventFileBaseDir));

        GenericDomainEventMessage<StubDomainEvent> event1 = new GenericDomainEventMessage<StubDomainEvent>(
                aggregateIdentifier,
                0,
                new StubDomainEvent());
        GenericDomainEventMessage<StubDomainEvent> event2 = new GenericDomainEventMessage<StubDomainEvent>(
                aggregateIdentifier,
                1,
                new StubDomainEvent());
        DomainEventStream stream = new SimpleDomainEventStream(event1, event2);
        eventStore.appendEvents("test", stream);

        doReturn(new SimpleSerializedObject<byte[]>("error".getBytes(), byte[].class, String.class.getName(), "old"))
                .when(serializer).serialize(anyObject(), eq(byte[].class));
View Full Code Here

Examples of org.axonframework.domain.StubDomainEvent

                0,
                new MyStubDomainEvent(description));
        GenericDomainEventMessage<StubDomainEvent> event2 = new GenericDomainEventMessage<StubDomainEvent>(
                aggregateIdentifier,
                1,
                new StubDomainEvent());

        DomainEventStream stream = new SimpleDomainEventStream(event1, event2);
        eventStore.appendEvents("test", stream);

        DomainEventStream eventStream = eventStore.readEvents("test", aggregateIdentifier);
View Full Code Here

Examples of org.axonframework.domain.StubDomainEvent

        FileSystemEventStore eventStore = new FileSystemEventStore(mockEventFileResolver);

        GenericDomainEventMessage<StubDomainEvent> event1 = new GenericDomainEventMessage<StubDomainEvent>(
                aggregateIdentifier,
                0,
                new StubDomainEvent());
        GenericDomainEventMessage<StubDomainEvent> event2 = new GenericDomainEventMessage<StubDomainEvent>(
                aggregateIdentifier,
                1,
                new StubDomainEvent());
        GenericDomainEventMessage<StubDomainEvent> event3 = new GenericDomainEventMessage<StubDomainEvent>(
                aggregateIdentifier,
                2,
                new StubDomainEvent());
        DomainEventStream stream = new SimpleDomainEventStream(event1, event2, event3);

        try {
            eventStore.appendEvents("test", stream);
            fail("Expected an exception");
View Full Code Here

Examples of org.axonframework.domain.StubDomainEvent

        AtomicInteger counter = new AtomicInteger(0);

        GenericDomainEventMessage<StubDomainEvent> snapshot1 = new GenericDomainEventMessage<StubDomainEvent>(
                aggregateIdentifier,
                4,
                new StubDomainEvent());
        GenericDomainEventMessage<StubDomainEvent> snapshot2 = new GenericDomainEventMessage<StubDomainEvent>(
                aggregateIdentifier,
                9,
                new StubDomainEvent());
        GenericDomainEventMessage<StubDomainEvent> snapshot3 = new GenericDomainEventMessage<StubDomainEvent>(
                aggregateIdentifier,
                14,
                new StubDomainEvent());

        writeEvents(counter, 5);
        eventStore.appendSnapshotEvent("snapshotting", snapshot1);
        writeEvents(counter, 5);
        eventStore.appendSnapshotEvent("snapshotting", snapshot2);
View Full Code Here

Examples of org.axonframework.domain.StubDomainEvent

        List<DomainEventMessage> events = new ArrayList<DomainEventMessage>();
        for (int t = 0; t < numberOfEvents; t++) {
            GenericDomainEventMessage<StubDomainEvent> event = new GenericDomainEventMessage<StubDomainEvent>(
                    aggregateIdentifier,
                    counter.getAndIncrement(),
                    new StubDomainEvent());
            events.add(event);
        }
        eventStore.appendEvents("snapshotting", new SimpleDomainEventStream(events));
    }
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.