FieldEntity field3 = getDao().getFieldDao().getById(field.getId());
assertEquals("update", field3.getTitle());
}
public void testGetByForm() {
FormEntity form = formTool.addForm("form");
fieldTool.addField("field1", FieldType.TEXT, "text1", form);
fieldTool.addField("field2", FieldType.TEXT, "text2", form);
fieldTool.addField("field3", FieldType.TEXT, "text3", form);
FormEntity form2 = formTool.addForm("form");
fieldTool.addField("field21", FieldType.TEXT, "text21", form2);
fieldTool.addField("field22", FieldType.TEXT, "text22", form2);
List<FieldEntity> fields = getDao().getFieldDao().getByForm(form);
assertEquals(3, fields.size());
fields = getDao().getFieldDao().getByForm(form2);