use of org.freeplane.core.ui.AccelerateableAction in project freeplane by freeplane.
the class JMenuItemBuilderTest method createsMenuItemWithSelectableAction.
@Test
public void createsMenuItemWithSelectableAction() {
menuEntry.addChild(actionEntry);
when(action.isSelectable()).thenReturn(true);
new EntryAccessor().setComponent(menuEntry, menu);
menuActionGroupBuilder.visit(actionEntry);
JAutoCheckBoxMenuItem item = (JAutoCheckBoxMenuItem) new EntryAccessor().getComponent(actionEntry);
final AccelerateableAction itemAction = (AccelerateableAction) item.getAction();
assertThat(itemAction.getOriginalAction(), CoreMatchers.<Action>equalTo(action));
assertThat(item.getParent(), CoreMatchers.<Container>equalTo(menu.getPopupMenu()));
}
use of org.freeplane.core.ui.AccelerateableAction in project freeplane by freeplane.
the class JMenuItemBuilderTest method assertThatMenuItemHasCorrectAction.
private void assertThatMenuItemHasCorrectAction(final JMenuItem menuItem) {
final AccelerateableAction itemAction = (AccelerateableAction) menuItem.getAction();
assertThat(itemAction.getOriginalAction(), CoreMatchers.<Action>equalTo(action));
}
Aggregations