use of org.cytoscape.service.util.CyServiceRegistrar in project cytoscape-impl by cytoscape.
the class HideSelectedNodesTaskFactoryTest method testRun.
@Test
public void testRun() throws Exception {
UndoSupport undoSupport = mock(UndoSupport.class);
CyEventHelper eventHelper = mock(CyEventHelper.class);
VisualMappingManager vmMgr = mock(VisualMappingManager.class);
CyServiceRegistrar serviceRegistrar = mock(CyServiceRegistrar.class);
when(serviceRegistrar.getService(UndoSupport.class)).thenReturn(undoSupport);
when(serviceRegistrar.getService(CyEventHelper.class)).thenReturn(eventHelper);
when(serviceRegistrar.getService(VisualMappingManager.class)).thenReturn(vmMgr);
HideSelectedNodesTaskFactoryImpl factory = new HideSelectedNodesTaskFactoryImpl(serviceRegistrar);
CyNetworkView view = mock(CyNetworkView.class);
TaskIterator ti = factory.createTaskIterator(view);
assertNotNull(ti);
assertTrue(ti.hasNext());
Task t = ti.next();
assertNotNull(t);
}
use of org.cytoscape.service.util.CyServiceRegistrar in project cytoscape-impl by cytoscape.
the class UnHideAllNodesTaskFactoryTest method testRun.
@Test
public void testRun() throws Exception {
UndoSupport undoSupport = mock(UndoSupport.class);
CyEventHelper eventHelper = mock(CyEventHelper.class);
VisualMappingManager vmMgr = mock(VisualMappingManager.class);
CyServiceRegistrar serviceRegistrar = mock(CyServiceRegistrar.class);
when(serviceRegistrar.getService(UndoSupport.class)).thenReturn(undoSupport);
when(serviceRegistrar.getService(CyEventHelper.class)).thenReturn(eventHelper);
when(serviceRegistrar.getService(VisualMappingManager.class)).thenReturn(vmMgr);
UnHideAllNodesTaskFactoryImpl factory = new UnHideAllNodesTaskFactoryImpl(serviceRegistrar);
CyNetworkView view = mock(CyNetworkView.class);
TaskIterator ti = factory.createTaskIterator(view);
assertNotNull(ti);
assertTrue(ti.hasNext());
Task t = ti.next();
assertNotNull(t);
}
use of org.cytoscape.service.util.CyServiceRegistrar in project cytoscape-impl by cytoscape.
the class HideSelectedEdgesTaskFactoryTest method testRun.
@Test
public void testRun() throws Exception {
UndoSupport undoSupport = mock(UndoSupport.class);
CyEventHelper eventHelper = mock(CyEventHelper.class);
VisualMappingManager vmMgr = mock(VisualMappingManager.class);
CyServiceRegistrar serviceRegistrar = mock(CyServiceRegistrar.class);
when(serviceRegistrar.getService(UndoSupport.class)).thenReturn(undoSupport);
when(serviceRegistrar.getService(CyEventHelper.class)).thenReturn(eventHelper);
when(serviceRegistrar.getService(VisualMappingManager.class)).thenReturn(vmMgr);
HideSelectedEdgesTaskFactoryImpl factory = new HideSelectedEdgesTaskFactoryImpl(serviceRegistrar);
CyNetworkView view = mock(CyNetworkView.class);
TaskIterator ti = factory.createTaskIterator(view);
assertNotNull(ti);
assertTrue(ti.hasNext());
Task t = ti.next();
assertNotNull(t);
}
use of org.cytoscape.service.util.CyServiceRegistrar in project cytoscape-impl by cytoscape.
the class HideSelectedTaskFactoryTest method testRun.
@Test
public void testRun() throws Exception {
UndoSupport undoSupport = mock(UndoSupport.class);
CyEventHelper eventHelper = mock(CyEventHelper.class);
VisualMappingManager vmMgr = mock(VisualMappingManager.class);
CyServiceRegistrar serviceRegistrar = mock(CyServiceRegistrar.class);
when(serviceRegistrar.getService(UndoSupport.class)).thenReturn(undoSupport);
when(serviceRegistrar.getService(CyEventHelper.class)).thenReturn(eventHelper);
when(serviceRegistrar.getService(VisualMappingManager.class)).thenReturn(vmMgr);
HideSelectedTaskFactoryImpl factory = new HideSelectedTaskFactoryImpl(serviceRegistrar);
CyNetworkView view = mock(CyNetworkView.class);
TaskIterator ti = factory.createTaskIterator(view);
assertNotNull(ti);
assertTrue(ti.hasNext());
Task t = ti.next();
assertNotNull(t);
}
use of org.cytoscape.service.util.CyServiceRegistrar in project cytoscape-impl by cytoscape.
the class UnHideAllTaskFactoryTest method testRun.
@Test
public void testRun() throws Exception {
UndoSupport undoSupport = mock(UndoSupport.class);
CyEventHelper eventHelper = mock(CyEventHelper.class);
VisualMappingManager vmMgr = mock(VisualMappingManager.class);
CyServiceRegistrar serviceRegistrar = mock(CyServiceRegistrar.class);
when(serviceRegistrar.getService(UndoSupport.class)).thenReturn(undoSupport);
when(serviceRegistrar.getService(CyEventHelper.class)).thenReturn(eventHelper);
when(serviceRegistrar.getService(VisualMappingManager.class)).thenReturn(vmMgr);
UnHideAllTaskFactoryImpl factory = new UnHideAllTaskFactoryImpl(serviceRegistrar);
CyNetworkView view = mock(CyNetworkView.class);
TaskIterator ti = factory.createTaskIterator(view);
assertNotNull(ti);
assertTrue(ti.hasNext());
Task t = ti.next();
assertNotNull(t);
}
Aggregations