use of org.drools.workbench.models.datamodel.workitems.PortableWorkDefinition in project drools-wb by kiegroup.
the class ActionWorkItemInsertFactColumnSynchronizerTest method setupWorkItemExecution.
@Before
public void setupWorkItemExecution() throws VetoException {
final ActionWorkItemCol52 column = new ActionWorkItemCol52();
final PortableWorkDefinition pwd = new PortableWorkDefinition();
pwd.setName(WORK_ITEM_NAME);
column.setWorkItemDefinition(pwd);
column.setHeader("wid");
modelSynchronizer.appendColumn(column);
}
use of org.drools.workbench.models.datamodel.workitems.PortableWorkDefinition in project drools-wb by kiegroup.
the class WorkItemPageTest method newPortableWorkDefinition.
private PortableWorkDefinition newPortableWorkDefinition(final String displayName, final String name) {
final PortableWorkDefinition mock = mock(PortableWorkDefinition.class);
doReturn(displayName).when(mock).getDisplayName();
doReturn(name).when(mock).getName();
return mock;
}
use of org.drools.workbench.models.datamodel.workitems.PortableWorkDefinition in project drools-wb by kiegroup.
the class WorkItemPageTest method testShowParametersWhenParametersAreNotEnabled.
@Test
public void testShowParametersWhenParametersAreNotEnabled() {
final PortableWorkDefinition workDefinition = mock(PortableWorkDefinition.class);
when(plugin.getWorkItemDefinition()).thenReturn(workDefinition);
page.showParameters();
verify(view).hideParameters();
}
use of org.drools.workbench.models.datamodel.workitems.PortableWorkDefinition in project drools-wb by kiegroup.
the class ActionWorkItemPluginTest method getMock.
private PortableWorkDefinition getMock(final String name) {
final PortableWorkDefinition mock = mock(PortableWorkDefinition.class);
when(mock.getDisplayName()).thenReturn(name);
when(mock.getName()).thenReturn(name);
return mock;
}
use of org.drools.workbench.models.datamodel.workitems.PortableWorkDefinition in project drools-wb by kiegroup.
the class ActionWorkItemPluginTest method testIsWorkItemSetWhenWorkItemDefinitionIsNotNull.
@Test
public void testIsWorkItemSetWhenWorkItemDefinitionIsNotNull() throws Exception {
final PortableWorkDefinition workDefinition = mock(PortableWorkDefinition.class);
when(editingCol.getWorkItemDefinition()).thenReturn(workDefinition);
final Boolean isWorkItemSet = plugin.isWorkItemSet();
assertTrue(isWorkItemSet);
}
Aggregations