Search in sources :

Example 6 with RequiredStringFieldValue

use of io.spine.test.validate.msg.RequiredStringFieldValue in project core-java by SpineEventEngine.

the class MessageValidatorShould method find_out_that_required_String_field_is_NOT_set.

@Test
public void find_out_that_required_String_field_is_NOT_set() {
    final RequiredStringFieldValue invalidMsg = RequiredStringFieldValue.getDefaultInstance();
    validate(invalidMsg);
    assertIsValid(false);
}
Also used : CustomMessageRequiredStringFieldValue(io.spine.test.validate.msg.CustomMessageRequiredStringFieldValue) RequiredStringFieldValue(io.spine.test.validate.msg.RequiredStringFieldValue) Test(org.junit.Test)

Example 7 with RequiredStringFieldValue

use of io.spine.test.validate.msg.RequiredStringFieldValue in project core-java by SpineEventEngine.

the class MessageValidatorShould method find_out_that_enclosed_message_field_is_NOT_valid.

@Test
public void find_out_that_enclosed_message_field_is_NOT_valid() {
    final RequiredStringFieldValue enclosedMsg = RequiredStringFieldValue.getDefaultInstance();
    final EnclosedMessageFieldValue msg = EnclosedMessageFieldValue.newBuilder().setOuterMsgField(enclosedMsg).build();
    validate(msg);
    assertIsValid(false);
}
Also used : EnclosedMessageFieldValue(io.spine.test.validate.msg.EnclosedMessageFieldValue) CustomMessageRequiredStringFieldValue(io.spine.test.validate.msg.CustomMessageRequiredStringFieldValue) RequiredStringFieldValue(io.spine.test.validate.msg.RequiredStringFieldValue) Test(org.junit.Test)

Aggregations

CustomMessageRequiredStringFieldValue (io.spine.test.validate.msg.CustomMessageRequiredStringFieldValue)7 RequiredStringFieldValue (io.spine.test.validate.msg.RequiredStringFieldValue)7 Test (org.junit.Test)7 EnclosedMessageFieldValue (io.spine.test.validate.msg.EnclosedMessageFieldValue)3 ConstraintViolation (io.spine.validate.ConstraintViolation)2 EnclosedMessageWithoutAnnotationFieldValue (io.spine.test.validate.msg.EnclosedMessageWithoutAnnotationFieldValue)1