Search in sources :

Example 1 with BooleanFieldValidator

use of io.spine.validate.BooleanFieldValidator in project core-java by SpineEventEngine.

the class FieldValidatorFactoryShould method create_Boolean_field_validator.

@Test
public void create_Boolean_field_validator() {
    final FieldDescriptor field = BoolValue.getDescriptor().getFields().get(0);
    final FieldValidator validator = FieldValidatorFactory.create(field, new Object(), FIELD_PATH);
    assertTrue(validator instanceof BooleanFieldValidator);
}
Also used : ByteStringFieldValidator(io.spine.validate.ByteStringFieldValidator) FloatFieldValidator(io.spine.validate.FloatFieldValidator) StringFieldValidator(io.spine.validate.StringFieldValidator) LongFieldValidator(io.spine.validate.LongFieldValidator) BooleanFieldValidator(io.spine.validate.BooleanFieldValidator) BooleanFieldValidator(io.spine.validate.BooleanFieldValidator) FieldDescriptor(com.google.protobuf.Descriptors.FieldDescriptor) Test(org.junit.Test)

Aggregations

FieldDescriptor (com.google.protobuf.Descriptors.FieldDescriptor)1 BooleanFieldValidator (io.spine.validate.BooleanFieldValidator)1 ByteStringFieldValidator (io.spine.validate.ByteStringFieldValidator)1 FloatFieldValidator (io.spine.validate.FloatFieldValidator)1 LongFieldValidator (io.spine.validate.LongFieldValidator)1 StringFieldValidator (io.spine.validate.StringFieldValidator)1 Test (org.junit.Test)1