Author: rodche
Date: 2010-01-27 19:34:55 -0800 (Wed, 27 Jan 2010)
New Revision: 19059

Modified:
   
csplugins/trunk/toronto/rodche/BioPAX/test/cytoscape/coreplugins/biopax/mapper/TestBioPaxToCytoscapeMapper.java
   
csplugins/trunk/toronto/rodche/BioPAX/test/cytoscape/coreplugins/biopax/util/TestWebFileConnect.java
Log:
tests fixed

Modified: 
csplugins/trunk/toronto/rodche/BioPAX/test/cytoscape/coreplugins/biopax/mapper/TestBioPaxToCytoscapeMapper.java
===================================================================
--- 
csplugins/trunk/toronto/rodche/BioPAX/test/cytoscape/coreplugins/biopax/mapper/TestBioPaxToCytoscapeMapper.java
     2010-01-28 03:03:58 UTC (rev 19058)
+++ 
csplugins/trunk/toronto/rodche/BioPAX/test/cytoscape/coreplugins/biopax/mapper/TestBioPaxToCytoscapeMapper.java
     2010-01-28 03:34:55 UTC (rev 19059)
@@ -31,6 +31,8 @@
  **/
 package cytoscape.coreplugins.biopax.mapper;
 
+import java.util.*;
+
 import cytoscape.CyNetwork;
 import cytoscape.CyNode;
 import cytoscape.Cytoscape;
@@ -48,13 +50,6 @@
 
 import org.biopax.paxtools.model.Model;
 
-import java.io.FileReader;
-
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.Set;
-
-
 /**
  * Tests the MapBioPaxToCytoscape Mapper Class.
  *
@@ -87,7 +82,7 @@
         * @throws Exception All Exceptions.
         */
        public void testMapper1() throws Exception {
-               Model model =BioPaxUtil.readFile("biopax_sample1.owl");
+               Model model = 
BioPaxUtil.readFile("test-resources/biopax_sample1.owl");
                MapBioPaxToCytoscape mapper = new MapBioPaxToCytoscape();
                mapper.doMapping(model);
 
@@ -137,9 +132,9 @@
                        Node target = edge.getTarget();
 
                        if (i == 0) {
-                               assertEquals("CPATH-125(PM)-CPATH-126", 
target.getIdentifier());
+                               assertEquals("CPATH-125-CPATH-126", 
target.getIdentifier());
                        } else if (i == 1) {
-                               assertEquals("CPATH-124(PM)-CPATH-126", 
target.getIdentifier());
+                               assertEquals("CPATH-124-CPATH-126", 
target.getIdentifier());
                        }
                }
        }
@@ -199,9 +194,9 @@
                        Node target = edge.getTarget();
 
                        if (i == 0) {
-                               assertEquals("protein2", 
target.getIdentifier());
-                       } else if (i == 1) {
                                assertEquals("protein1", 
target.getIdentifier());
+                       } else if (i == 1) {
+                               assertEquals("protein2", 
target.getIdentifier());
                        }
                }
        }
@@ -220,8 +215,8 @@
                nodeMap.put("protein45", new Integer(0));
                nodeMap.put("protein32", new Integer(0));
                nodeMap.put("smallMolecule10", new Integer(0));
-               nodeMap.put("smallMolecule18(CY)", new Integer(0));
-               nodeMap.put("smallMolecule23(CY)", new Integer(0));
+               nodeMap.put("smallMolecule18", new Integer(0));
+               nodeMap.put("smallMolecule23", new Integer(0));
                nodeMap.put("smallMolecule27", new Integer(0));
                nodeMap.put("smallMolecule39", new Integer(0));
                nodeMap.put("smallMolecule99", new Integer(0));
@@ -250,7 +245,7 @@
                        if (nodeMap.containsKey(id)) {
                                nodeMap.put(id, new Integer(1));
                        } else {
-                               fail("Network contains an Node that we were not 
expecting:  " + "\"" + id + "\"");
+                               fail("Network contains a Node that we were not 
expecting:  " + "\"" + id + "\"");
                        }
                }
 
@@ -316,7 +311,7 @@
                                String edgeType = Cytoscape.getEdgeAttributes()
                                                           
.getStringAttribute(edge.getIdentifier(),
                                                                               
MapBioPaxToCytoscape.BIOPAX_EDGE_TYPE);
-                               assertEquals("ACTIVATION-NONALLOSTERIC", 
edgeType);
+                               assertEquals("ACTIVATION_NONALLOSTERIC", 
edgeType);
                        } else if (i == 2) {
                                //  Validate the Left Side of the Reaction
                                //  smallMolecule27 --> (LEFT) --> 
biochemicalReaction37

Modified: 
csplugins/trunk/toronto/rodche/BioPAX/test/cytoscape/coreplugins/biopax/util/TestWebFileConnect.java
===================================================================
--- 
csplugins/trunk/toronto/rodche/BioPAX/test/cytoscape/coreplugins/biopax/util/TestWebFileConnect.java
        2010-01-28 03:03:58 UTC (rev 19058)
+++ 
csplugins/trunk/toronto/rodche/BioPAX/test/cytoscape/coreplugins/biopax/util/TestWebFileConnect.java
        2010-01-28 03:34:55 UTC (rev 19059)
@@ -50,7 +50,7 @@
         */
        public void testFileConnect() throws Exception {
                String str = WebFileConnect.retrieveDocument(new 
File("test-resources/biopax_sample1.owl"));
-               assertTrue(str.startsWith("<?xml version=\"1.0\" " + 
"encoding=\"UTF-8\" ?>"));
+               assertTrue(str.startsWith("<?xml version=\"1.0\""));
        }
 
        /**

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