Search in sources :

Example 1 with ResourceAccessor

use of org.freeplane.core.ui.menubuilders.generic.ResourceAccessor in project freeplane by freeplane.

the class MenuBuildProcessFactoryTest method setup.

@Before
public void setup() {
    freeplaneActions = mock(FreeplaneActions.class);
    final ResourceAccessor resourceAccessorMock = mock(ResourceAccessor.class);
    when(resourceAccessorMock.getRawText(Matchers.anyString())).thenReturn("text");
    final IUserInputListenerFactory userInputListenerFactory = mock(IUserInputListenerFactory.class);
    final FreeplaneMenuBar menubar = TestMenuBarFactory.createFreeplaneMenuBar();
    when(userInputListenerFactory.getMenuBar()).thenReturn(menubar);
    phaseProcessor = new MenuBuildProcessFactory(userInputListenerFactory, freeplaneActions, resourceAccessorMock, mock(IAcceleratorMap.class), new EntriesForAction(), Collections.<BuildPhaseListener>emptyList()).getBuildProcessor();
}
Also used : ResourceAccessor(org.freeplane.core.ui.menubuilders.generic.ResourceAccessor) IAcceleratorMap(org.freeplane.core.ui.menubuilders.action.IAcceleratorMap) FreeplaneActions(org.freeplane.features.mode.FreeplaneActions) IUserInputListenerFactory(org.freeplane.core.ui.IUserInputListenerFactory) EntriesForAction(org.freeplane.core.ui.menubuilders.action.EntriesForAction) FreeplaneMenuBar(org.freeplane.core.ui.components.FreeplaneMenuBar) Before(org.junit.Before)

Aggregations

IUserInputListenerFactory (org.freeplane.core.ui.IUserInputListenerFactory)1 FreeplaneMenuBar (org.freeplane.core.ui.components.FreeplaneMenuBar)1 EntriesForAction (org.freeplane.core.ui.menubuilders.action.EntriesForAction)1 IAcceleratorMap (org.freeplane.core.ui.menubuilders.action.IAcceleratorMap)1 ResourceAccessor (org.freeplane.core.ui.menubuilders.generic.ResourceAccessor)1 FreeplaneActions (org.freeplane.features.mode.FreeplaneActions)1 Before (org.junit.Before)1