use of org.eclipse.scout.rt.client.ui.form.fields.smartfield.AbstractMixedSmartField in project scout.rt by eclipse.
the class AbstractMixedSmartColumnTest method tesConvertValueToKeyCallback.
/**
* 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 tesConvertValueToKeyCallback() {
TestMixedSmartColumn column = new TestMixedSmartColumn();
ITableRow row = Mockito.mock(ITableRow.class);
AbstractMixedSmartField<String, Long> field = (AbstractMixedSmartField<String, Long>) column.prepareEditInternal(row);
field.setValue("test");
Long lookupKey = field.getValueAsLookupKey();
assertEquals(Long.valueOf(0L), lookupKey);
assertEquals(column.lastValue, "test");
}
Aggregations