use of org.drools.workbench.screens.guided.dtable.client.wizard.column.plugins.commons.ActionWrapper in project drools-wb by kiegroup.
the class ActionSetFactPluginTest method mockActionWrapper.
private ActionWrapper mockActionWrapper(final String boundName, final String factType) {
final ActionWrapper wrapper = mock(ActionWrapper.class);
when(wrapper.getBoundName()).thenReturn(boundName);
when(wrapper.getFactType()).thenReturn(factType);
return wrapper;
}
use of org.drools.workbench.screens.guided.dtable.client.wizard.column.plugins.commons.ActionWrapper in project drools-wb by kiegroup.
the class ActionSetFactPluginTest method testSetValueList.
@Test
public void testSetValueList() {
final ActionWrapper actionWrapper = mock(ActionWrapper.class);
final String valueList = "valueList";
doReturn(actionWrapper).when(plugin).editingWrapper();
plugin.setValueList(valueList);
verify(actionWrapper).setValueList(valueList);
}
use of org.drools.workbench.screens.guided.dtable.client.wizard.column.plugins.commons.ActionWrapper in project drools-wb by kiegroup.
the class ActionSetFactPluginTest method testSetEditingPattern.
@Test
public void testSetEditingPattern() {
final ActionWrapper actionWrapper = mock(ActionWrapper.class);
final PatternWrapper patternWrapper = mock(PatternWrapper.class);
when(plugin.editingWrapper()).thenReturn(actionWrapper);
when(patternWrapper.getFactType()).thenReturn("factType");
when(patternWrapper.getBoundName()).thenReturn("boundName");
plugin.setEditingPattern(patternWrapper);
verify(actionWrapper).setFactField("");
verify(actionWrapper).setFactType("factType");
verify(actionWrapper).setBoundName("boundName");
verify(actionWrapper).setType("");
verify(plugin).fireChangeEvent(patternPage);
verify(plugin).fireChangeEvent(fieldPage);
verify(plugin).fireChangeEvent(additionalInfoPage);
}
use of org.drools.workbench.screens.guided.dtable.client.wizard.column.plugins.commons.ActionWrapper in project drools-wb by kiegroup.
the class ActionSetFactPluginTest method testSetupValuesWhenColumnIsNotNew.
@Test
public void testSetupValuesWhenColumnIsNotNew() throws Exception {
final DTColumnConfig52 column = mock(DTColumnConfig52.class);
final ActionWrapper actionWrapper = mock(ActionWrapper.class);
final PatternWrapper patternWrapper = mock(PatternWrapper.class);
doReturn(column).when(plugin).getOriginalColumnConfig52();
doReturn(actionWrapper).when(plugin).newActionWrapper(column);
doReturn(patternWrapper).when(plugin).newPatternWrapper(actionWrapper);
doReturn(false).when(plugin).isNewColumn();
plugin.setupValues();
verify(plugin).setValueOptionsPageAsCompleted();
verify(plugin).fireChangeEvent(patternPage);
verify(plugin).fireChangeEvent(fieldPage);
verify(plugin).fireChangeEvent(additionalInfoPage);
}
use of org.drools.workbench.screens.guided.dtable.client.wizard.column.plugins.commons.ActionWrapper in project drools-wb by kiegroup.
the class ActionSetFactPluginTest method testGetFactField.
@Test
public void testGetFactField() {
final ActionWrapper actionWrapper = mock(ActionWrapper.class);
final String expectedFactField = "factField";
when(actionWrapper.getFactField()).thenReturn(expectedFactField);
when(plugin.editingWrapper()).thenReturn(actionWrapper);
final String actualFactField = plugin.getFactField();
verify(actionWrapper).getFactField();
assertEquals(expectedFactField, actualFactField);
}
Aggregations