Search in sources :

Example 1 with DateTimeType

use of com.qcadoo.model.internal.types.DateTimeType in project qcadoo by qcadoo.

the class FieldTypeFactoryTest method shouldReturnDateTimeType.

@Test
public void shouldReturnDateTimeType() throws Exception {
    // when
    FieldType fieldType = new DateTimeType();
    // then
    assertEquals(Date.class, fieldType.getType());
    assertTrue(fieldType.toObject(fieldDefinition, new Date()).isValid());
}
Also used : DateTimeType(com.qcadoo.model.internal.types.DateTimeType) Date(java.util.Date) FieldType(com.qcadoo.model.api.types.FieldType) DataAccessTest(com.qcadoo.model.internal.DataAccessTest) Test(org.junit.Test)

Aggregations

FieldType (com.qcadoo.model.api.types.FieldType)1 DataAccessTest (com.qcadoo.model.internal.DataAccessTest)1 DateTimeType (com.qcadoo.model.internal.types.DateTimeType)1 Date (java.util.Date)1 Test (org.junit.Test)1