Author: kono
Date: 2012-03-22 12:10:42 -0700 (Thu, 22 Mar 2012)
New Revision: 28616

Modified:
   
core3/impl/trunk/model-impl/impl/src/test/java/org/cytoscape/model/CyNetworkTableManagerTest.java
Log:
New test cases had been added for non-default tables.

Modified: 
core3/impl/trunk/model-impl/impl/src/test/java/org/cytoscape/model/CyNetworkTableManagerTest.java
===================================================================
--- 
core3/impl/trunk/model-impl/impl/src/test/java/org/cytoscape/model/CyNetworkTableManagerTest.java
   2012-03-22 18:49:25 UTC (rev 28615)
+++ 
core3/impl/trunk/model-impl/impl/src/test/java/org/cytoscape/model/CyNetworkTableManagerTest.java
   2012-03-22 19:10:42 UTC (rev 28616)
@@ -124,4 +124,22 @@
                
                assertEquals(0, mgr.getNetworkSet().size());
        }
+       
+       @Test
+       public void testNoneDefaultTables() throws Exception {
+               final String noneDefTableName = "external";
+               final String extraColName = "new column";
+               final Integer testValue = 22;
+               
+               CyTable extTable = tableFactory.createTable(noneDefTableName, 
CyTableEntry.SUID, Long.class, true, true);
+               extTable.createColumn(extraColName, Integer.class, false);
+               mgr.setTable(goodNetwork, CyNetwork.class, noneDefTableName, 
extTable);
+               
+               final CyRow extRow = goodNetwork.getRow(goodNetwork, 
noneDefTableName);
+               assertNotNull(extRow);
+               
+               extRow.set(extraColName, testValue);
+               
+               assertEquals(testValue, goodNetwork.getRow(goodNetwork, 
noneDefTableName).get(extraColName, 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