Author: mes
Date: 2011-01-28 17:36:31 -0800 (Fri, 28 Jan 2011)
New Revision: 23914

Modified:
   
core3/model-api/trunk/src/test/java/org/cytoscape/model/AbstractCyTableTest.java
Log:
added a test that breaks CyRow.getAllValues

Modified: 
core3/model-api/trunk/src/test/java/org/cytoscape/model/AbstractCyTableTest.java
===================================================================
--- 
core3/model-api/trunk/src/test/java/org/cytoscape/model/AbstractCyTableTest.java
    2011-01-29 01:20:56 UTC (rev 23913)
+++ 
core3/model-api/trunk/src/test/java/org/cytoscape/model/AbstractCyTableTest.java
    2011-01-29 01:36:31 UTC (rev 23914)
@@ -532,6 +532,25 @@
        }
 
        @Test
+       public void testGetAllValuesWithList() {
+               table.createColumn("x", Long.class);
+               table.createColumn("y", Double.class);
+               table.createListColumn("z", String.class);
+               attrs.set("x", 15L);
+               attrs.set("y", 3.14);
+               List<String> ls = new ArrayList<String>();
+               ls.add("homer");
+               attrs.set("z",ls);
+               final Map<String, Object> values = attrs.getAllValues();
+               assertTrue(values.keySet().contains("x"));
+               assertTrue(values.keySet().contains("y"));
+               assertTrue(values.keySet().contains("z"));
+               assertEquals((long)(Long)values.get("x"), 15L);
+               assertEquals((double)(Double)values.get("y"), 3.14, 0.00001);
+               assertEquals(values.get("z"), ls);
+       }
+
+       @Test
        public void testGetType() {
                table.createColumn("someInt", Integer.class);
                assertEquals(table.getType("someInt"), Integer.class);

-- 
You received this message because you are subscribed to the Google Groups 
"cytoscape-cvs" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/cytoscape-cvs?hl=en.

Reply via email to