use of org.kie.workbench.common.forms.jbpm.server.service.formGeneration.model.Client in project kie-wb-common by kiegroup.
the class NestedFormsBPMNVFSFormDefinitionGeneratorServiceTest method getClientDataObject.
protected DataObject getClientDataObject() {
DataObject client = new DataObjectImpl(Client.class.getPackage().toString(), Client.class.getSimpleName());
client.addProperty("id", Long.class.getName(), false, null);
client.addProperty("name", String.class.getName(), false, null);
client.addProperty("lastName", String.class.getName(), false, null);
return client;
}
use of org.kie.workbench.common.forms.jbpm.server.service.formGeneration.model.Client in project kie-wb-common by kiegroup.
the class AbstractBPMNFormGeneratorServiceTest method testExpenseForm.
protected void testExpenseForm(FormDefinition form) {
assertEquals(4, form.getFields().size());
IntegerBoxFieldDefinition id = (IntegerBoxFieldDefinition) form.getFieldByBinding("id");
assertNotNull(id);
assertEquals(Long.class.getName(), id.getStandaloneClassName());
DatePickerFieldDefinition date = (DatePickerFieldDefinition) form.getFieldByBinding("date");
assertNotNull(date);
assertEquals(Date.class.getName(), date.getStandaloneClassName());
SubFormFieldDefinition client = (SubFormFieldDefinition) form.getFieldByBinding("client");
assertNotNull(client);
assertNotNull(client.getNestedForm());
assertEquals(Client.class.getName(), client.getStandaloneClassName());
MultipleSubFormFieldDefinition lines = (MultipleSubFormFieldDefinition) form.getFieldByBinding("lines");
assertNotNull(lines);
assertNotNull(lines.getCreationForm());
assertNotNull(lines.getEditionForm());
assertEquals(lines.getEditionForm(), lines.getCreationForm());
assertFalse(lines.getColumnMetas().isEmpty());
assertEquals(Line.class.getName(), lines.getStandaloneClassName());
}
use of org.kie.workbench.common.forms.jbpm.server.service.formGeneration.model.Client in project kie-wb-common by kiegroup.
the class NestedFormsBPMNVFSFormDefinitionGeneratorServiceTest method getExpenseDataObject.
protected DataObject getExpenseDataObject() {
DataObject expense = new DataObjectImpl(Expense.class.getPackage().toString(), Expense.class.getSimpleName());
expense.addProperty("id", Long.class.getName(), false, null);
expense.addProperty("date", Date.class.getName(), false, null);
expense.addProperty("client", Client.class.getName(), false, null);
expense.addProperty("lines", Line.class.getName(), true, List.class.getName());
return expense;
}
Aggregations