Search in sources :

Example 16 with TestEventFactory

use of io.spine.server.command.TestEventFactory in project core-java by SpineEventEngine.

the class ProcessManagerDispatcherShould method pass_null_tolerance_check.

@Test
public void pass_null_tolerance_check() {
    TestActorRequestFactory requestFactory = TestActorRequestFactory.newInstance(getClass());
    TestEventFactory eventFactory = TestEventFactory.newInstance(getClass());
    final Command command = requestFactory.generateCommand();
    new NullPointerTester().setDefault(CommandEnvelope.class, CommandEnvelope.of(command)).setDefault(EventEnvelope.class, EventEnvelope.of(eventFactory.createEvent(newUuidValue()))).setDefault(RejectionEnvelope.class, RejectionEnvelope.of(createRejection(newUuidValue(), command))).setDefault(ProcessManager.class, mock(ProcessManager.class)).testAllPublicStaticMethods(ProcessManagerDispatcher.class);
}
Also used : TestActorRequestFactory(io.spine.client.TestActorRequestFactory) EventEnvelope(io.spine.core.EventEnvelope) TestEventFactory(io.spine.server.command.TestEventFactory) Command(io.spine.core.Command) NullPointerTester(com.google.common.testing.NullPointerTester) Test(org.junit.Test)

Aggregations

TestEventFactory (io.spine.server.command.TestEventFactory)16 Event (io.spine.core.Event)10 Test (org.junit.Test)8 EventEnvelope (io.spine.core.EventEnvelope)4 StringValue (com.google.protobuf.StringValue)3 ProjectId (io.spine.test.aggregate.ProjectId)2 AggProjectArchived (io.spine.test.aggregate.event.AggProjectArchived)2 ProjectId (io.spine.test.integration.ProjectId)2 NullPointerTester (com.google.common.testing.NullPointerTester)1 Duration (com.google.protobuf.Duration)1 FloatValue (com.google.protobuf.FloatValue)1 Int32Value (com.google.protobuf.Int32Value)1 Timestamp (com.google.protobuf.Timestamp)1 TestActorRequestFactory (io.spine.client.TestActorRequestFactory)1 Command (io.spine.core.Command)1 MessageEnvelope (io.spine.core.MessageEnvelope)1 Version (io.spine.core.Version)1 GivenEvent (io.spine.core.given.GivenEvent)1 AggregateEventRecord (io.spine.server.aggregate.AggregateEventRecord)1 FailingAggregateRepository (io.spine.server.aggregate.given.AggregateRepositoryTestEnv.FailingAggregateRepository)1