use of org.cytoscape.model.CyRow in project cytoscape-api by cytoscape.
the class AbstractGraphObjectTest method testGetCyRow.
@Test
public void testGetCyRow() {
// As long as the object is not null and is an instance of CyRow, we
// should be satisfied. Don't test any other properties of CyRow.
// Leave that to the CyRow unit tests.
CyNode n1 = net.addNode();
assertNotNull("cyattrs exists", net.getRow(n1, "USER"));
assertTrue("cyattrs is CyRow", net.getRow(n1, "USER") instanceof CyRow);
CyNode n2 = net.addNode();
assertNotNull("cyattrs exists", net.getRow(n2, "USER"));
assertTrue("cyattrs is CyRow", net.getRow(n2, "USER") instanceof CyRow);
CyEdge e1 = net.addEdge(n1, n2, true);
assertNotNull("cyattrs exists", net.getRow(e1, "USER"));
assertTrue("cyattrs is CyRow", net.getRow(e1, "USER") instanceof CyRow);
CyEdge e2 = net.addEdge(n1, n2, false);
assertNotNull("cyattrs exists", net.getRow(e2, "USER"));
assertTrue("cyattrs is CyRow", net.getRow(e2, "USER") instanceof CyRow);
}
use of org.cytoscape.model.CyRow in project cytoscape-api by cytoscape.
the class EdgeWeighterTest method testSetWeight.
@Test
public void testSetWeight() {
CyEdge edge = mock(CyEdge.class);
CyRow row = mock(CyRow.class);
LayoutEdge layoutEdge = new LayoutEdge(edge, row);
ew.setWeight(layoutEdge);
}
use of org.cytoscape.model.CyRow in project cytoscape-api by cytoscape.
the class EdgeWeighterTest method testNormalizeWeight.
@Test
public void testNormalizeWeight() {
CyEdge edge = mock(CyEdge.class);
CyRow row = mock(CyRow.class);
LayoutEdge layoutEdge = new LayoutEdge(edge, row);
assertTrue(ew.normalizeWeight(layoutEdge));
}
Aggregations