public void testStructure() {
// given
MaterialMenuBar menuBar = getWidget(false);
// when / then
final String ACTIVATOR = "dp-activator";
MaterialLink link = new MaterialLink();
MaterialDropDown dropDown = new MaterialDropDown();
link.setActivates(ACTIVATOR);
dropDown.setActivator(ACTIVATOR);
menuBar.add(link);
menuBar.add(dropDown);
assertEquals(ACTIVATOR, link.getActivates());
assertEquals(ACTIVATOR, dropDown.getActivator());
assertEquals(link, menuBar.getWidget(0));
assertEquals(dropDown, menuBar.getWidget(1));
}
public MaterialDropDown getDropdown() {
return dropdown;
}