use of com.qcadoo.model.internal.types.TextType in project qcadoo by qcadoo.
the class FieldTypeFactoryTest method shouldReturnTextType.
@Test
public void shouldReturnTextType() throws Exception {
// when
FieldType fieldType = new TextType();
// then
assertEquals(String.class, fieldType.getType());
assertTrue(fieldType.toObject(fieldDefinition, "test").isValid());
assertTrue(fieldType.toObject(fieldDefinition, StringUtils.repeat("a", 2048)).isValid());
assertTrue(fieldType.toObject(fieldDefinition, StringUtils.repeat("a", 2049)).isValid());
}
Aggregations