use of io.spine.test.aggregate.event.AggProjectCreated in project core-java by SpineEventEngine.
the class AggregateCommandEndpointShould method post_events_on_command_dispatching.
@Test
public void post_events_on_command_dispatching() {
final CommandEnvelope cmd = CommandEnvelope.of(createProject(projectId));
repository.dispatch(cmd);
final AggProjectCreated msg = subscriber.remembered;
assertEquals(projectId, msg.getProjectId());
}
use of io.spine.test.aggregate.event.AggProjectCreated in project core-java by SpineEventEngine.
the class TestAggregate method handle.
@Assign
AggProjectCreated handle(AggCreateProject cmd, CommandContext ctx) {
isCreateProjectCommandHandled = true;
final AggProjectCreated event = projectCreated(cmd.getProjectId(), cmd.getName());
return event;
}
Aggregations