Search in sources :

Example 1 with I18nHelper

use of org.kie.workbench.common.forms.adf.engine.shared.formGeneration.I18nHelper in project kie-wb-common by kiegroup.

the class AbstractFormGenerationTest method init.

protected void init() {
    i18nHelper = spy(I18nHelper.class);
    resourcesProvider = new TestFormGenerationResourcesProvider();
    generator = new TestFormGenerator(new LayoutGenerator(), i18nHelper);
    generator.registerProcessor(new TestFieldElementProcessor(fieldManager, new TestPropertyValueExtractor()));
    generator.registerResources(resourcesProvider);
    model.setName("John");
    model.setLastName("Snow");
    model.setMarried(Boolean.FALSE);
    model.setBirthDay(new Date());
    model.setWeight(new Weight(75));
    model.setHeight(new Height(1.80));
    model.setAddress(new Address("Main Street", 1, "Winterfell"));
    model.getWeapons().add(new Weapon("Sword", 10));
    model.getWeapons().add(new Weapon("Axe", 15));
}
Also used : LayoutGenerator(org.kie.workbench.common.forms.adf.engine.shared.formGeneration.layout.LayoutGenerator) I18nHelper(org.kie.workbench.common.forms.adf.engine.shared.formGeneration.I18nHelper) Address(org.kie.workbench.common.forms.adf.engine.shared.formGeneration.model.Address) Height(org.kie.workbench.common.forms.adf.engine.shared.formGeneration.model.Height) Date(java.util.Date) Weight(org.kie.workbench.common.forms.adf.engine.shared.formGeneration.model.Weight) Weapon(org.kie.workbench.common.forms.adf.engine.shared.formGeneration.model.Weapon)

Aggregations

Date (java.util.Date)1 I18nHelper (org.kie.workbench.common.forms.adf.engine.shared.formGeneration.I18nHelper)1 LayoutGenerator (org.kie.workbench.common.forms.adf.engine.shared.formGeneration.layout.LayoutGenerator)1 Address (org.kie.workbench.common.forms.adf.engine.shared.formGeneration.model.Address)1 Height (org.kie.workbench.common.forms.adf.engine.shared.formGeneration.model.Height)1 Weapon (org.kie.workbench.common.forms.adf.engine.shared.formGeneration.model.Weapon)1 Weight (org.kie.workbench.common.forms.adf.engine.shared.formGeneration.model.Weight)1