Search in sources :

Example 1 with PmThrowEntityAlreadyArchived

use of io.spine.test.procman.command.PmThrowEntityAlreadyArchived in project core-java by SpineEventEngine.

the class ProcessManagerRepositoryShould method post_command_rejections.

@Test
public void post_command_rejections() {
    final ProjectId id = ProjectId.newBuilder().setId(newUuid()).build();
    final PmThrowEntityAlreadyArchived commandMsg = PmThrowEntityAlreadyArchived.newBuilder().setProjectId(id).build();
    final Command command = requestFactory.createCommand(commandMsg);
    repository().dispatchCommand(CommandEnvelope.of(command));
    final StandardRejections.EntityAlreadyArchived expected = StandardRejections.EntityAlreadyArchived.newBuilder().setEntityId(AnyPacker.pack(id)).build();
    assertTrue(TestProcessManager.processed(expected));
}
Also used : PmThrowEntityAlreadyArchived(io.spine.test.procman.command.PmThrowEntityAlreadyArchived) StandardRejections(io.spine.server.entity.rejection.StandardRejections) Command(io.spine.core.Command) ProjectId(io.spine.test.procman.ProjectId) EntityAlreadyArchived(io.spine.server.entity.rejection.StandardRejections.EntityAlreadyArchived) Test(org.junit.Test)

Aggregations

Command (io.spine.core.Command)1 StandardRejections (io.spine.server.entity.rejection.StandardRejections)1 EntityAlreadyArchived (io.spine.server.entity.rejection.StandardRejections.EntityAlreadyArchived)1 ProjectId (io.spine.test.procman.ProjectId)1 PmThrowEntityAlreadyArchived (io.spine.test.procman.command.PmThrowEntityAlreadyArchived)1 Test (org.junit.Test)1