use of org.freeplane.core.ui.menubuilders.generic.SubtreeProcessor in project freeplane by freeplane.
the class SubtreeProcessorTest method doesNotDestroyEntriesWithoutDelay.
@Test
public void doesNotDestroyEntriesWithoutDelay() throws Exception {
final SubtreeProcessor childProcessor = new SubtreeProcessor();
final PhaseProcessor processor = mock(PhaseProcessor.class);
when(processor.forChildren(Mockito.<Entry>any(), Mockito.<Entry>any())).thenReturn(processor);
childProcessor.setProcessor(processor);
final Entry entry = new Entry();
final Entry child = new Entry();
entry.addChild(child);
childProcessor.childEntriesHidden(entry);
verify(processor, never()).destroy(child);
}
use of org.freeplane.core.ui.menubuilders.generic.SubtreeProcessor in project freeplane by freeplane.
the class SubtreeProcessorTest method destroysEntriesWithDelay.
@Test
public void destroysEntriesWithDelay() throws Exception {
final SubtreeProcessor childProcessor = new SubtreeProcessor();
final PhaseProcessor processor = mock(PhaseProcessor.class);
when(processor.forChildren(Mockito.<Entry>any(), Mockito.<Entry>any())).thenReturn(processor);
childProcessor.setProcessor(processor);
final Entry entry = new Entry();
entry.setAttribute(RecursiveMenuStructureProcessor.PROCESS_ON_POPUP, true);
final Entry child = new Entry();
entry.addChild(child);
childProcessor.childEntriesHidden(entry);
verify(processor).destroy(child);
}
use of org.freeplane.core.ui.menubuilders.generic.SubtreeProcessor in project freeplane by freeplane.
the class SubtreeProcessorTest method buildsEntriesWithDelay.
@Test
public void buildsEntriesWithDelay() throws Exception {
final SubtreeProcessor childProcessor = new SubtreeProcessor();
final PhaseProcessor processor = mock(PhaseProcessor.class);
when(processor.forChildren(Mockito.<Entry>any(), Mockito.<Entry>any())).thenReturn(processor);
childProcessor.setProcessor(processor);
final Entry entry = new Entry();
entry.setAttribute(RecursiveMenuStructureProcessor.PROCESS_ON_POPUP, true);
childProcessor.childEntriesWillBecomeVisible(entry);
verify(processor).buildChildren(entry);
}
use of org.freeplane.core.ui.menubuilders.generic.SubtreeProcessor in project freeplane by freeplane.
the class SubtreeProcessorTest method doesNotBuildEntriesWithoutDelay.
@Test
public void doesNotBuildEntriesWithoutDelay() throws Exception {
final SubtreeProcessor childProcessor = new SubtreeProcessor();
final PhaseProcessor processor = mock(PhaseProcessor.class);
when(processor.forChildren(Mockito.<Entry>any(), Mockito.<Entry>any())).thenReturn(processor);
childProcessor.setProcessor(processor);
final Entry entry = new Entry();
final Entry child = new Entry();
entry.addChild(child);
childProcessor.childEntriesWillBecomeVisible(entry);
verify(processor, never()).build(child);
}
Aggregations