Search in sources :

Example 1 with CyTableMetadata

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

the class CySessionTest method testSetTables.

@Test
public void testSetTables() {
    CyTable t1 = mock(CyTable.class);
    CyTable t2 = mock(CyTable.class);
    Set<CyTableMetadata> ts = new HashSet<CyTableMetadata>();
    CyTableMetadata m1 = new CyTableMetadataImpl(t1);
    CyTableMetadata m2 = new CyTableMetadataImpl(t2);
    ts.add(m1);
    ts.add(m2);
    session = new CySession.Builder().tables(ts).build();
    assertNotNull(session);
    assertNotNull(session.getTables());
    assertEquals(2, session.getTables().size());
    assertTrue(session.getTables().contains(m1));
    assertTrue(session.getTables().contains(m2));
}
Also used : CyTable(org.cytoscape.model.CyTable) CyTableMetadata(org.cytoscape.model.CyTableMetadata) HashSet(java.util.HashSet) Test(org.junit.Test)

Aggregations

HashSet (java.util.HashSet)1 CyTable (org.cytoscape.model.CyTable)1 CyTableMetadata (org.cytoscape.model.CyTableMetadata)1 Test (org.junit.Test)1