use of io.spine.test.validate.msg.MinNumberFieldValue in project core-java by SpineEventEngine.
the class MessageValidatorShould method find_out_that_number_is_less_than_min.
@Test
public void find_out_that_number_is_less_than_min() {
final MinNumberFieldValue msg = MinNumberFieldValue.newBuilder().setValue(LESS_THAN_MIN).build();
validate(msg);
assertIsValid(false);
}
use of io.spine.test.validate.msg.MinNumberFieldValue in project core-java by SpineEventEngine.
the class MessageValidatorShould method find_out_that_number_is_greater_than_min.
/*
* Min option tests.
*/
@Test
public void find_out_that_number_is_greater_than_min() {
final MinNumberFieldValue msg = MinNumberFieldValue.newBuilder().setValue(GREATER_THAN_MIN).build();
validate(msg);
assertIsValid(true);
}
use of io.spine.test.validate.msg.MinNumberFieldValue in project core-java by SpineEventEngine.
the class MessageValidatorShould method provide_one_valid_violation_if_number_is_less_than_min.
@Test
public void provide_one_valid_violation_if_number_is_less_than_min() {
final MinNumberFieldValue msg = MinNumberFieldValue.newBuilder().setValue(LESS_THAN_MIN).build();
validate(msg);
assertEquals(1, violations.size());
final ConstraintViolation violation = firstViolation();
assertEquals(LESS_THAN_MIN_MSG, format(violation.getMsgFormat(), violation.getParam(0)));
assertFieldPathIs(violation, VALUE);
assertTrue(violation.getViolationList().isEmpty());
}
use of io.spine.test.validate.msg.MinNumberFieldValue in project core-java by SpineEventEngine.
the class MessageValidatorShould method find_out_that_number_is_equal_to_min.
@Test
public void find_out_that_number_is_equal_to_min() {
final MinNumberFieldValue msg = MinNumberFieldValue.newBuilder().setValue(EQUAL_MIN).build();
validate(msg);
assertIsValid(true);
}
Aggregations