use of io.spine.test.aggregate.command.ImportEvents in project core-java by SpineEventEngine.
the class AggregateShould method import_events.
@Test
public void import_events() {
final String projectName = getClass().getSimpleName();
final ProjectId id = aggregate.getId();
final ImportEvents importCmd = ImportEvents.newBuilder().setProjectId(id).addEvent(event(projectCreated(id, projectName), 1)).addEvent(event(taskAdded(id), 2)).build();
aggregate.dispatchCommands(command(importCmd));
assertTrue(aggregate.isProjectCreatedEventApplied);
assertTrue(aggregate.isTaskAddedEventApplied);
}
Aggregations