use of com.vaadin.flow.component.contextmenu.MenuItem in project flow-components by vaadin.
the class MenuBarTest method addChildrenWithClickListeners_getChildren_getItems.
@Test
public void addChildrenWithClickListeners_getChildren_getItems() {
MenuItem item3 = menuBar.addItem("foo", e -> {
});
MenuItem item4 = menuBar.addItem(new Span("bar"), e -> {
});
assertChildrenAndItems(item1, item2, item3, item4);
}
use of com.vaadin.flow.component.contextmenu.MenuItem in project flow-components by vaadin.
the class MenuBarTest method removeNonChildItem_throws.
@Test(expected = IllegalArgumentException.class)
public void removeNonChildItem_throws() {
MenuItem item = new MenuBar().addItem("foo");
menuBar.remove(item);
}
Aggregations