Search in sources :

Example 1 with AbstractJBPMFormModel

use of org.kie.workbench.common.forms.jbpm.model.authoring.AbstractJBPMFormModel in project kie-wb-common by kiegroup.

the class JBPMFormModelCreationPresenterTest method testGeneralFunctionallity.

@Test
public void testGeneralFunctionallity() {
    presenter.getPriority();
    presenter.reset();
    verify(view).reset();
    presenter.init(path);
    presenter.getLabel();
    verify(translationService).getTranslation(Constants.Process);
    verify(finderService).getAvailableProcessModels(path);
    verify(view).setProcessModels(formModels);
    presenter.setModel(new AbstractJBPMFormModel("processId", null) {

        @Override
        public String getFormName() {
            return "testFormName";
        }

        @Override
        public String getName() {
            return "test";
        }
    });
    verify(newResourcePresenter).setResourceName("testFormName");
    presenter.reset();
    boolean isValid = presenter.isValid();
    assertTrue(isValid);
    verify(translationService, never()).getTranslation(Constants.InvalidFormModel);
}
Also used : AbstractJBPMFormModel(org.kie.workbench.common.forms.jbpm.model.authoring.AbstractJBPMFormModel) Test(org.junit.Test)

Aggregations

Test (org.junit.Test)1 AbstractJBPMFormModel (org.kie.workbench.common.forms.jbpm.model.authoring.AbstractJBPMFormModel)1