Search in sources :

Example 1 with DataObjectFormModelCreationService

use of org.kie.workbench.common.forms.data.modeller.service.DataObjectFormModelCreationService in project kie-wb-common by kiegroup.

the class DataObjectFormModelCreationPresenterTest method setup.

@Before
public void setup() {
    path = mock(Path.class);
    formModels.add(new DataObjectFormModel("employee", "org.kie.wb.test.Employee"));
    formModels.add(new DataObjectFormModel("address", "org.kie.wb.test.Address"));
    formModels.add(new DataObjectFormModel("company", "org.kie.wb.test.Company"));
    formModels.add(new DataObjectFormModel("department", "org.kie.wb.test.Department"));
    dataObjectFormModelCreationService = mock(DataObjectFormModelCreationService.class);
    when(dataObjectFormModelCreationService.getAvailableDataObjects(path)).thenReturn(formModels);
    dataObjectFormModelCreationServiceCallerMock = new CallerMock<>(dataObjectFormModelCreationService);
    view = mock(DataObjectFormModelCreationView.class);
    translationService = mock(TranslationService.class);
    presenter = new DataObjectFormModelCreationPresenterManager(dataObjectFormModelCreationServiceCallerMock, view, translationService);
}
Also used : Path(org.uberfire.backend.vfs.Path) TranslationService(org.jboss.errai.ui.client.local.spi.TranslationService) DataObjectFormModelCreationService(org.kie.workbench.common.forms.data.modeller.service.DataObjectFormModelCreationService) DataObjectFormModel(org.kie.workbench.common.forms.data.modeller.model.DataObjectFormModel) Before(org.junit.Before)

Aggregations

TranslationService (org.jboss.errai.ui.client.local.spi.TranslationService)1 Before (org.junit.Before)1 DataObjectFormModel (org.kie.workbench.common.forms.data.modeller.model.DataObjectFormModel)1 DataObjectFormModelCreationService (org.kie.workbench.common.forms.data.modeller.service.DataObjectFormModelCreationService)1 Path (org.uberfire.backend.vfs.Path)1