use of org.cytoscape.event.DummyCyEventHelper in project cytoscape-impl by cytoscape.
the class TestCyNetworkFactory method getPrivateRootInstance.
public static CyRootNetwork getPrivateRootInstance(SavePolicy policy) {
DummyCyEventHelper deh = new DummyCyEventHelper();
CyServiceRegistrar serviceRegistrar = mockCyServiceRegistrar(deh);
CyNetworkTableManagerImpl ntm = new CyNetworkTableManagerImpl();
CyTableManagerImpl tm = new CyTableManagerImpl(ntm, new CyNetworkManagerImpl(serviceRegistrar), serviceRegistrar);
CyRootNetworkImpl ar = new CyRootNetworkImpl(deh, tm, ntm, new CyTableFactoryImpl(deh, serviceRegistrar), serviceRegistrar, false, policy);
return ar;
}
use of org.cytoscape.event.DummyCyEventHelper in project cytoscape-impl by cytoscape.
the class EquationTest method setUp.
@Before
public void setUp() {
support = new TableTestSupport();
eventHelper = new DummyCyEventHelper();
serviceRegistrar = mock(CyServiceRegistrar.class);
when(serviceRegistrar.getService(CyEventHelper.class)).thenReturn(eventHelper);
parser = new EquationParserImpl(serviceRegistrar);
}
use of org.cytoscape.event.DummyCyEventHelper in project cytoscape-impl by cytoscape.
the class OutDegreeTest method init.
@Before
public void init() {
final CyNode node = mock(CyNode.class);
when(node.getSUID()).thenReturn(101L);
final List<CyEdge> edgeList = mock(List.class);
when(edgeList.size()).thenReturn(3);
final CyNetwork network = mock(CyNetwork.class);
when(network.getAdjacentEdgeList(node, CyEdge.Type.OUTGOING)).thenReturn(edgeList);
when(network.getNode(101L)).thenReturn(node);
Collection<CyNode> nodes = new ArrayList<CyNode>(1);
nodes.add(node);
applicationManager = mock(CyApplicationManager.class);
when(applicationManager.getCurrentNetwork()).thenReturn(network);
eventHelper = new DummyCyEventHelper();
serviceRegistrar = mock(CyServiceRegistrar.class);
when(serviceRegistrar.getService(CyApplicationManager.class)).thenReturn(applicationManager);
when(serviceRegistrar.getService(CyEventHelper.class)).thenReturn(eventHelper);
}
use of org.cytoscape.event.DummyCyEventHelper in project cytoscape-impl by cytoscape.
the class TestCyGroupFactory method getFactory.
public static CyGroupFactory getFactory() {
final DummyCyEventHelper eventHelper = new DummyCyEventHelper();
final VisualMappingManager vmMgr = mock(VisualMappingManager.class);
final CyNetworkViewManager netViewMgr = mock(CyNetworkViewManager.class);
final CyServiceRegistrar serviceRegistrar = mock(CyServiceRegistrar.class);
when(serviceRegistrar.getService(CyEventHelper.class)).thenReturn(eventHelper);
when(serviceRegistrar.getService(VisualMappingManager.class)).thenReturn(vmMgr);
when(serviceRegistrar.getService(CyNetworkViewManager.class)).thenReturn(netViewMgr);
final CyGroupManagerImpl mgr = new CyGroupManagerImpl(serviceRegistrar);
final LockedVisualPropertiesManager lvpMgr = new LockedVisualPropertiesManager(serviceRegistrar);
final CyGroupFactoryImpl groupFactory = new CyGroupFactoryImpl(mgr, lvpMgr);
return groupFactory;
}
Aggregations