Author: ruschein
Date: 2011-08-02 18:13:37 -0700 (Tue, 02 Aug 2011)
New Revision: 26360

Modified:
   
core3/model-api/trunk/src/test/java/org/cytoscape/model/AbstractCyTableManagerTest.java
   
core3/model-api/trunk/src/test/java/org/cytoscape/model/AbstractGraphObjectTest.java
   
core3/model-api/trunk/src/test/java/org/cytoscape/model/AbstractIdentifiableTest.java
   core3/model-api/trunk/src/test/java/org/cytoscape/model/CyTableUtilTest.java
   
core3/model-api/trunk/src/test/java/org/cytoscape/model/events/AddedEdgeEventTest.java
   
core3/model-api/trunk/src/test/java/org/cytoscape/model/events/AddedNodeEventTest.java
   
core3/model-api/trunk/src/test/java/org/cytoscape/model/events/ColumnCreatedEventTest.java
   
core3/model-api/trunk/src/test/java/org/cytoscape/model/events/ColumnDeletedEventTest.java
   
core3/model-api/trunk/src/test/java/org/cytoscape/model/events/ColumnNameChangedEventTest.java
   
core3/model-api/trunk/src/test/java/org/cytoscape/model/events/RemovedEdgeEventTest.java
   
core3/model-api/trunk/src/test/java/org/cytoscape/model/events/RemovedNodeEventTest.java
   
core3/model-api/trunk/src/test/java/org/cytoscape/model/subnetwork/AbstractCyRootNetworkTest.java
   
core3/model-api/trunk/src/test/java/org/cytoscape/model/subnetwork/AbstractCySubNetworkTest.java
   
core3/model-impl/trunk/impl/src/test/java/org/cytoscape/model/CyTableManagerTest.java
   
core3/model-impl/trunk/impl/src/test/java/org/cytoscape/model/GraphObjectTest.java
   
core3/model-impl/trunk/impl/src/test/java/org/cytoscape/model/IdentifiableTest.java
   
core3/model-impl/trunk/impl/src/test/java/org/cytoscape/model/subnetwork/CyRootNetworkTest.java
   
core3/model-impl/trunk/impl/src/test/java/org/cytoscape/model/subnetwork/CySubNetworkTest.java
Log:
Partial fix for Redmine bug #333.

Modified: 
core3/model-api/trunk/src/test/java/org/cytoscape/model/AbstractCyTableManagerTest.java
===================================================================
--- 
core3/model-api/trunk/src/test/java/org/cytoscape/model/AbstractCyTableManagerTest.java
     2011-08-02 23:28:08 UTC (rev 26359)
+++ 
core3/model-api/trunk/src/test/java/org/cytoscape/model/AbstractCyTableManagerTest.java
     2011-08-03 01:13:37 UTC (rev 26360)
@@ -29,11 +29,15 @@
 
 
 import static org.mockito.Mockito.mock;
-import junit.framework.TestCase;
+
+import static org.junit.Assert.*;
+import org.junit.Before;
+import org.junit.Test;
+
 import java.util.Map;
 
 
