Search in sources :

Example 1 with PriorityType

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

the class FieldTypeFactoryTest method shouldReturnPriorityType.

@Test
public void shouldReturnPriorityType() throws Exception {
    // given
    FieldDefinition fieldDefinition = new FieldDefinitionImpl(null, "aaa");
    // when
    FieldType fieldType = new PriorityType(fieldDefinition);
    // then
    assertEquals(Integer.class, fieldType.getType());
    assertTrue(fieldType.toObject(fieldDefinition, 1).isValid());
    assertEquals(fieldDefinition, ((PriorityType) fieldType).getScopeFieldDefinition());
}
Also used : PriorityType(com.qcadoo.model.internal.types.PriorityType) FieldDefinition(com.qcadoo.model.api.FieldDefinition) FieldDefinitionImpl(com.qcadoo.model.internal.FieldDefinitionImpl) FieldType(com.qcadoo.model.api.types.FieldType) DataAccessTest(com.qcadoo.model.internal.DataAccessTest) Test(org.junit.Test)

Aggregations

FieldDefinition (com.qcadoo.model.api.FieldDefinition)1 FieldType (com.qcadoo.model.api.types.FieldType)1 DataAccessTest (com.qcadoo.model.internal.DataAccessTest)1 FieldDefinitionImpl (com.qcadoo.model.internal.FieldDefinitionImpl)1 PriorityType (com.qcadoo.model.internal.types.PriorityType)1 Test (org.junit.Test)1