use of io.spine.test.integration.ProjectId in project core-java by SpineEventEngine.
the class IntegrationBusTestEnv method projectStarted.
public static Event projectStarted() {
final ProjectId projectId = projectId();
final TestEventFactory eventFactory = newInstance(pack(projectId), IntegrationBusTestEnv.class);
return eventFactory.createEvent(ItgProjectStarted.newBuilder().setProjectId(projectId).build());
}
use of io.spine.test.integration.ProjectId in project core-java by SpineEventEngine.
the class IntegrationBusTestEnv method cannotStartArchivedProject.
// used to create a rejection
@SuppressWarnings("ThrowableNotThrown")
public static Rejection cannotStartArchivedProject() {
final ProjectId projectId = projectId();
final ItgStartProject cmdMessage = ItgStartProject.newBuilder().setProjectId(projectId).build();
final Command startProjectCmd = toCommand(cmdMessage);
final io.spine.test.integration.rejection.ItgCannotStartArchivedProject throwable = new io.spine.test.integration.rejection.ItgCannotStartArchivedProject(projectId);
throwable.initProducer(AnyPacker.pack(projectId));
final Rejection rejection = toRejection(throwable, startProjectCmd);
return rejection;
}
use of io.spine.test.integration.ProjectId in project core-java by SpineEventEngine.
the class IntegrationBusTestEnv method projectCreated.
public static Event projectCreated() {
final ProjectId projectId = projectId();
final TestEventFactory eventFactory = newInstance(pack(projectId), IntegrationBusTestEnv.class);
return eventFactory.createEvent(ItgProjectCreated.newBuilder().setProjectId(projectId).build());
}
Aggregations