Search in sources :

Example 6 with CySubNetworkImpl

use of org.cytoscape.model.internal.CySubNetworkImpl in project cytoscape-impl by cytoscape.

the class CySubNetworkTest method testAddNewNodeEventAfterNetworkAdd.

@Test
public void testAddNewNodeEventAfterNetworkAdd() {
    CySubNetwork sub = root.addSubNetwork();
    ((CySubNetworkImpl) sub).handleEvent(new NetworkAddedEvent(mock(CyNetworkManager.class), sub));
    sub.addNode();
    Object payload = deh.getLastPayload();
    assertNotNull(payload);
}
Also used : NetworkAddedEvent(org.cytoscape.model.events.NetworkAddedEvent) CySubNetworkImpl(org.cytoscape.model.internal.CySubNetworkImpl) Test(org.junit.Test)

Aggregations

NetworkAddedEvent (org.cytoscape.model.events.NetworkAddedEvent)6 CySubNetworkImpl (org.cytoscape.model.internal.CySubNetworkImpl)6 Test (org.junit.Test)6 CyNode (org.cytoscape.model.CyNode)5 ArrayList (java.util.ArrayList)2 CyApplicationManager (org.cytoscape.application.CyApplicationManager)2 CyEdge (org.cytoscape.model.CyEdge)2 CyNetwork (org.cytoscape.model.CyNetwork)2 CyRow (org.cytoscape.model.CyRow)2 CyTableImpl (org.cytoscape.model.internal.CyTableImpl)2 CyServiceRegistrar (org.cytoscape.service.util.CyServiceRegistrar)2 CyNetworkNaming (org.cytoscape.session.CyNetworkNaming)2 NewNetworkSelectedNodesOnlyTask (org.cytoscape.task.internal.network.NewNetworkSelectedNodesOnlyTask)2 CyNetworkViewManager (org.cytoscape.view.model.CyNetworkViewManager)2 VisualMappingManager (org.cytoscape.view.vizmap.VisualMappingManager)2 TaskIterator (org.cytoscape.work.TaskIterator)2 TaskMonitor (org.cytoscape.work.TaskMonitor)2 UndoSupport (org.cytoscape.work.undo.UndoSupport)2