Search in sources :

Example 1 with RequiredFieldCommand

use of io.spine.test.commands.RequiredFieldCommand in project core-java by SpineEventEngine.

the class CommandFactoryShould method throw_ConstraintViolation_exception_once_passed_invalid_Message.

@Test(expected = ConstraintViolationThrowable.class)
public void throw_ConstraintViolation_exception_once_passed_invalid_Message() {
    final RequiredFieldCommand invalidCommand = RequiredFieldCommand.getDefaultInstance();
    factory().command().create(invalidCommand);
}
Also used : RequiredFieldCommand(io.spine.test.commands.RequiredFieldCommand) Test(org.junit.Test)

Example 2 with RequiredFieldCommand

use of io.spine.test.commands.RequiredFieldCommand in project core-java by SpineEventEngine.

the class CommandFactoryShould method throw_ConstraintViolation_exception_once_passed_invalid_Message_with_version.

@Test(expected = ConstraintViolationThrowable.class)
public void throw_ConstraintViolation_exception_once_passed_invalid_Message_with_version() {
    final RequiredFieldCommand invalidCommand = RequiredFieldCommand.getDefaultInstance();
    factory().command().create(invalidCommand, 42);
}
Also used : RequiredFieldCommand(io.spine.test.commands.RequiredFieldCommand) Test(org.junit.Test)

Aggregations

RequiredFieldCommand (io.spine.test.commands.RequiredFieldCommand)2 Test (org.junit.Test)2