use of io.spine.test.integration.command.ItgStartProject 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;
}
Aggregations