use of org.uberfire.client.callbacks.Callback in project drools-wb by kiegroup.
the class EnumLoaderUtilitiesTest method checkEmptyDefinition.
@Test
public void checkEmptyDefinition() {
final Callback<Map<String, String>> callback = (result) -> assertTrue(result.isEmpty());
enumLoaderUtilities.getEnums(new DropDownData(), callback, presenter, onFetchCommand, onFetchCompleteCommand);
assertNoInteractions();
}
use of org.uberfire.client.callbacks.Callback in project drools-wb by kiegroup.
the class ColumnDefinitionFactoryTest method knownColumnType_ActionSetFieldCol52.
@Test
@SuppressWarnings("unchecked")
public void knownColumnType_ActionSetFieldCol52() {
final BaseColumn column = new ActionSetFieldCol52();
final Callback<String> callback = mock(Callback.class);
columnDefinitionFactory.generateColumnDefinition(dtPresenter, column, callback);
verify(actionSetFieldCol52DefinitionBuilder, times(1)).generateDefinition(eq(dtPresenter), eq(column), any(Callback.class));
verify(callback, times(1)).callback(any(String.class));
}
use of org.uberfire.client.callbacks.Callback in project drools-wb by kiegroup.
the class ColumnDefinitionFactoryTest method knownColumnType_ActionRetractFactCol52.
@Test
@SuppressWarnings("unchecked")
public void knownColumnType_ActionRetractFactCol52() {
final BaseColumn column = new ActionRetractFactCol52();
final Callback<String> callback = mock(Callback.class);
columnDefinitionFactory.generateColumnDefinition(dtPresenter, column, callback);
verify(actionRetractFactCol52DefinitionBuilder, times(1)).generateDefinition(eq(dtPresenter), eq(column), any(Callback.class));
verify(callback, times(1)).callback(any(String.class));
}
use of org.uberfire.client.callbacks.Callback in project drools-wb by kiegroup.
the class CallbackFactoryTest method makeOnCreationCallbackListBoxSingleSelect.
@Test
@SuppressWarnings("unchecked")
public void makeOnCreationCallbackListBoxSingleSelect() {
setupMultipleSelectTest(CallbackFactory.MAX_VISIBLE_ROWS, false);
final Callback callback = CallbackFactory.makeOnCreationCallback(factory, cell, enumLookups);
callback.callback(multiValueDOMElement);
verifyMultipleSelectTest(CallbackFactory.MAX_VISIBLE_ROWS);
verify(multiValueWidget, never()).setVisibleItemCount(anyInt());
}
use of org.uberfire.client.callbacks.Callback in project drools-wb by kiegroup.
the class CallbackFactoryTest method makeOnCreationCallbackListBoxMultipleSelect.
@Test
@SuppressWarnings("unchecked")
public void makeOnCreationCallbackListBoxMultipleSelect() {
setupMultipleSelectTest(CallbackFactory.MAX_VISIBLE_ROWS, true);
final Callback callback = CallbackFactory.makeOnCreationCallback(factory, cell, enumLookups);
callback.callback(multiValueDOMElement);
verifyMultipleSelectTest(CallbackFactory.MAX_VISIBLE_ROWS);
verify(multiValueWidget).setVisibleItemCount(eq(CallbackFactory.MAX_VISIBLE_ROWS));
}
Aggregations