use of com.qcadoo.model.internal.validators.ScaleValidator in project qcadoo by qcadoo.
the class ValidatorTest method shouldIgnoreScaleValidatorForStringValue.
@Test
public void shouldIgnoreScaleValidatorForStringValue() throws Exception {
// given
Entity entity = new DefaultEntity(dataDefinition);
entity.setField("name", "Qcadoo Framework RLZ!");
fieldDefinitionName.withValidator(new ScaleValidator(null, 1, null));
// when
entity = dataDefinition.save(entity);
// then
verify(session).save(any(SampleSimpleDatabaseObject.class));
assertTrue(entity.isValid());
}
Aggregations