use of org.eclipse.scout.rt.client.services.common.search.DefaultSearchFilterServiceTest.MyComposerField.CarEntity in project scout.rt by eclipse.
the class DefaultSearchFilterServiceTest method testComposerField.
@Test
public void testComposerField() {
MyComposerField composer = new MyComposerField();
composer.initField();
runBasicAsserts(composer);
CarEntity carEntity = composer.new CarEntity();
ITreeNode carNode = composer.addEntityNode(composer.getTree().getRootNode(), carEntity, true, Collections.emptyList(), new ArrayList<String>());
composer.addAttributeNode(carNode, carEntity.new ColorAttribute(), DataModelConstants.AGGREGATION_NONE, DataModelAttributeOp.create(DataModelConstants.OPERATOR_EQ), CollectionUtility.arrayList("blue key"), CollectionUtility.arrayList("blue value"));
m_searchFilterService.applySearchDelegate(composer, m_searchFilter, false);
StringBuilder result = new StringBuilder();
new ComposerDisplayTextBuilder().build(composer.getTree().getRootNode(), result, "");
Assert.assertEquals(result.toString().trim(), m_searchFilter.getDisplayTextsPlain());
}
Aggregations