Search in sources :

Example 1 with DummyCyEdge

use of org.cytoscape.model.DummyCyEdge in project cytoscape-api by cytoscape.

the class AbstractCySubNetworkTest method testAddEdgeBadEdge.

@Test
public void testAddEdgeBadEdge() {
    defaultSetup();
    CyEdge ex = new DummyCyEdge(null, null, true, 100);
    try {
        sub.addEdge(ex);
    } catch (IllegalArgumentException e) {
        noChangeChecks();
        return;
    }
}
Also used : DummyCyEdge(org.cytoscape.model.DummyCyEdge) CyEdge(org.cytoscape.model.CyEdge) DummyCyEdge(org.cytoscape.model.DummyCyEdge) Test(org.junit.Test)

Example 2 with DummyCyEdge

use of org.cytoscape.model.DummyCyEdge in project cytoscape-api by cytoscape.

the class AbstractCyRootNetworkTest method testAddSubNetworkWithGoodNodesAndInvalidEdges.

@Test(expected = IllegalArgumentException.class)
public void testAddSubNetworkWithGoodNodesAndInvalidEdges() {
    CyNode n1 = root.addNode();
    CyNode n2 = root.addNode();
    CyNode n3 = root.addNode();
    CyEdge ex = new DummyCyEdge(null, null, false, 50);
    List<CyNode> nodes = Arrays.asList(n1, n2, n3);
    List<CyEdge> edges = Arrays.asList(ex);
    CySubNetwork n = root.addSubNetwork(nodes, edges);
}
Also used : DummyCyNode(org.cytoscape.model.DummyCyNode) CyNode(org.cytoscape.model.CyNode) DummyCyEdge(org.cytoscape.model.DummyCyEdge) CyEdge(org.cytoscape.model.CyEdge) DummyCyEdge(org.cytoscape.model.DummyCyEdge) Test(org.junit.Test)

Aggregations

CyEdge (org.cytoscape.model.CyEdge)2 DummyCyEdge (org.cytoscape.model.DummyCyEdge)2 Test (org.junit.Test)2 CyNode (org.cytoscape.model.CyNode)1 DummyCyNode (org.cytoscape.model.DummyCyNode)1