[jboss-cvs] JBossAS SVN: r91350 - in projects/mc-tools/grapher/trunk/src/test: resources/org/jboss/test/mctools/grapher/graph/test and 1 other directory.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Thu Jul 16 12:08:31 EDT 2009


Author: alesj
Date: 2009-07-16 12:08:30 -0400 (Thu, 16 Jul 2009)
New Revision: 91350

Modified:
   projects/mc-tools/grapher/trunk/src/test/java/org/jboss/test/mctools/grapher/graph/test/GraphCreatorTestCase.java
   projects/mc-tools/grapher/trunk/src/test/resources/org/jboss/test/mctools/grapher/graph/test/GraphCreatorTestCase.xml
Log:
More tree tests.

Modified: projects/mc-tools/grapher/trunk/src/test/java/org/jboss/test/mctools/grapher/graph/test/GraphCreatorTestCase.java
===================================================================
--- projects/mc-tools/grapher/trunk/src/test/java/org/jboss/test/mctools/grapher/graph/test/GraphCreatorTestCase.java	2009-07-16 16:06:52 UTC (rev 91349)
+++ projects/mc-tools/grapher/trunk/src/test/java/org/jboss/test/mctools/grapher/graph/test/GraphCreatorTestCase.java	2009-07-16 16:08:30 UTC (rev 91350)
@@ -28,13 +28,13 @@
 import org.jboss.dependency.spi.ControllerContext;
 import org.jboss.mctools.grapher.graph.AllGraphCreator;
 import org.jboss.mctools.grapher.graph.BeanGraphCreator;
+import org.jboss.mctools.grapher.graph.GEdge;
+import org.jboss.mctools.grapher.graph.GVertex;
 import org.jboss.mctools.grapher.graph.GraphCreator;
 import org.jboss.mctools.grapher.graph.TreeGraphCreator;
 import org.jboss.mctools.grapher.map.ExcludeTypes;
 import org.jboss.test.mctools.grapher.GrapherTest;
 import org.jgraph.JGraph;
-import org.jgraph.graph.DefaultGraphCell;
-import org.jgraph.graph.Edge;
 
 /**
  * Graph creator impl tests.
@@ -68,9 +68,9 @@
       assertEquals(roots.length, vertices + edges);
       for (Object cell : roots)
       {
-         if (cell instanceof Edge)
+         if (cell instanceof GEdge)
             edges--;
-         else if (cell instanceof DefaultGraphCell)
+         else if (cell instanceof GVertex)
             vertices--;
       }
       assertEquals("Vertices: " + Arrays.asList(roots).toString(), 0, vertices);
@@ -79,7 +79,7 @@
 
    public void testAll()
    {
-      assertGraphCreator(new AllGraphCreator(), 3, 3);
+      assertGraphCreator(new AllGraphCreator(), 5, 4);
    }
 
    public void testBean()
@@ -90,6 +90,7 @@
    public void testTree()
    {
       assertGraphCreator(new TreeGraphCreator("Dep2"), 3, 3);
+      assertGraphCreator(new TreeGraphCreator("BF2"), 2, 1);
    }
 
    public void testExcludePojos() throws Throwable
@@ -112,7 +113,7 @@
       controller.addAlias("ExtAlias", "Owner");
       try
       {
-         assertGraphCreator(new AllGraphCreator(), 3, 3, "alias");
+         assertGraphCreator(new AllGraphCreator(), 5, 4, "alias");
       }
       finally
       {

Modified: projects/mc-tools/grapher/trunk/src/test/resources/org/jboss/test/mctools/grapher/graph/test/GraphCreatorTestCase.xml
===================================================================
--- projects/mc-tools/grapher/trunk/src/test/resources/org/jboss/test/mctools/grapher/graph/test/GraphCreatorTestCase.xml	2009-07-16 16:06:52 UTC (rev 91349)
+++ projects/mc-tools/grapher/trunk/src/test/resources/org/jboss/test/mctools/grapher/graph/test/GraphCreatorTestCase.xml	2009-07-16 16:08:30 UTC (rev 91350)
@@ -16,4 +16,10 @@
     <depends>Dep1</depends>
   </bean>
 
+  <bean name="BF1" class="java.lang.Object"/>
+
+  <bean name="BF2" class="java.lang.Object">
+    <demand>BF1</demand>
+  </bean>
+
 </deployment>




More information about the jboss-cvs-commits mailing list