Search in sources :

Example 1 with StringList

use of org.cytoscape.equations.internal.StringList in project cytoscape-impl by cytoscape.

the class CyTableTest method testSetListWithACompatibleEquation.

// @Test : TODO: We removed support for strongly typed lists so this test is
// now broken.
public void testSetListWithACompatibleEquation() {
    table.createListColumn("stringList", String.class, false);
    attrs.set("stringList", new StringList());
    compiler.compile("=SLIST(\"one\",\"two\")", new HashMap<String, Class<?>>());
    final Equation eqn = compiler.getEquation();
    attrs.set("stringList", eqn);
    final StringList expectedList = new StringList("one", "two");
    assertEquals(attrs.getList("stringList", String.class), expectedList);
}
Also used : StringList(org.cytoscape.equations.internal.StringList) Equation(org.cytoscape.equations.Equation)

Example 2 with StringList

use of org.cytoscape.equations.internal.StringList in project cytoscape-impl by cytoscape.

the class StringListTest method testConstructor.

@Test
public void testConstructor() {
    final String[] strings = { "first", "second" };
    final StringList sl = new StringList(strings);
    assertEquals("Testing 1st Arraylist entry failed.", sl.get(0), "first");
    assertEquals("Testing 2nd Arraylist entry failed.", sl.get(1), "second");
}
Also used : StringList(org.cytoscape.equations.internal.StringList) Test(org.junit.Test)

Aggregations

StringList (org.cytoscape.equations.internal.StringList)2 Equation (org.cytoscape.equations.Equation)1 Test (org.junit.Test)1