@PostConstruct private void init() { liveSearchDropDown.setSelectorHint(CommonConstants.INSTANCE.PerspectiveSelectHint()); liveSearchDropDown.setSearchHint(CommonConstants.INSTANCE.PerspectiveSearchHint()); liveSearchDropDown.setNotFoundMessage(CommonConstants.INSTANCE.PerspectiveNotFound()); liveSearchDropDown.setClearSelectionEnabled(false); liveSearchDropDown.init(searchService, selectionHandler); }
@PostConstruct private void init() { liveSearchDropDown.setSelectorHint(CommonConstants.INSTANCE.PerspectiveSelectHint()); liveSearchDropDown.setSearchHint(CommonConstants.INSTANCE.PerspectiveSearchHint()); liveSearchDropDown.setNotFoundMessage(CommonConstants.INSTANCE.PerspectiveNotFound()); liveSearchDropDown.setClearSelectionEnabled(false); liveSearchDropDown.init(searchService, selectionHandler); }
@Test public void testEmptySearch() { presenter.setSearchHint("s"); presenter.setNotFoundMessage("n"); presenter.setMaxItems(15); presenter.search(""); assertEquals(presenter.getLastSearch(), ""); verify(view).searchInProgress("s"); verify(view).clearItems(); verify(view).noItems("n"); verify(view).searchFinished(); verify(searchService).search(eq(""), eq(15), any()); }
@Test public void testInit() { presenter.setWidth(200); presenter.setMaxItems(10); presenter.setSearchHint("a"); presenter.setSelectorHint("b"); assertEquals(presenter.getMaxItems(), 10); verify(view).setWidth(200); verify(view).setSearchHint("a"); verify(view).setDropDownText("b"); }
String resourceName = ((PermissionResourceNode) permissionNode).getResourceName(); liveSearchDropDown.setSelectorHint(view.getChildSelectorHint(resourceName)); liveSearchDropDown.setSearchHint(view.getChildSearchHint(resourceName)); liveSearchDropDown.setNotFoundMessage(view.getChildrenNotFoundMsg(resourceName)); liveSearchDropDown.setMaxItems(50);
String resourceName = ((PermissionResourceNode) permissionNode).getResourceName(); liveSearchDropDown.setSelectorHint(view.getChildSelectorHint(resourceName)); liveSearchDropDown.setSearchHint(view.getChildSearchHint(resourceName)); liveSearchDropDown.setNotFoundMessage(view.getChildrenNotFoundMsg(resourceName)); liveSearchDropDown.setMaxItems(50);