You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by ma...@apache.org on 2012/02/15 19:23:32 UTC

svn commit: r1244629 - /commons/sandbox/graph/trunk/src/test/java/org/apache/commons/graph/coloring/GraphColoringTestCase.java

Author: marcosperanza
Date: Wed Feb 15 18:23:31 2012
New Revision: 1244629

URL: http://svn.apache.org/viewvc?rev=1244629&view=rev
Log:
Removed duplicated test case

Modified:
    commons/sandbox/graph/trunk/src/test/java/org/apache/commons/graph/coloring/GraphColoringTestCase.java

Modified: commons/sandbox/graph/trunk/src/test/java/org/apache/commons/graph/coloring/GraphColoringTestCase.java
URL: http://svn.apache.org/viewvc/commons/sandbox/graph/trunk/src/test/java/org/apache/commons/graph/coloring/GraphColoringTestCase.java?rev=1244629&r1=1244628&r2=1244629&view=diff
==============================================================================
--- commons/sandbox/graph/trunk/src/test/java/org/apache/commons/graph/coloring/GraphColoringTestCase.java (original)
+++ commons/sandbox/graph/trunk/src/test/java/org/apache/commons/graph/coloring/GraphColoringTestCase.java Wed Feb 15 18:23:31 2012
@@ -31,7 +31,6 @@ import static org.junit.Assert.assertNot
 import java.util.Set;
 
 import org.apache.commons.graph.Edge;
-import org.apache.commons.graph.GraphException;
 import org.apache.commons.graph.UndirectedGraph;
 import org.apache.commons.graph.Vertex;
 import org.apache.commons.graph.builder.AbstractGraphConnection;
@@ -90,35 +89,8 @@ public class GraphColoringTestCase exten
         assertEquals( 0, coloredVertices.getRequiredColors() );
     }
 
-    @Test(expected=NotEnoughColorsException.class)
-    public void testNotEnoughtColorGraph()
-        throws NotEnoughColorsException
-    {
-        final BaseLabeledVertex two = new BaseLabeledVertex( "2" );
-
-        UndirectedMutableGraph<BaseLabeledVertex, BaseLabeledEdge> g =
-            newUndirectedMutableGraph( new AbstractGraphConnection<BaseLabeledVertex, BaseLabeledEdge>()
-            {
-
-                @Override
-                public void connect()
-                {
-                    BaseLabeledVertex one = addVertex( new BaseLabeledVertex( "1" ) );
-                    addVertex( two );
-                    BaseLabeledVertex three = addVertex( new BaseLabeledVertex( "3" ) );
-
-                    addEdge( new BaseLabeledEdge( "1 -> 2" ) ).from( one ).to( two );
-                    addEdge( new BaseLabeledEdge( "2 -> 3" ) ).from( two ).to( three );
-                    addEdge( new BaseLabeledEdge( "3 -> 1" ) ).from( three ).to( one );
-                    }
-
-            } );
-        coloring( g ).withColors( createColorsList( 1 ) ).applyingGreedyAlgorithm();
-    }
-
-    @Test(expected=GraphException.class)
+    @Test( expected = NotEnoughColorsException.class )
     public void testNotEnoughtColorGreedyGraph()
-        throws GraphException
     {
         final BaseLabeledVertex two = new BaseLabeledVertex( "2" );
 
@@ -136,7 +108,7 @@ public class GraphColoringTestCase exten
                     addEdge( new BaseLabeledEdge( "1 -> 2" ) ).from( one ).to( two );
                     addEdge( new BaseLabeledEdge( "2 -> 3" ) ).from( two ).to( three );
                     addEdge( new BaseLabeledEdge( "3 -> 1" ) ).from( three ).to( one );
-                    }
+                }
 
             } );
         coloring( g ).withColors( createColorsList( 1 ) ).applyingGreedyAlgorithm();