Search in sources :

Example 1 with ItgStartProject

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;
}
Also used : Rejections.toRejection(io.spine.core.Rejections.toRejection) Rejection(io.spine.core.Rejection) ItgStartProject(io.spine.test.integration.command.ItgStartProject) Command(io.spine.core.Command) ProjectId(io.spine.test.integration.ProjectId) ItgCannotStartArchivedProject(io.spine.test.integration.rejection.IntegrationRejections.ItgCannotStartArchivedProject)

Aggregations

Command (io.spine.core.Command)1 Rejection (io.spine.core.Rejection)1 Rejections.toRejection (io.spine.core.Rejections.toRejection)1 ProjectId (io.spine.test.integration.ProjectId)1 ItgStartProject (io.spine.test.integration.command.ItgStartProject)1 ItgCannotStartArchivedProject (io.spine.test.integration.rejection.IntegrationRejections.ItgCannotStartArchivedProject)1