Author: ruschein
Date: 2009-11-23 16:14:35 -0800 (Mon, 23 Nov 2009)
New Revision: 18553

Modified:
   cytoscape/trunk/tests/cytoscape/util/NestedNetworkImageManagerTest.java
Log:
Fixed broken test.

Modified: 
cytoscape/trunk/tests/cytoscape/util/NestedNetworkImageManagerTest.java
===================================================================
--- cytoscape/trunk/tests/cytoscape/util/NestedNetworkImageManagerTest.java     
2009-11-24 00:14:02 UTC (rev 18552)
+++ cytoscape/trunk/tests/cytoscape/util/NestedNetworkImageManagerTest.java     
2009-11-24 00:14:35 UTC (rev 18553)
@@ -1,36 +1,43 @@
 package cytoscape.util;
 
 import junit.framework.TestCase;
+import java.util.List;
 import cytoscape.Cytoscape;
+import cytoscape.CyNode;
 import cytoscape.data.readers.NNFReader;
 
+
 public class NestedNetworkImageManagerTest extends TestCase {
-       
        private static final String FILE_LOCATION = "testData/NNFData/";
 
+
        protected void setUp() throws Exception {
                super.setUp();
+
                // Instantiate Nested Network Image Manager singleton
                NestedNetworkImageManager.getNetworkImageGenerator();
        }
 
+
        protected void tearDown() throws Exception {
                super.tearDown();
        }
+
        
        public void testNestedNetworkImageManager() throws Exception {
                TestUtil.destroyNetworksEdgesAndNodes();
+
                // Load nested network
                final NNFReader reader = new NNFReader(FILE_LOCATION + 
"good3.nnf");
                reader.read();
                
-               assertNotNull(Cytoscape.getCyNode("M1"));
+               final CyNode m1 = Cytoscape.getCyNode("M1");
+               assertNotNull(m1);
                assertNotNull(Cytoscape.getCyNode("M2"));
                assertNotNull(Cytoscape.getCyNode("M3"));
                assertEquals(3, 
NestedNetworkImageManager.getNetworkImageGenerator().getImageCount());
-               
-               TestUtil.destroyNetworksEdgesAndNodes();
-               //assertEquals(0, 
NestedNetworkImageManager.getNetworkImageGenerator().getImageCount());        
+
+               m1.setNestedNetwork(null);
+               assertEquals(2, 
NestedNetworkImageManager.getNetworkImageGenerator().getImageCount());  
        }
-
 }

--

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


Reply via email to