use of org.eclipse.scout.rt.client.ui.form.fields.smartfield.IMixedSmartField in project scout.rt by eclipse.
the class AbstractMixedSmartColumnTest method testPrepareLookupCallback.
/**
* Tests that {@link AbstractMixedSmartColumn#execPrepareLookup(ILookupCall, ITableRow)} is called when
* {@link IMixedSmartField#prepareKeyLookup(ILookupCall, Object)} is called on the editor field.
*/
@SuppressWarnings("unchecked")
@Test
public void testPrepareLookupCallback() {
TestMixedSmartColumn column = new TestMixedSmartColumn();
ITableRow row = Mockito.mock(ITableRow.class);
IMixedSmartField<String, Long> field = (IMixedSmartField<String, Long>) column.prepareEditInternal(row);
ILookupCall call = mock(ILookupCall.class);
field.prepareKeyLookup(call, 10L);
assertEquals(row, column.lastRow);
assertEquals(call, column.lastCall);
}
Aggregations