Search in sources :

Example 1 with StringFieldValidator

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

the class FieldValidatorFactoryShould method create_String_field_validator.

@Test
public void create_String_field_validator() {
    final FieldDescriptor field = StringValue.getDescriptor().getFields().get(0);
    final FieldValidator validator = FieldValidatorFactory.create(field, "", FIELD_PATH);
    assertTrue(validator instanceof StringFieldValidator);
}
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) ByteStringFieldValidator(io.spine.validate.ByteStringFieldValidator) StringFieldValidator(io.spine.validate.StringFieldValidator) 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