use of org.eclipse.scout.rt.client.ui.form.fields.smartfield.fixture.TestLookupCall in project scout.rt by eclipse.
the class SmartFieldLookupTest method testSubtreeLookup_ActiveFilterInPrepare.
@Test
public void testSubtreeLookup_ActiveFilterInPrepare() {
m_field.setLookupCall(new TestLookupCall());
m_field.setActiveFilterEnabled(true);
m_field.setActiveFilter(TriState.FALSE);
List<? extends ILookupRow<Long>> rows = m_field.callSubTreeLookup(1L);
assertEquals(2, rows.size());
}
use of org.eclipse.scout.rt.client.ui.form.fields.smartfield.fixture.TestLookupCall in project scout.rt by eclipse.
the class SmartFieldLookupTest method testSubtreeLookup_InBackground.
@Test
public void testSubtreeLookup_InBackground() {
IValueField<Long> masterField = new AbstractValueField<Long>() {
};
masterField.setValue(testMasterValue);
m_field.setLookupCall(new TestLookupCall());
m_field.setMasterField(masterField);
IFuture<List<ILookupRow<Long>>> futureRows = m_field.callSubTreeLookupInBackground(1L, TriState.TRUE, false);
List<? extends ILookupRow<Long>> rows = awaitDoneAndGet(futureRows);
assertEquals(2, rows.size());
}
use of org.eclipse.scout.rt.client.ui.form.fields.smartfield.fixture.TestLookupCall in project scout.rt by eclipse.
the class SmartFieldLookupTest method testSubtreeLookup.
@Test
public void testSubtreeLookup() {
m_field.setLookupCall(new TestLookupCall());
List<? extends ILookupRow<Long>> rows = m_field.callSubTreeLookup(1L);
assertRecResult(rows);
}
use of org.eclipse.scout.rt.client.ui.form.fields.smartfield.fixture.TestLookupCall in project scout.rt by eclipse.
the class SmartFieldLookupTest method testSubteeLookup_WithPrepareRec.
@Test
public void testSubteeLookup_WithPrepareRec() {
ISmartField<Long> field = new AbstractSmartField<Long>() {
@Override
protected void execPrepareRecLookup(ILookupCall<Long> call, Long parentKey) {
call.setMaster(testMasterValue);
}
};
field.setLookupCall(new TestLookupCall());
List<? extends ILookupRow<Long>> rows2 = field.callSubTreeLookup(1L);
assertEquals(2, rows2.size());
}
use of org.eclipse.scout.rt.client.ui.form.fields.smartfield.fixture.TestLookupCall in project scout.rt by eclipse.
the class SmartFieldLookupTest method testSubtreeLookup_ActiveFilter.
/**
* Tests {@link ISmartField#callSubTreeLookup(Object)} using an active filter with {@link TriState#FALSE}
* <code>null</code> values should be filtered out
*/
@Test
public void testSubtreeLookup_ActiveFilter() {
m_field.setLookupCall(new TestLookupCall());
List<? extends ILookupRow<Long>> rows = m_field.callSubTreeLookup(1L, TriState.FALSE);
assertEquals(2, rows.size());
}
Aggregations