use of org.cytoscape.model.events.NetworkAddedEvent in project cytoscape-impl by cytoscape.
the class CySubNetworkTest method testAddNewEdgeEventAfterNetworkAdd.
@Test
public void testAddNewEdgeEventAfterNetworkAdd() {
CySubNetwork sub = root.addSubNetwork();
CyNode nx1 = sub.addNode();
CyNode nx2 = sub.addNode();
((CySubNetworkImpl) sub).handleEvent(new NetworkAddedEvent(mock(CyNetworkManager.class), sub));
CyEdge ex1 = sub.addEdge(nx1, nx2, false);
Object payload = deh.getLastPayload();
assertNotNull(payload);
}
use of org.cytoscape.model.events.NetworkAddedEvent 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);
}
Aggregations