-public abstract class AbstractCyTableManagerTest extends TestCase {
+public abstract class AbstractCyTableManagerTest {
        /**
         * Must be supplied by implementer.
         */
@@ -46,22 +50,26 @@
 
        private CyNetwork badNetwork;
 
+       @Before
        public void setUp() {
                badNetwork = mock(CyNetwork.class);
        }
 
+       @Test
        public void testGoodNetwork() {
                assertNotNull( mgr.getTableMap(CyNetwork.class, goodNetwork) );
                assertNotNull( mgr.getTableMap(CyNode.class, goodNetwork) );
                assertNotNull( mgr.getTableMap(CyEdge.class, goodNetwork) );
        }
 
+       @Test
        public void testBadNetwork() {
                assertNull( mgr.getTableMap(CyNetwork.class,badNetwork) );
                assertNull( mgr.getTableMap(CyNode.class,badNetwork) );
                assertNull( mgr.getTableMap(CyEdge.class,badNetwork) );
        }
 
+       @Test
        public void testNullNetwork() {
                assertNull( mgr.getTableMap(CyNetwork.class,null) );
                assertNull( mgr.getTableMap(CyNode.class,null) );
@@ -81,17 +89,7 @@
                assertTrue(tableMap.keySet().contains(CyNetwork.HIDDEN_ATTRS));
        }
 
-/*
-       public void testGetAllTables() {
-       }
-
-       public void testGetValidTable() {
-       }
-
-       public void testGetInvalidTable() {
-       }
-       */
-
+       @Test
        public void testReset() {
                assertFalse(mgr.getAllTables(true).isEmpty());
                mgr.reset();

Modified: 
core3/model-api/trunk/src/test/java/org/cytoscape/model/AbstractGraphObjectTest.java
===================================================================
--- 
core3/model-api/trunk/src/test/java/org/cytoscape/model/AbstractGraphObjectTest.java
        2011-08-02 23:28:08 UTC (rev 26359)
+++ 
core3/model-api/trunk/src/test/java/org/cytoscape/model/AbstractGraphObjectTest.java
        2011-08-03 01:13:37 UTC (rev 26360)
@@ -1,14 +1,6 @@
-
 /*
- Copyright (c) 2008, The Cytoscape Consortium (www.cytoscape.org)
+ Copyright (c) 2008, 2011, The Cytoscape Consortium (www.cytoscape.org)
 
- The Cytoscape Consortium is:
- - Institute for Systems Biology
- - University of California San Diego
- - Memorial Sloan-Kettering Cancer Center
- - Institut Pasteur
- - Agilent Technologies
-
  This library is free software; you can redistribute it and/or modify it
  under the terms of the GNU Lesser General Public License as published
  by the Free Software Foundation; either version 2.1 of the License, or
@@ -33,14 +25,12 @@
  along with this library; if not, write to the Free Software Foundation,
  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
 */
-
 package org.cytoscape.model;
 
-import junit.framework.Assert;
-import junit.framework.Test;
-import junit.framework.TestCase;
-import junit.framework.TestSuite;
 
+import static org.junit.Assert.*;
+import org.junit.Test;
+
 import org.cytoscape.model.CyTable;
 import org.cytoscape.model.CyEdge;
 import org.cytoscape.model.CyNetwork;
@@ -54,15 +44,10 @@
 import java.util.Map;
 
 
-/**
- * DOCUMENT ME!
-  */
-public abstract class AbstractGraphObjectTest extends TestCase {
+public abstract class AbstractGraphObjectTest {
        protected CyNetwork net;
 
-       /**
-        *  DOCUMENT ME!
-        */
+       @Test
        public void testGetNullNamespace() {
                CyNode n1 = net.addNode();
 
@@ -76,9 +61,7 @@
                fail("didn't catch what was thrown");
        }
 
-       /**
-        *  DOCUMENT ME!
-        */
+       @Test
        public void testBadNamespace() {
                CyNode n1 = net.addNode();
 
@@ -92,9 +75,7 @@
                fail("didn't catch what was thrown");
        }
 
-       /**
-        *  DOCUMENT ME!
-        */
+       @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.
@@ -116,9 +97,7 @@
                assertTrue("cyattrs is CyRow", e2.getCyRow("USER") instanceof 
CyRow);
        }
 
-       /**
-        *  DOCUMENT ME!
-        */
+       @Test
        public void testAttrs() {
                CyNode n1 = net.addNode();
                assertNotNull("cyattrs exists", n1.getCyRow());
@@ -126,9 +105,7 @@
                assertTrue("attrs equals getCyRow", 
n1.getCyRow().equals(n1.getCyRow("USER")));
        }
 
-       /**
-        *
-        */
+       @Test
        public void testEqualsInstanceOf() {
                CyNode n1 = net.addNode();
                Object n2 = new Object();

Modified: 
core3/model-api/trunk/src/test/java/org/cytoscape/model/AbstractIdentifiableTest.java
===================================================================
--- 
core3/model-api/trunk/src/test/java/org/cytoscape/model/AbstractIdentifiableTest.java
       2011-08-02 23:28:08 UTC (rev 26359)
+++ 
core3/model-api/trunk/src/test/java/org/cytoscape/model/AbstractIdentifiableTest.java
       2011-08-03 01:13:37 UTC (rev 26360)
@@ -1,14 +1,6 @@
-
 /*
- Copyright (c) 2008, The Cytoscape Consortium (www.cytoscape.org)
+ Copyright (c) 2008, 2011, The Cytoscape Consortium (www.cytoscape.org)
 
- The Cytoscape Consortium is:
- - Institute for Systems Biology
- - University of California San Diego
- - Memorial Sloan-Kettering Cancer Center
- - Institut Pasteur
- - Agilent Technologies
-
  This library is free software; you can redistribute it and/or modify it
  under the terms of the GNU Lesser General Public License as published
  by the Free Software Foundation; either version 2.1 of the License, or
@@ -33,14 +25,12 @@
  along with this library; if not, write to the Free Software Foundation,
  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
 */
-
 package org.cytoscape.model;
 
-import junit.framework.Assert;
-import junit.framework.Test;
-import junit.framework.TestCase;
-import junit.framework.TestSuite;
 
+import static org.junit.Assert.*;
+import org.junit.Test;
+
 import org.cytoscape.model.CyEdge;
 import org.cytoscape.model.CyNetwork;
 import org.cytoscape.model.CyNode;
@@ -52,16 +42,10 @@
 import java.util.Map;
 
 
-/**
- * DOCUMENT ME!
- */
-public abstract class AbstractIdentifiableTest extends TestCase {
-
+public abstract class AbstractIdentifiableTest {
        protected CyNetwork net;
 
-       /**
-        *  DOCUMENT ME!
-        */
+       @Test
        public void testGetSUID() {
                CyNode n1 = net.addNode();
                assertTrue("suid >= 0", n1.getSUID() >= 0);

Modified: 
core3/model-api/trunk/src/test/java/org/cytoscape/model/CyTableUtilTest.java
===================================================================
--- 
core3/model-api/trunk/src/test/java/org/cytoscape/model/CyTableUtilTest.java    
    2011-08-02 23:28:08 UTC (rev 26359)
+++ 
core3/model-api/trunk/src/test/java/org/cytoscape/model/CyTableUtilTest.java    
    2011-08-03 01:13:37 UTC (rev 26360)
@@ -1,14 +1,6 @@
-
 /*
- Copyright (c) 2008, The Cytoscape Consortium (www.cytoscape.org)
+ Copyright (c) 2008, 2011, The Cytoscape Consortium (www.cytoscape.org)
 
- The Cytoscape Consortium is:
- - Institute for Systems Biology
- - University of California San Diego
- - Memorial Sloan-Kettering Cancer Center
- - Institut Pasteur
- - Agilent Technologies
-
  This library is free software; you can redistribute it and/or modify it
  under the terms of the GNU Lesser General Public License as published
  by the Free Software Foundation; either version 2.1 of the License, or
@@ -33,36 +25,33 @@
  along with this library; if not, write to the Free Software Foundation,
  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
 */
-
 package org.cytoscape.model;
 
-import junit.framework.Assert;
-import junit.framework.Test;
-import junit.framework.TestCase;
-import junit.framework.TestSuite;
 
+import static org.junit.Assert.*;
+import org.junit.Before;
+import org.junit.Test;
+
 import static org.mockito.Mockito.*;
 
 import java.util.List;
 import java.util.ArrayList;
 
-/**
- * DOCUMENT ME!
- */
-public class CyTableUtilTest extends TestCase {
 
+public class CyTableUtilTest {
        CyNetwork net;
 
-       CyRow row1; 
-       CyNode node1; 
-       CyEdge edge1; 
+       CyRow row1;
+       CyNode node1;
+       CyEdge edge1;
 
-       CyRow row2; 
-       CyNode node2; 
-       CyEdge edge2; 
+       CyRow row2;
+       CyNode node2;
+       CyEdge edge2;
 
        final String columnName = "asdf";
 
+       @Before
        public void setUp() {
                row1 = mock(CyRow.class);
                when(row1.get(columnName,Boolean.class)).thenReturn(true);
@@ -95,6 +84,7 @@
                when(net.getEdgeList()).thenReturn(elist);
        }
 
+       @Test
        public void testGetTrueNodes() {
                List<CyNode> nodes = 
CyTableUtil.getNodesInState(net,columnName,true);
                assertNotNull(nodes);
@@ -102,6 +92,7 @@
                assertEquals( 1, nodes.size() );
        }
 
+       @Test
        public void testGetFalseNodes() {
                List<CyNode> nodes = 
CyTableUtil.getNodesInState(net,columnName,false);
                assertNotNull(nodes);
@@ -109,6 +100,7 @@
                assertEquals( 1, nodes.size() );
        }
 
+       @Test
        public void testGetTrueEdges() {
                List<CyEdge> edges = 
CyTableUtil.getEdgesInState(net,columnName,true);
                assertNotNull(edges);
@@ -116,6 +108,7 @@
                assertEquals( 1, edges.size() );
        }
 
+       @Test
        public void testGetFalseEdges() {
                List<CyEdge> edges = 
CyTableUtil.getEdgesInState(net,columnName,false);
                assertNotNull(edges);
@@ -123,6 +116,7 @@
                assertEquals( 1, edges.size() );
        }
 
+       @Test
        public void testNullNetworkNodes() {
                try {
                List<CyNode> nodes = 
CyTableUtil.getNodesInState(null,columnName,false);
@@ -132,6 +126,7 @@
                fail("didn't catch expected npe");
        }
 
+       @Test
        public void testNullNetworkEdges() {
                try {
                List<CyEdge> nodes = 
CyTableUtil.getEdgesInState(null,columnName,false);

Modified: 
core3/model-api/trunk/src/test/java/org/cytoscape/model/events/AddedEdgeEventTest.java
===================================================================
--- 
core3/model-api/trunk/src/test/java/org/cytoscape/model/events/AddedEdgeEventTest.java
      2011-08-02 23:28:08 UTC (rev 26359)
+++ 
core3/model-api/trunk/src/test/java/org/cytoscape/model/events/AddedEdgeEventTest.java
      2011-08-03 01:13:37 UTC (rev 26360)
@@ -1,14 +1,6 @@
-
 /*
- Copyright (c) 2008, The Cytoscape Consortium (www.cytoscape.org)
+ Copyright (c) 2008, 2011, The Cytoscape Consortium (www.cytoscape.org)
 
- The Cytoscape Consortium is:
- - Institute for Systems Biology
- - University of California San Diego
- - Memorial Sloan-Kettering Cancer Center
- - Institut Pasteur
- - Agilent Technologies
-
  This library is free software; you can redistribute it and/or modify it
  under the terms of the GNU Lesser General Public License as published
  by the Free Software Foundation; either version 2.1 of the License, or
@@ -33,14 +25,15 @@
  along with this library; if not, write to the Free Software Foundation,
  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
 */
-
 package org.cytoscape.model.events;
 
+
 import java.util.ArrayList;
 import java.util.Collection;
 
-import junit.framework.Assert;
-import junit.framework.Test;
+import static org.junit.Assert.*;
+import org.junit.Before;
+import org.junit.Test;
 import junit.framework.TestCase;
 import junit.framework.TestSuite;
 
@@ -49,37 +42,39 @@
 
 import static org.mockito.Mockito.*;
 
-/**
- * DOCUMENT ME!
- */
-public class AddedEdgeEventTest extends TestCase {
 
+public class AddedEdgeEventTest extends TestCase {
        AddedEdgesEvent event;
        Collection<CyEdge> edgeCollection;
        CyNetwork net;
 
+       @Before
        public void setUp() {
                edgeCollection = new ArrayList<CyEdge>();
                edgeCollection.add( mock(CyEdge.class));
                edgeCollection.add( mock(CyEdge.class));
 
-               net = mock(CyNetwork.class); 
+               net = mock(CyNetwork.class);
                event = new AddedEdgesEvent(net,edgeCollection);
        }
 
+       @Test
        public void testGetEdge() {
                for ( CyEdge e : event.getPayloadCollection())
                        assertTrue( edgeCollection.contains(e) );
        }
 
+       @Test
        public void testGetSource() {
                assertEquals( event.getSource(), net );
        }
 
+       @Test
        public void testGetListenerClass() {
                assertEquals( event.getListenerClass(), 
AddedEdgesListener.class );
        }
 
+       @Test
        public void testNullEdge() {
                try {
                        AddedEdgesEvent ev = new AddedEdgesEvent(net, null);
@@ -89,6 +84,7 @@
                fail("didn't catch expected npe for edge");
        }
 
+       @Test
        public void testNullNetwork() {
                try {
                        AddedEdgesEvent ev = new AddedEdgesEvent(null, 
edgeCollection);

Modified: 
core3/model-api/trunk/src/test/java/org/cytoscape/model/events/AddedNodeEventTest.java
===================================================================
--- 
core3/model-api/trunk/src/test/java/org/cytoscape/model/events/AddedNodeEventTest.java
      2011-08-02 23:28:08 UTC (rev 26359)
+++ 
core3/model-api/trunk/src/test/java/org/cytoscape/model/events/AddedNodeEventTest.java
      2011-08-03 01:13:37 UTC (rev 26360)
@@ -1,14 +1,6 @@
-
 /*
- Copyright (c) 2008, The Cytoscape Consortium (www.cytoscape.org)
+ Copyright (c) 2008, 2011, The Cytoscape Consortium (www.cytoscape.org)
 
- The Cytoscape Consortium is:
- - Institute for Systems Biology
- - University of California San Diego
- - Memorial Sloan-Kettering Cancer Center
- - Institut Pasteur
- - Agilent Technologies
-
  This library is free software; you can redistribute it and/or modify it
  under the terms of the GNU Lesser General Public License as published
  by the Free Software Foundation; either version 2.1 of the License, or
@@ -33,14 +25,15 @@
  along with this library; if not, write to the Free Software Foundation,
  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
 */
-
 package org.cytoscape.model.events;
 
+
 import java.util.ArrayList;
 import java.util.Collection;
 
-import junit.framework.Assert;
-import junit.framework.Test;
+import static org.junit.Assert.*;
+import org.junit.Before;
+import org.junit.Test;
 import junit.framework.TestCase;
 import junit.framework.TestSuite;
 
@@ -49,37 +42,39 @@
 
 import static org.mockito.Mockito.*;
 
-/**
- * DOCUMENT ME!
- */
-public class AddedNodeEventTest extends TestCase {
 
+public class AddedNodeEventTest extends TestCase {
        AddedNodesEvent event;
        Collection<CyNode> nodeCollection;
        CyNetwork net;
 
+       @Before
        public void setUp() {
                nodeCollection = new ArrayList<CyNode>();
                nodeCollection.add( mock(CyNode.class));
                nodeCollection.add( mock(CyNode.class));
 
-               net = mock(CyNetwork.class); 
+               net = mock(CyNetwork.class);
                event = new AddedNodesEvent(net,nodeCollection);
        }
 
+       @Test
        public void testGetNode() {
                for ( CyNode n : event.getPayloadCollection() )
                        assertTrue( nodeCollection.contains(n));
        }
 
+       @Test
        public void testGetSource() {
                assertEquals( event.getSource(), net );
        }
 
+       @Test
        public void testGetListenerClass() {
                assertEquals( event.getListenerClass(), 
AddedNodesListener.class );
        }
 
+       @Test
        public void testNullNode() {
                try {
                        AddedNodesEvent ev = new AddedNodesEvent(net, null);
@@ -89,6 +84,7 @@
                fail("didn't catch expected npe for node");
        }
 
+       @Test
        public void testNullNetwork() {
                try {
                        AddedNodesEvent ev = new AddedNodesEvent(null, 
nodeCollection);

Modified: 
core3/model-api/trunk/src/test/java/org/cytoscape/model/events/ColumnCreatedEventTest.java
===================================================================
--- 
core3/model-api/trunk/src/test/java/org/cytoscape/model/events/ColumnCreatedEventTest.java
  2011-08-02 23:28:08 UTC (rev 26359)
+++ 
core3/model-api/trunk/src/test/java/org/cytoscape/model/events/ColumnCreatedEventTest.java
  2011-08-03 01:13:37 UTC (rev 26360)
@@ -1,14 +1,6 @@
-
 /*
- Copyright (c) 2008, The Cytoscape Consortium (www.cytoscape.org)
+ Copyright (c) 2008, 2011, The Cytoscape Consortium (www.cytoscape.org)
 
- The Cytoscape Consortium is:
- - Institute for Systems Biology
- - University of California San Diego
- - Memorial Sloan-Kettering Cancer Center
- - Institut Pasteur
- - Agilent Technologies
-
  This library is free software; you can redistribute it and/or modify it
  under the terms of the GNU Lesser General Public License as published
  by the Free Software Foundation; either version 2.1 of the License, or
@@ -33,11 +25,12 @@
  along with this library; if not, write to the Free Software Foundation,
  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
 */
-
 package org.cytoscape.model.events;
 
-import junit.framework.Assert;
-import junit.framework.Test;
+
+import static org.junit.Assert.*;
+import org.junit.Before;
+import org.junit.Test;
 import junit.framework.TestCase;
 import junit.framework.TestSuite;
 
@@ -45,32 +38,34 @@
 
 import static org.mockito.Mockito.*;
 
-/**
- * DOCUMENT ME!
- */
-public class ColumnCreatedEventTest extends TestCase {
 
+public class ColumnCreatedEventTest extends TestCase {
        ColumnCreatedEvent event;
        CyTable table;
        final String columnName = "asdf";
 
+       @Before
        public void setUp() {
-               table = mock(CyTable.class); 
+               table = mock(CyTable.class);
                event = new ColumnCreatedEvent(table,columnName);
        }
 
+       @Test
        public void testGetColumnName() {
                assertEquals( event.getColumnName(), columnName );
        }
 
+       @Test
        public void testGetSource() {
                assertEquals( event.getSource(), table );
        }
 
+       @Test
        public void testGetListenerClass() {
                assertEquals( event.getListenerClass(), 
ColumnCreatedListener.class );
        }
 
+       @Test
        public void testNullColumn() {
                try {
                        ColumnCreatedEvent ev = new ColumnCreatedEvent(table, 
null);
@@ -80,6 +75,7 @@
                fail("didn't catch expected npe for column");
        }
 
+       @Test
        public void testNullTable() {
                try {
                        ColumnCreatedEvent ev = new ColumnCreatedEvent(null, 
columnName);

Modified: 
core3/model-api/trunk/src/test/java/org/cytoscape/model/events/ColumnDeletedEventTest.java
===================================================================
--- 
core3/model-api/trunk/src/test/java/org/cytoscape/model/events/ColumnDeletedEventTest.java
  2011-08-02 23:28:08 UTC (rev 26359)
+++ 
core3/model-api/trunk/src/test/java/org/cytoscape/model/events/ColumnDeletedEventTest.java
  2011-08-03 01:13:37 UTC (rev 26360)
@@ -1,14 +1,6 @@
-
 /*
- Copyright (c) 2008, The Cytoscape Consortium (www.cytoscape.org)
+ Copyright (c) 2008, 2011, The Cytoscape Consortium (www.cytoscape.org)
 
- The Cytoscape Consortium is:
- - Institute for Systems Biology
- - University of California San Diego
- - Memorial Sloan-Kettering Cancer Center
- - Institut Pasteur
- - Agilent Technologies
-
  This library is free software; you can redistribute it and/or modify it
  under the terms of the GNU Lesser General Public License as published
  by the Free Software Foundation; either version 2.1 of the License, or
@@ -33,44 +25,45 @@
  along with this library; if not, write to the Free Software Foundation,
  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
 */
-
 package org.cytoscape.model.events;
 
-import junit.framework.Assert;
-import junit.framework.Test;
-import junit.framework.TestCase;
-import junit.framework.TestSuite;
 
+import static org.junit.Assert.*;
+import org.junit.Before;
+import org.junit.Test;
+
 import org.cytoscape.model.CyTable;
 
 import static org.mockito.Mockito.*;
 
-/**
- * DOCUMENT ME!
- */
-public class ColumnDeletedEventTest extends TestCase {
 
+public class ColumnDeletedEventTest {
        ColumnDeletedEvent event;
        CyTable table;
        final String columnName = "asdf";
 
+       @Before
        public void setUp() {
-               table = mock(CyTable.class); 
+               table = mock(CyTable.class);
                event = new ColumnDeletedEvent(table,columnName);
        }
 
+       @Test
        public void testGetColumnName() {
                assertEquals( event.getColumnName(), columnName );
        }
 
+       @Test
        public void testGetSource() {
                assertEquals( event.getSource(), table );
        }
 
+       @Test
        public void testGetListenerClass() {
                assertEquals( event.getListenerClass(), 
ColumnDeletedListener.class );
        }
 
+       @Test
        public void testNullColumn() {
                try {
                        ColumnDeletedEvent ev = new ColumnDeletedEvent(table, 
null);
@@ -80,6 +73,7 @@
                fail("didn't catch expected npe for column");
        }
 
+       @Test
        public void testNullTable() {
                try {
                        ColumnDeletedEvent ev = new ColumnDeletedEvent(null, 
columnName);

Modified: 
core3/model-api/trunk/src/test/java/org/cytoscape/model/events/ColumnNameChangedEventTest.java
===================================================================
--- 
core3/model-api/trunk/src/test/java/org/cytoscape/model/events/ColumnNameChangedEventTest.java
      2011-08-02 23:28:08 UTC (rev 26359)
+++ 
core3/model-api/trunk/src/test/java/org/cytoscape/model/events/ColumnNameChangedEventTest.java
      2011-08-03 01:13:37 UTC (rev 26360)
@@ -1,5 +1,5 @@
 /*
- Copyright (c) 2010, The Cytoscape Consortium (www.cytoscape.org)
+ Copyright (c) 2010-2011, The Cytoscape Consortium (www.cytoscape.org)
 
  This library is free software; you can redistribute it and/or modify it
  under the terms of the GNU Lesser General Public License as published
@@ -28,43 +28,48 @@
 package org.cytoscape.model.events;
 
 
-import junit.framework.Assert;
-import junit.framework.Test;
-import junit.framework.TestCase;
-import junit.framework.TestSuite;
+import static org.junit.Assert.*;
+import org.junit.Before;
+import org.junit.Test;
 
 import org.cytoscape.model.CyTable;
 
 import static org.mockito.Mockito.*;
 
 
-public class ColumnNameChangedEventTest extends TestCase {
+public class ColumnNameChangedEventTest {
        ColumnNameChangedEvent event;
        CyTable table;
        final String oldColumnName = "asdf";
        final String newColumnName = "xyz";
 
+       @Before
        public void setUp() {
-               table = mock(CyTable.class); 
+               table = mock(CyTable.class);
                event = new ColumnNameChangedEvent(table, oldColumnName, 
newColumnName);
        }
 
+       @Test
        public void testGetOldColumnName() {
                assertEquals(event.getOldColumnName(), oldColumnName);
        }
 
+       @Test
        public void testGetNewColumnName() {
                assertEquals(event.getNewColumnName(), newColumnName);
        }
 
+       @Test
        public void testGetSource() {
                assertEquals(event.getSource(), table);
        }
 
+       @Test
        public void testGetListenerClass() {
                assertEquals(event.getListenerClass(), 
ColumnNameChangedListener.class);
        }
 
+       @Test
        public void testNullOldColumn() {
                try {
                        ColumnNameChangedEvent ev =
@@ -75,6 +80,7 @@
                fail("didn't catch expected npe for old column name");
        }
 
+       @Test
        public void testNullNewColumn() {
                try {
                        ColumnNameChangedEvent ev =
@@ -85,6 +91,7 @@
                fail("didn't catch expected npe for new column name");
        }
 
+       @Test
        public void testNullTable() {
                try {
                        ColumnNameChangedEvent ev =

Modified: 
core3/model-api/trunk/src/test/java/org/cytoscape/model/events/RemovedEdgeEventTest.java
===================================================================
--- 
core3/model-api/trunk/src/test/java/org/cytoscape/model/events/RemovedEdgeEventTest.java
    2011-08-02 23:28:08 UTC (rev 26359)
+++ 
core3/model-api/trunk/src/test/java/org/cytoscape/model/events/RemovedEdgeEventTest.java
    2011-08-03 01:13:37 UTC (rev 26360)
@@ -1,14 +1,6 @@
-
 /*
- Copyright (c) 2008, The Cytoscape Consortium (www.cytoscape.org)
+ Copyright (c) 2008, 2011, The Cytoscape Consortium (www.cytoscape.org)
 
- The Cytoscape Consortium is:
- - Institute for Systems Biology
- - University of California San Diego
- - Memorial Sloan-Kettering Cancer Center
- - Institut Pasteur
- - Agilent Technologies
-
  This library is free software; you can redistribute it and/or modify it
  under the terms of the GNU Lesser General Public License as published
  by the Free Software Foundation; either version 2.1 of the License, or
@@ -33,40 +25,40 @@
  along with this library; if not, write to the Free Software Foundation,
  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
 */
-
 package org.cytoscape.model.events;
 
-import junit.framework.Assert;
-import junit.framework.Test;
-import junit.framework.TestCase;
-import junit.framework.TestSuite;
 
+import static org.junit.Assert.*;
+import org.junit.Before;
+import org.junit.Test;
+
 import org.cytoscape.model.CyNetwork;
 import org.cytoscape.model.CyEdge;
 
 import static org.mockito.Mockito.*;
 
-/**
- * DOCUMENT ME!
- */
-public class RemovedEdgeEventTest extends TestCase {
 
+public class RemovedEdgeEventTest {
        RemovedEdgesEvent event;
        CyNetwork net;
 
+       @Before
        public void setUp() {
-               net = mock(CyNetwork.class); 
+               net = mock(CyNetwork.class);
                event = new RemovedEdgesEvent(net);
        }
 
+       @Test
        public void testGetSource() {
                assertEquals( event.getSource(), net );
        }
 
+       @Test
        public void testGetListenerClass() {
                assertEquals( event.getListenerClass(), 
RemovedEdgesListener.class );
        }
 
+       @Test
        public void testNullNetwork() {
                try {
                        RemovedEdgesEvent ev = new RemovedEdgesEvent(null);

Modified: 
core3/model-api/trunk/src/test/java/org/cytoscape/model/events/RemovedNodeEventTest.java
===================================================================
--- 
core3/model-api/trunk/src/test/java/org/cytoscape/model/events/RemovedNodeEventTest.java
    2011-08-02 23:28:08 UTC (rev 26359)
+++ 
core3/model-api/trunk/src/test/java/org/cytoscape/model/events/RemovedNodeEventTest.java
    2011-08-03 01:13:37 UTC (rev 26360)
@@ -1,14 +1,6 @@
-
 /*
- Copyright (c) 2008, The Cytoscape Consortium (www.cytoscape.org)
+ Copyright (c) 2008, 2011, The Cytoscape Consortium (www.cytoscape.org)
 
- The Cytoscape Consortium is:
- - Institute for Systems Biology
- - University of California San Diego
- - Memorial Sloan-Kettering Cancer Center
- - Institut Pasteur
- - Agilent Technologies
-
  This library is free software; you can redistribute it and/or modify it
  under the terms of the GNU Lesser General Public License as published
  by the Free Software Foundation; either version 2.1 of the License, or
@@ -33,40 +25,40 @@
  along with this library; if not, write to the Free Software Foundation,
  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
 */
-
 package org.cytoscape.model.events;
 
-import junit.framework.Assert;
-import junit.framework.Test;
-import junit.framework.TestCase;
-import junit.framework.TestSuite;
 
+import static org.junit.Assert.*;
+import org.junit.Before;
+import org.junit.Test;
+
 import org.cytoscape.model.CyNetwork;
 import org.cytoscape.model.CyNode;
 
 import static org.mockito.Mockito.*;
 
-/**
- * DOCUMENT ME!
- */
-public class RemovedNodeEventTest extends TestCase {
 
+public class RemovedNodeEventTest {
        RemovedNodesEvent event;
        CyNetwork net;
 
+       @Before
        public void setUp() {
-               net = mock(CyNetwork.class); 
+               net = mock(CyNetwork.class);
                event = new RemovedNodesEvent(net);
        }
 
+       @Test
        public void testGetSource() {
                assertEquals( event.getSource(), net );
        }
 
+       @Test
        public void testGetListenerClass() {
                assertEquals( event.getListenerClass(), 
RemovedNodesListener.class );
        }
 
+       @Test
        public void testNullNetwork() {
                try {
                        RemovedNodesEvent ev = new RemovedNodesEvent(null);

Modified: 
core3/model-api/trunk/src/test/java/org/cytoscape/model/subnetwork/AbstractCyRootNetworkTest.java
===================================================================
--- 
core3/model-api/trunk/src/test/java/org/cytoscape/model/subnetwork/AbstractCyRootNetworkTest.java
   2011-08-02 23:28:08 UTC (rev 26359)
+++ 
core3/model-api/trunk/src/test/java/org/cytoscape/model/subnetwork/AbstractCyRootNetworkTest.java
   2011-08-03 01:13:37 UTC (rev 26360)
@@ -1,14 +1,6 @@
-
 /*
- Copyright (c) 2008, The Cytoscape Consortium (www.cytoscape.org)
+ Copyright (c) 2008, 2011, The Cytoscape Consortium (www.cytoscape.org)
 
- The Cytoscape Consortium is:
- - Institute for Systems Biology
- - University of California San Diego
- - Memorial Sloan-Kettering Cancer Center
- - Institut Pasteur
- - Agilent Technologies
-
  This library is free software; you can redistribute it and/or modify it
  under the terms of the GNU Lesser General Public License as published
  by the Free Software Foundation; either version 2.1 of the License, or
@@ -33,14 +25,16 @@
  along with this library; if not, write to the Free Software Foundation,
  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
 */
-
 package org.cytoscape.model.subnetwork;
 
-import junit.framework.Assert;
-import junit.framework.Test;
-import junit.framework.TestCase;
-import junit.framework.TestSuite;
 
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.List;
+import java.util.ArrayList;
+import java.util.Map;
+import java.util.Arrays;
+
 import org.cytoscape.event.CyEvent;
 import org.cytoscape.event.CyEventHelper;
 import org.cytoscape.event.CyListener;
@@ -51,23 +45,15 @@
 import org.cytoscape.model.DummyCyNode;
 import org.cytoscape.model.DummyCyEdge;
 
-import java.lang.RuntimeException;
+import static org.junit.Assert.*;
+import org.junit.Test;
 
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.Arrays;
 
-
-/**
- * DOCUMENT ME!
-  */
-public abstract class AbstractCyRootNetworkTest extends TestCase {
+public abstract class AbstractCyRootNetworkTest {
        protected CyRootNetwork root;
        protected CyRootNetwork root2;
 
+       @Test
        public void testInitialRootNetworkState() {
                System.out.println("---> testInitialRootNetworkState");
                List<CySubNetwork> subnets = root.getSubNetworkList();
@@ -80,6 +66,7 @@
                assertTrue("subnetwork list contains 
base",root.getSubNetworkList().contains(base));
        }
 
+       @Test
        public void testAddSubNetwork() {
                System.out.println("---> testAddSubNetwork");
                CyNode n1 = root.addNode();
@@ -107,6 +94,7 @@
                assertEquals("base edges", 1, s1.getEdgeList().size());
        }
 
+       @Test
        public void testRemoveSubNetwork() {
                System.out.println("---> testRemoveSubNetwork");
 
@@ -161,6 +149,7 @@
                assertEquals("num 
subnetworks",1,root.getSubNetworkList().size());
        }
 
+       @Test
        public void testGetAllNodes() {
                System.out.println("---> testGetAllNodes");
                CyNode n1 = root.getBaseNetwork().addNode();
@@ -189,6 +178,7 @@
                assertEquals("s2 node count",3,s2.getNodeCount());
        }
 
+       @Test
        public void testGetAllEdges() {
                System.out.println("---> testGetAllEdges");
                CyNode n1 = root.getBaseNetwork().addNode();
@@ -213,6 +203,7 @@
                assertEquals("s1 edge count",1,s1.getEdgeCount());
        }
 
+       @Test
        public void testJustRootAddNode() {
                CyNode n1 = root.addNode();
 
@@ -224,6 +215,7 @@
                assertEquals("base node count", 1, 
root.getBaseNetwork().getNodeCount());
        }
 
+       @Test
        public void testJustRootAddEdge() {
                CyNode n1 = root.addNode();
                CyNode n2 = root.addNode();
@@ -241,6 +233,7 @@
                assertEquals("base edge count", 1, 
root.getBaseNetwork().getEdgeCount());
        }
 
+       @Test
        public void testEdgesCantCrossRootAndSubNetwork() {
                CyNode n1 = root.addNode();
                CyNode n2 = root.addNode();
@@ -258,6 +251,7 @@
                fail("edges can't cross subnetworks");
        }
 
+       @Test
        public void testEdgesCantCrossSubNetworks() {
                CySubNetwork s1 = root.addSubNetwork();
                CyNode n1 = s1.addNode();
@@ -274,7 +268,7 @@
                fail("edges can't cross subnetworks");
        }
 
-
+       @Test
        public void testAddNode() {
                System.out.println("---> testAddNode");
                CyNode n1 = root.getBaseNetwork().addNode();
@@ -326,6 +320,7 @@
                assertEquals("base node list 
size",4,root.getBaseNetwork().getNodeList().size());
        }
 
+       @Test
        public void testRemoveBaseNetwork() {
                CySubNetwork base = root.getBaseNetwork();
                try {
@@ -336,6 +331,7 @@
                fail("can't remove the base network from a root network");
        }
 
+       @Test
        public void testGetSubNetworkList() {
                System.out.println("---> testGetSubNetworkList");
                CyNode n1 = root.addNode();
@@ -363,7 +359,7 @@
 
                CySubNetwork s2 = root.addSubNetwork();
 
-               // list of size 3 
+               // list of size 3
                List<CySubNetwork> mnodes2 = root.getSubNetworkList();
                assertNotNull(mnodes2);
                assertEquals("subnet node list size",3,mnodes2.size());
@@ -380,6 +376,7 @@
                assertFalse("not contains s1",mnodes3.contains(s1));
        }
 
+       @Test
        public void testGetBaseNetwork() {
                System.out.println("---> testGetBaseNetwork");
 
@@ -404,7 +401,7 @@
                assertEquals("num nodes",4,base2.getNodeCount());
                assertEquals("num edges",3,base2.getEdgeCount());
 
-               // now add a subnetwork 
+               // now add a subnetwork
                CySubNetwork s1 = root.addSubNetwork();
 
                CySubNetwork base3 = root.getBaseNetwork();
@@ -412,8 +409,8 @@
                assertEquals("num nodes",4,base3.getNodeCount());
                assertEquals("num edges",3,base3.getEdgeCount());
        }
-       
 
+       @Test
        public void testAddSubNetworkNodes() {
                System.out.println("---> testAddSubNetworkNodes");
                CyNode n1 = root.addNode();
@@ -476,7 +473,7 @@
                assertFalse("s2 contains e5",s2.containsEdge(e5));
        }
 
-
+       @Test
        public void testRemoveSubNetwork2() {
                System.out.println("---> testRemoveSubNetwork");
                CyNode n1 = root.addNode();
@@ -511,10 +508,11 @@
                assertFalse("subnetwork contains s1",subs.contains(s1));
        }
 
+       @Test
        public void testRemoveBadSubNetwork() {
                CySubNetwork s1 = root.addSubNetwork();
                CySubNetwork s2 = root2.addSubNetwork();
-       
+
                assertNotNull(s1);
                assertNotNull(s2);
 
@@ -527,6 +525,7 @@
                fail("shouldn't be able to remove subnetwork that isn't 
yours!");
        }
 
+       @Test
        public void testRemoveNullSubNetwork() {
                try {
                        root.removeSubNetwork(null);
@@ -535,20 +534,24 @@
                }
        }
 
+       @Test
        public void testContainsNetwork() {
                CySubNetwork s1 = root.addSubNetwork();
                assertTrue(root.containsNetwork(s1));
        }
 
+       @Test
        public void testNotContainsNetwork() {
                CySubNetwork s2 = root2.addSubNetwork();
                assertFalse(root.containsNetwork(s2));
        }
 
+       @Test
        public void testNullContainsNetwork() {
                assertFalse(root.containsNetwork(null));
        }
 
+       @Test
        public void testAddSubNetworkWithGoodNodesAndGoodEdges() {
                CyNode n1 = root.addNode();
                CyNode n2 = root.addNode();
@@ -566,6 +569,7 @@
                assertTrue( n.containsEdge(e1) );
        }
 
+       @Test
        public void testAddSubNetworkWithNullNodesAndGoodEdges() {
                CyNode n1 = root.addNode();
                CyNode n2 = root.addNode();
@@ -580,6 +584,7 @@
                assertTrue(n.containsEdge(e1) );
        }
 
+       @Test
        public void testAddSubNetworkWithGoodNodesAndNullEdges() {
                CyNode n1 = root.addNode();
                CyNode n2 = root.addNode();
@@ -594,12 +599,13 @@
                assertTrue( n.containsNode(n3) );
        }
 
+       @Test
        public void testAddSubNetworkWithEmptyNodesAndGoodEdges() {
                CyNode n1 = root.addNode();
                CyNode n2 = root.addNode();
                CyEdge e1 = root.addEdge(n1,n2,false);
 
-               List<CyNode> nodes = new ArrayList<CyNode>(); 
+               List<CyNode> nodes = new ArrayList<CyNode>();
                List<CyEdge> edges = Arrays.asList( e1 );
 
                CySubNetwork n = root.addSubNetwork(nodes, edges);
@@ -609,13 +615,14 @@
                assertTrue( n.containsEdge(e1) );
        }
 
+       @Test
        public void testAddSubNetworkWithGoodNodesAndEmptyEdges() {
                CyNode n1 = root.addNode();
                CyNode n2 = root.addNode();
                CyNode n3 = root.addNode();
 
                List<CyNode> nodes = Arrays.asList( n1, n2, n3 );
-               List<CyEdge> edges = new ArrayList<CyEdge>(); 
+               List<CyEdge> edges = new ArrayList<CyEdge>();
 
                CySubNetwork n = root.addSubNetwork(nodes, edges);
 
@@ -624,6 +631,7 @@
                assertTrue( n.containsNode(n3) );
        }
 
+       @Test
        public void testAddSubNetworkWithInvalidNodesAndGoodEdges() {
                CyNode n1 = root.addNode();
                CyNode n2 = root.addNode();
@@ -643,11 +651,12 @@
                fail("shouldn't allow nodes not in root network to be used");
        }
 
+       @Test
        public void testAddSubNetworkWithGoodNodesAndInvalidEdges() {
                CyNode n1 = root.addNode();
                CyNode n2 = root.addNode();
                CyNode n3 = root.addNode();
-               
+
                CyEdge ex = new DummyCyEdge(null,null,false,50);
                List<CyNode> nodes = Arrays.asList( n1, n2, n3 );
                List<CyEdge> edges = Arrays.asList( ex );

Modified: 
core3/model-api/trunk/src/test/java/org/cytoscape/model/subnetwork/AbstractCySubNetworkTest.java
===================================================================
--- 
core3/model-api/trunk/src/test/java/org/cytoscape/model/subnetwork/AbstractCySubNetworkTest.java
    2011-08-02 23:28:08 UTC (rev 26359)
+++ 
core3/model-api/trunk/src/test/java/org/cytoscape/model/subnetwork/AbstractCySubNetworkTest.java
    2011-08-03 01:13:37 UTC (rev 26360)
@@ -1,14 +1,6 @@
-
 /*
- Copyright (c) 2008, The Cytoscape Consortium (www.cytoscape.org)
+ Copyright (c) 2008, 2011, The Cytoscape Consortium (www.cytoscape.org)
 
- The Cytoscape Consortium is:
- - Institute for Systems Biology
- - University of California San Diego
- - Memorial Sloan-Kettering Cancer Center
- - Institut Pasteur
- - Agilent Technologies
-
  This library is free software; you can redistribute it and/or modify it
  under the terms of the GNU Lesser General Public License as published
  by the Free Software Foundation; either version 2.1 of the License, or
@@ -33,14 +25,13 @@
  along with this library; if not, write to the Free Software Foundation,
  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
 */
-
 package org.cytoscape.model.subnetwork;
 
-import junit.framework.Assert;
-import junit.framework.Test;
-import junit.framework.TestCase;
-import junit.framework.TestSuite;
 
+import static org.junit.Assert.*;
+import org.junit.Before;
+import org.junit.Test;
+
 import org.cytoscape.event.CyEvent;
 import org.cytoscape.event.CyEventHelper;
 import org.cytoscape.event.CyListener;
@@ -65,8 +56,7 @@
 /**
  * DOCUMENT ME!
  */
-public abstract class AbstractCySubNetworkTest extends TestCase {
-
+public abstract class AbstractCySubNetworkTest {
        protected CyRootNetwork root;
        protected CyRootNetwork root2;
 
@@ -84,25 +74,20 @@
        private CyEdge e3;
 
        private CyEdge ex1;
-
        private CySubNetwork sub;
 
-
-       /**
-        *  DOCUMENT ME!
-        */
        private void defaultSetup() {
-        n1 = root.addNode();
-        n2 = root.addNode();
-        n3 = root.addNode();
-        n4 = root.addNode();
-        n5 = root.addNode();
+               n1 = root.addNode();
+               n2 = root.addNode();
+               n3 = root.addNode();
+               n4 = root.addNode();
+               n5 = root.addNode();
 
                e1 = root.addEdge(n1,n2,true);
                e2 = root.addEdge(n3,n2,true);
                e3 = root.addEdge(n1,n3,false);
 
-        sub = root.addSubNetwork();
+               sub = root.addSubNetwork();
                sub.addNode(n1);
                sub.addNode(n2);
                sub.addEdge(e1);
@@ -111,12 +96,8 @@
                nx2 = root2.addNode();
        }
 
-
-       /**
-        *  DOCUMENT ME!
-        */
+       @Test
        public void testAddNode() {
-
                defaultSetup();
 
                assertNotNull("subnetwork is not null",sub);
@@ -149,10 +130,12 @@
                assertFalse("contains edge2",sub.containsEdge(e2));
                assertFalse("contains edge3",sub.containsEdge(e3));
 
-    }
+       }
 
+       @Test
        public void testNullAddNode() {
                defaultSetup();
+
                try {
                        sub.addNode(null);
                } catch (Exception e) {
@@ -164,13 +147,15 @@
                fail();
        }
 
+       @Test
        public void testAlreadyAddedAddNode() {
                defaultSetup();
 
                assertFalse("node already exists", sub.addNode( n1 ) );
                noChangeChecks();
-    }
+       }
 
+       @Test
        public void testNodeFromDifferntRootAddNode() {
                defaultSetup();
 
@@ -183,8 +168,9 @@
 
                // if we don't get an exception
                fail();
-    }
+       }
 
+       @Test
        public void testNullEdgeAdd() {
                defaultSetup();
 
@@ -199,15 +185,18 @@
                fail();
        }
 
+       @Test
        public void testAlreadyAddedAddEdge() {
                defaultSetup();
 
                assertFalse("edge already exists", sub.addEdge( e1 ) );
                noChangeChecks();
-    }
+       }
 
+       @Test
        public void testEdgeFromDifferntRootAddEdge() {
                defaultSetup();
+
                ex1 = root2.addEdge(nx1,nx2,true);
 
                try {
@@ -219,7 +208,7 @@
 
                // if we don't get an exception
                fail();
-    }
+       }
 
        private void noChangeChecks() {
                assertNotNull("subnetwork is not null",sub);
@@ -231,16 +220,17 @@
        }
 
 
+       @Test
        public void testRemoveNode() {
                defaultSetup();
 
-        CySubNetwork sub2 = root.addSubNetwork();
+               CySubNetwork sub2 = root.addSubNetwork();
                sub2.addNode(n1);
                sub2.addNode(n2);
                sub2.addNode(n4);
                sub2.addEdge(e1);
 
-        assertNotNull("subnetwork is not null",sub2);
+               assertNotNull("subnetwork is not null",sub2);
                assertEquals("num nodes",3,sub2.getNodeCount());
                assertEquals("num edges",1,sub2.getEdgeCount());
                assertTrue("contains node1",sub2.containsNode(n1));
@@ -267,14 +257,15 @@
                assertTrue("contains node2",sub2.containsNode(n2));
                assertFalse("contains edge1",sub2.containsEdge(e1));
                assertFalse("contains edge1",sub2.containsEdge(n1,n2));
-    }
+       }
 
+       @Test
        public void testInvalidRemoveFromNetwork() {
                defaultSetup();
 
                checkInvalidRemove(sub,nx1);
                checkInvalidRemove(sub,null);
-    }
+       }
 
        private void checkInvalidRemove(CySubNetwork s, CyNode n) {
                try {
@@ -294,8 +285,10 @@
                fail();
        }
 
+       @Test
        public void testGetRootNetwork() {
                defaultSetup();
+
                CyRootNetwork r2 = sub.getRootNetwork();
                assertNotNull("root is not null",r2);
                assertTrue("r2 equals root",r2.equals(root));
@@ -303,19 +296,25 @@
                assertEquals("edge list 
size",r2.getEdgeList().size(),root.getEdgeList().size());
        }
 
+       @Test
        public void testAddEdgeNotYetAddedSource() {
                defaultSetup();
+
                assertTrue(sub.addEdge(e3));
        }
 
+       @Test
        public void testAddEdgeNotYetAddedTarget() {
                defaultSetup();
+
                CyEdge e4 = root.addEdge(n4,n1,true);
                assertTrue(sub.addEdge(e4));
        }
 
+       @Test
        public void testAddEdgeBadEdge() {
                defaultSetup();
+
                CyEdge ex = new DummyCyEdge(null,null,true,100);
                try {
                        sub.addEdge(ex);
@@ -325,6 +324,7 @@
                }
        }
 
+       @Test
        public void testAddNodeInSubNetwork() {
                defaultSetup();
 
@@ -337,6 +337,7 @@
        /**
         * Checks that getNeighbors works as expected for CySubNetwork
         */
+       @Test
        public void testNodeAddedInSubnetworkSubGetNeighbors() {
                defaultSetup();
 
@@ -352,7 +353,7 @@
                List<CyNode> nl4 = root.getNeighborList(nz1,CyEdge.Type.ANY);
                assertEquals(1,nl4.size());
 
-        CySubNetwork sub2 = root.addSubNetwork();
+               CySubNetwork sub2 = root.addSubNetwork();
                sub2.addNode(n1);
                sub2.addNode(n2);
                // no edges in sub2, so no neighbors!
@@ -361,7 +362,7 @@
                assertEquals(0,nl.size());
        }
 
-       // TODO 
+       // TODO
        // add tests that are similar to getNeighbors for getAdjacentEdges and 
getConnectingEdges
        //
 }

Modified: 
core3/model-impl/trunk/impl/src/test/java/org/cytoscape/model/CyTableManagerTest.java
===================================================================
--- 
core3/model-impl/trunk/impl/src/test/java/org/cytoscape/model/CyTableManagerTest.java
       2011-08-02 23:28:08 UTC (rev 26359)
+++ 
core3/model-impl/trunk/impl/src/test/java/org/cytoscape/model/CyTableManagerTest.java
       2011-08-03 01:13:37 UTC (rev 26360)
@@ -1,5 +1,5 @@
 /*
- Copyright (c) 2008, 2010, The Cytoscape Consortium (www.cytoscape.org)
+ Copyright (c) 2008, 2010-2011, The Cytoscape Consortium (www.cytoscape.org)
 
  This library is free software; you can redistribute it and/or modify it
  under the terms of the GNU Lesser General Public License as published
@@ -28,6 +28,11 @@
 package org.cytoscape.model;
 
 
+import static org.junit.Assert.*;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+
 import org.cytoscape.equations.Interpreter;
 import org.cytoscape.equations.internal.interpreter.InterpreterImpl;
 import org.cytoscape.event.CyEventHelper;
@@ -42,22 +47,25 @@
 public class CyTableManagerTest extends AbstractCyTableManagerTest {
        CyTableManagerImpl mgrImpl;
 
+       @Before
        public void setUp() {
                super.setUp();
                CyEventHelper eh = new DummyCyEventHelper();
                mgrImpl = new CyTableManagerImpl(eh);
-               mgr = mgrImpl; 
+               mgr = mgrImpl;
                final Interpreter interpreter = new InterpreterImpl();
                goodNetwork =
                        new ArrayGraph(eh, mgrImpl,
                                       new CyTableFactoryImpl(eh, mgrImpl, 
interpreter), true).getBaseNetwork();
        }
 
+       @After
        public void tearDown() {
                mgr = null;
                goodNetwork = null;
        }
 
+       @Test
        public void immutableTableTest() {
                boolean exceptionWasThrown = false;
                try {
@@ -68,6 +76,7 @@
                assertTrue(exceptionWasThrown);
        }
 
+       @Test
        public void tableWithVirtColumnDeletionTest() {
                CyEventHelper eventHelper = new DummyCyEventHelper();
                final Interpreter interpreter = new InterpreterImpl();
@@ -83,10 +92,10 @@
                table2.createListColumn("b", Boolean.class, false);
                table.addVirtualColumn("b1", "b", table2, "x2", "x", true);
 
-               mgrImpl.addTable(table);
+               mgrImpl.addTable(table2);
                boolean caughtException = false;
                try {
-                       mgr.deleteTable(table.getSUID());
+                       mgr.deleteTable(table2.getSUID());
                } catch (IllegalArgumentException e) {
                        caughtException = true;
                }

Modified: 
core3/model-impl/trunk/impl/src/test/java/org/cytoscape/model/GraphObjectTest.java
===================================================================
--- 
core3/model-impl/trunk/impl/src/test/java/org/cytoscape/model/GraphObjectTest.java
  2011-08-02 23:28:08 UTC (rev 26359)
+++ 
core3/model-impl/trunk/impl/src/test/java/org/cytoscape/model/GraphObjectTest.java
  2011-08-03 01:13:37 UTC (rev 26360)
@@ -1,14 +1,6 @@
-
 /*
- Copyright (c) 2008, The Cytoscape Consortium (www.cytoscape.org)
+ Copyright (c) 2008, 2011, The Cytoscape Consortium (www.cytoscape.org)
 
- The Cytoscape Consortium is:
- - Institute for Systems Biology
- - University of California San Diego
- - Memorial Sloan-Kettering Cancer Center
- - Institut Pasteur
- - Agilent Technologies
-
  This library is free software; you can redistribute it and/or modify it
  under the terms of the GNU Lesser General Public License as published
  by the Free Software Foundation; either version 2.1 of the License, or
@@ -33,26 +25,22 @@
  along with this library; if not, write to the Free Software Foundation,
  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
 */
-
 package org.cytoscape.model;
 
+
 import org.cytoscape.model.CyNetwork;
 
-/**
- * DOCUMENT ME!
- */
-public class GraphObjectTest extends AbstractGraphObjectTest {
+import org.junit.After;
+import org.junit.Before;
 
-       /**
-        *  DOCUMENT ME!
-        */
+
+public class GraphObjectTest extends AbstractGraphObjectTest {
+       @Before
        public void setUp() {
-               net = TestCyNetworkFactory.getInstance(); 
+               net = TestCyNetworkFactory.getInstance();
        }
 
-       /**
-        *  DOCUMENT ME!
-        */
+       @After
        public void tearDown() {
                net = null;
        }

Modified: 
core3/model-impl/trunk/impl/src/test/java/org/cytoscape/model/IdentifiableTest.java
===================================================================
--- 
core3/model-impl/trunk/impl/src/test/java/org/cytoscape/model/IdentifiableTest.java
 2011-08-02 23:28:08 UTC (rev 26359)
+++ 
core3/model-impl/trunk/impl/src/test/java/org/cytoscape/model/IdentifiableTest.java
 2011-08-03 01:13:37 UTC (rev 26360)
@@ -1,14 +1,6 @@
-
 /*
- Copyright (c) 2008, The Cytoscape Consortium (www.cytoscape.org)
+ Copyright (c) 2008, 2011, The Cytoscape Consortium (www.cytoscape.org)
 
- The Cytoscape Consortium is:
- - Institute for Systems Biology
- - University of California San Diego
- - Memorial Sloan-Kettering Cancer Center
- - Institut Pasteur
- - Agilent Technologies
-
  This library is free software; you can redistribute it and/or modify it
  under the terms of the GNU Lesser General Public License as published
  by the Free Software Foundation; either version 2.1 of the License, or
@@ -33,26 +25,22 @@
  along with this library; if not, write to the Free Software Foundation,
  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
 */
-
 package org.cytoscape.model;
 
+
 import org.cytoscape.model.CyNetwork;
 
-/**
- * DOCUMENT ME!
- */
-public class IdentifiableTest extends AbstractIdentifiableTest {
+import org.junit.Before;
+import org.junit.After;
 
-       /**
-        *  DOCUMENT ME!
-        */
+
+public class IdentifiableTest extends AbstractIdentifiableTest {
+       @Before
        public void setUp() {
-               net = TestCyNetworkFactory.getInstance(); 
+               net = TestCyNetworkFactory.getInstance();
        }
 
-       /**
-        *  DOCUMENT ME!
-        */
+       @After
        public void tearDown() {
                net = null;
        }

Modified: 
core3/model-impl/trunk/impl/src/test/java/org/cytoscape/model/subnetwork/CyRootNetworkTest.java
===================================================================
--- 
core3/model-impl/trunk/impl/src/test/java/org/cytoscape/model/subnetwork/CyRootNetworkTest.java
     2011-08-02 23:28:08 UTC (rev 26359)
+++ 
core3/model-impl/trunk/impl/src/test/java/org/cytoscape/model/subnetwork/CyRootNetworkTest.java
     2011-08-03 01:13:37 UTC (rev 26360)
@@ -1,14 +1,6 @@
-
 /*
- Copyright (c) 2008, The Cytoscape Consortium (www.cytoscape.org)
+ Copyright (c) 2008, 2011, The Cytoscape Consortium (www.cytoscape.org)
 
- The Cytoscape Consortium is:
- - Institute for Systems Biology
- - University of California San Diego
- - Memorial Sloan-Kettering Cancer Center
- - Institut Pasteur
- - Agilent Technologies
-
  This library is free software; you can redistribute it and/or modify it
  under the terms of the GNU Lesser General Public License as published
  by the Free Software Foundation; either version 2.1 of the License, or
@@ -33,28 +25,23 @@
  along with this library; if not, write to the Free Software Foundation,
  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
 */
-
 package org.cytoscape.model.subnetwork;
 
+
 import org.cytoscape.model.TestCyNetworkFactory;
 
+import org.junit.After;
+import org.junit.Before;
 
-/**
- * DOCUMENT ME!
-  */
-public class CyRootNetworkTest extends AbstractCyRootNetworkTest {
 
-       /**
-        *  DOCUMENT ME!
-        */
+public class CyRootNetworkTest extends AbstractCyRootNetworkTest {
+       @Before
        public void setUp() {
-               root = TestCyNetworkFactory.getPublicRootInstance(); 
-               root2 = TestCyNetworkFactory.getPublicRootInstance(); 
+               root = TestCyNetworkFactory.getPublicRootInstance();
+               root2 = TestCyNetworkFactory.getPublicRootInstance();
        }
 
-       /**
-        *  DOCUMENT ME!
-        */
+       @After
        public void tearDown() {
                root = null;
                root2 = null;

Modified: 
core3/model-impl/trunk/impl/src/test/java/org/cytoscape/model/subnetwork/CySubNetworkTest.java
===================================================================
--- 
core3/model-impl/trunk/impl/src/test/java/org/cytoscape/model/subnetwork/CySubNetworkTest.java
      2011-08-02 23:28:08 UTC (rev 26359)
+++ 
core3/model-impl/trunk/impl/src/test/java/org/cytoscape/model/subnetwork/CySubNetworkTest.java
      2011-08-03 01:13:37 UTC (rev 26360)
@@ -1,14 +1,6 @@
-
 /*
- Copyright (c) 2008, The Cytoscape Consortium (www.cytoscape.org)
+ Copyright (c) 2008, 2011, The Cytoscape Consortium (www.cytoscape.org)
 
- The Cytoscape Consortium is:
- - Institute for Systems Biology
- - University of California San Diego
- - Memorial Sloan-Kettering Cancer Center
- - Institut Pasteur
- - Agilent Technologies
-
  This library is free software; you can redistribute it and/or modify it
  under the terms of the GNU Lesser General Public License as published
  by the Free Software Foundation; either version 2.1 of the License, or
@@ -36,25 +28,21 @@
 
 package org.cytoscape.model.subnetwork;
 
+
 import org.cytoscape.model.TestCyNetworkFactory;
 
+import org.junit.After;
+import org.junit.Before;
 
-/**
- * DOCUMENT ME!
-  */
-public class CySubNetworkTest extends AbstractCySubNetworkTest {
 
-       /**
-        *  DOCUMENT ME!
-        */
+public class CySubNetworkTest extends AbstractCySubNetworkTest {
+       @Before
        public void setUp() {
-               root = TestCyNetworkFactory.getPublicRootInstance(); 
-               root2 = TestCyNetworkFactory.getPublicRootInstance(); 
+               root = TestCyNetworkFactory.getPublicRootInstance();
+               root2 = TestCyNetworkFactory.getPublicRootInstance();
        }
 
-       /**
-        *  DOCUMENT ME!
-        */
+       @After
        public void tearDown() {
                root = null;
                root2 = null;

-- 
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