Search in sources :

Example 1 with CampaignFormBuilder

use of de.symeda.sormas.ui.campaign.campaigndata.CampaignFormBuilder in project SORMAS-Project by hzi-braunschweig.

the class ExpressionProcessorTest method setup.

@Before
public void setup() throws IOException {
    GridLayout campaignFormLayout = new GridLayout(12, 1);
    ObjectMapper objectMapper = new ObjectMapper();
    List<CampaignFormElement> campaignFormElements = createData(objectMapper, this.getClass().getResourceAsStream("/campaign/expressions/formelements.json"), CampaignFormElement.class);
    List<CampaignFormDataEntry> campaignFormDataEntries = createData(objectMapper, this.getClass().getResourceAsStream("/campaign/expressions/formvalues.json"), CampaignFormDataEntry.class);
    campaignFormBuilder = new CampaignFormBuilder(campaignFormElements, campaignFormDataEntries, campaignFormLayout, Collections.emptyList());
    campaignFormBuilder.buildForm();
    expressionProcessor = new ExpressionProcessor(campaignFormBuilder);
}
Also used : GridLayout(com.vaadin.ui.GridLayout) CampaignFormBuilder(de.symeda.sormas.ui.campaign.campaigndata.CampaignFormBuilder) CampaignFormElement(de.symeda.sormas.api.campaign.form.CampaignFormElement) CampaignFormDataEntry(de.symeda.sormas.api.campaign.data.CampaignFormDataEntry) ObjectMapper(com.fasterxml.jackson.databind.ObjectMapper) Before(org.junit.Before)

Aggregations

ObjectMapper (com.fasterxml.jackson.databind.ObjectMapper)1 GridLayout (com.vaadin.ui.GridLayout)1 CampaignFormDataEntry (de.symeda.sormas.api.campaign.data.CampaignFormDataEntry)1 CampaignFormElement (de.symeda.sormas.api.campaign.form.CampaignFormElement)1 CampaignFormBuilder (de.symeda.sormas.ui.campaign.campaigndata.CampaignFormBuilder)1 Before (org.junit.Before)1