Search in sources :

Example 1 with CustomMessageRequiredStringFieldValue

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

the class MessageValidatorShould method propagate_proper_error_message_if_custom_message_set_and_required_String_field_is_NOT_set.

@Test
public void propagate_proper_error_message_if_custom_message_set_and_required_String_field_is_NOT_set() {
    final CustomMessageRequiredStringFieldValue invalidMsg = CustomMessageRequiredStringFieldValue.getDefaultInstance();
    final String expectedMessage = getCustomErrorMessage(CustomMessageRequiredStringFieldValue.getDescriptor());
    validate(invalidMsg);
    assertIsValid(false);
    checkErrorMessage(expectedMessage);
}
Also used : CustomMessageRequiredStringFieldValue(io.spine.test.validate.msg.CustomMessageRequiredStringFieldValue) ByteString(com.google.protobuf.ByteString) Test(org.junit.Test)

Aggregations

ByteString (com.google.protobuf.ByteString)1 CustomMessageRequiredStringFieldValue (io.spine.test.validate.msg.CustomMessageRequiredStringFieldValue)1 Test (org.junit.Test)1