use of org.cytoscape.task.internal.setcurrent.SetCurrentNetworkTask in project cytoscape-impl by cytoscape.
the class SetCurrentNetworkTaskTest method testRun.
@Test
public void testRun() throws Exception {
CyApplicationManager applicationManager = mock(CyApplicationManager.class);
CyNetworkManager netmgr = mock(CyNetworkManager.class);
;
TaskMonitor tm = mock(TaskMonitor.class);
CyNetwork net = mock(CyNetwork.class);
HashSet<CyNetwork> netSet = new HashSet<CyNetwork>();
netSet.add(net);
when(netmgr.getNetworkSet()).thenReturn(netSet);
SetCurrentNetworkTask t = new SetCurrentNetworkTask(applicationManager, netmgr);
t.run(tm);
verify(applicationManager, times(1)).setCurrentNetwork(net);
}
Aggregations