commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From simonetrip...@apache.org
Subject svn commit: r1135292 - in /commons/sandbox/meiyo/trunk: ./ src/test/java/org/apache/commons/meiyo/classpath/ src/test/java/org/apache/commons/meiyo/classpath/filter/ src/test/java/org/apache/commons/meiyo/classvisitor/
Date Mon, 13 Jun 2011 21:30:14 GMT
Author: simonetripodi
Date: Mon Jun 13 21:30:13 2011
New Revision: 1135292

URL: http://svn.apache.org/viewvc?rev=1135292&view=rev
Log:
tests moved to junit4

Modified:
    commons/sandbox/meiyo/trunk/pom.xml
    commons/sandbox/meiyo/trunk/src/test/java/org/apache/commons/meiyo/classpath/ClassPathTestCase.java
    commons/sandbox/meiyo/trunk/src/test/java/org/apache/commons/meiyo/classpath/filter/FiltersTestCase.java
    commons/sandbox/meiyo/trunk/src/test/java/org/apache/commons/meiyo/classvisitor/ClassVisitorTestCase.java

Modified: commons/sandbox/meiyo/trunk/pom.xml
URL: http://svn.apache.org/viewvc/commons/sandbox/meiyo/trunk/pom.xml?rev=1135292&r1=1135291&r2=1135292&view=diff
==============================================================================
--- commons/sandbox/meiyo/trunk/pom.xml (original)
+++ commons/sandbox/meiyo/trunk/pom.xml Mon Jun 13 21:30:13 2011
@@ -77,16 +77,9 @@
 
   <dependencies>
     <dependency>
-      <groupId>org.testng</groupId>
-      <artifactId>testng</artifactId>
-      <version>5.11</version>
-      <classifier>jdk15</classifier>
-      <exclusions>
-        <exclusion>
-          <groupId>junit</groupId>
-          <artifactId>junit</artifactId>
-        </exclusion>
-      </exclusions>
+      <groupId>junit</groupId>
+      <artifactId>junit</artifactId>
+      <version>4.8.1</version>
       <scope>test</scope>
     </dependency>
   </dependencies>

Modified: commons/sandbox/meiyo/trunk/src/test/java/org/apache/commons/meiyo/classpath/ClassPathTestCase.java
URL: http://svn.apache.org/viewvc/commons/sandbox/meiyo/trunk/src/test/java/org/apache/commons/meiyo/classpath/ClassPathTestCase.java?rev=1135292&r1=1135291&r2=1135292&view=diff
==============================================================================
--- commons/sandbox/meiyo/trunk/src/test/java/org/apache/commons/meiyo/classpath/ClassPathTestCase.java
(original)
+++ commons/sandbox/meiyo/trunk/src/test/java/org/apache/commons/meiyo/classpath/ClassPathTestCase.java
Mon Jun 13 21:30:13 2011
@@ -31,9 +31,7 @@ import static org.apache.commons.meiyo.c
 import java.util.ArrayList;
 import java.util.List;
 
-import org.apache.commons.meiyo.classpath.AbstractHandlerConfiguration;
-import org.apache.commons.meiyo.classpath.ClassPathEntryHandler;
-import org.testng.annotations.Test;
+import org.junit.Test;
 
 /**
  * FILL ME

Modified: commons/sandbox/meiyo/trunk/src/test/java/org/apache/commons/meiyo/classpath/filter/FiltersTestCase.java
URL: http://svn.apache.org/viewvc/commons/sandbox/meiyo/trunk/src/test/java/org/apache/commons/meiyo/classpath/filter/FiltersTestCase.java?rev=1135292&r1=1135291&r2=1135292&view=diff
==============================================================================
--- commons/sandbox/meiyo/trunk/src/test/java/org/apache/commons/meiyo/classpath/filter/FiltersTestCase.java
(original)
+++ commons/sandbox/meiyo/trunk/src/test/java/org/apache/commons/meiyo/classpath/filter/FiltersTestCase.java
Mon Jun 13 21:30:13 2011
@@ -29,33 +29,32 @@ import static org.apache.commons.meiyo.c
 import java.util.List;
 
 import org.apache.commons.meiyo.classpath.ClassLoaderBuilder;
-import org.apache.commons.meiyo.classpath.Matcher;
 import org.apache.commons.meiyo.classpath.ClassPathScanner;
-import org.apache.commons.meiyo.classpath.filter.AbstractFilter;
-import org.apache.commons.meiyo.classpath.filter.Filter;
-import org.apache.commons.meiyo.classpath.filter.Filters;
-import org.testng.annotations.Parameters;
-import org.testng.annotations.Test;
+import org.apache.commons.meiyo.classpath.Matcher;
+import org.junit.Test;
+import org.junit.runner.RunWith;
 
 /**
  * @version $Id$
  */
-@Test
+@DummyAnnotation
 public final class FiltersTestCase
 {
 
+    @Test
     public void matchesAnnotatedWithType()
     {
-        assert annotatedWithType( Test.class ).matches( this.getClass() );
-        assert !annotatedWithType( Parameters.class ).matches( this.getClass() );
+        assert annotatedWithType( DummyAnnotation.class ).matches( this.getClass() );
+        assert !annotatedWithType( RunWith.class ).matches( this.getClass() );
     }
 
-    @Test( expectedExceptions = { IllegalArgumentException.class } )
+    @Test( expected = IllegalArgumentException.class )
     public void noRuntimeRetention()
     {
         annotatedWithType( NoRuntimeRetention.class );
     }
 
+    @Test
     public void matchesInPackage()
     {
         Filter inMeiyoPackage = inPackage( "org.apache.commons.meiyo.classpath" );
@@ -63,6 +62,7 @@ public final class FiltersTestCase
         assert !inMeiyoPackage.matches( List.class );
     }
 
+    @Test
     public void matchesInSubPackage()
     {
         Filter inMeiyoPackage = inSubpackage( "org.apache.commons.meiyo.classpath" );
@@ -70,6 +70,7 @@ public final class FiltersTestCase
         assert !inMeiyoPackage.matches( List.class );
     }
 
+    @Test
     public void matchesInterface()
     {
         Filter isInterface = isInterface();
@@ -77,6 +78,7 @@ public final class FiltersTestCase
         assert isInterface.matches( Matcher.class );
     }
 
+    @Test
     public void matchesAbstract()
     {
         Filter isAbstract = isAbstract();
@@ -84,6 +86,7 @@ public final class FiltersTestCase
         assert !isAbstract.matches( Filter.class );
     }
 
+    @Test
     public void matchesContainsMethodWithNoArguments()
     {
         Filter containsMethod = containsMethod( "usingDefaultClassLoader" );
@@ -91,6 +94,7 @@ public final class FiltersTestCase
         assert !containsMethod.matches( Filter.class );
     }
 
+    @Test
     public void matchesContainsMethodWithArguments()
     {
         Filter containsMethod = containsMethod( "matches", Class.class );

Modified: commons/sandbox/meiyo/trunk/src/test/java/org/apache/commons/meiyo/classvisitor/ClassVisitorTestCase.java
URL: http://svn.apache.org/viewvc/commons/sandbox/meiyo/trunk/src/test/java/org/apache/commons/meiyo/classvisitor/ClassVisitorTestCase.java?rev=1135292&r1=1135291&r2=1135292&view=diff
==============================================================================
--- commons/sandbox/meiyo/trunk/src/test/java/org/apache/commons/meiyo/classvisitor/ClassVisitorTestCase.java
(original)
+++ commons/sandbox/meiyo/trunk/src/test/java/org/apache/commons/meiyo/classvisitor/ClassVisitorTestCase.java
Mon Jun 13 21:30:13 2011
@@ -22,11 +22,8 @@ package org.apache.commons.meiyo.classvi
 import java.lang.reflect.Constructor;
 import java.lang.reflect.Method;
 
-import org.apache.commons.meiyo.classvisitor.AbstractVisitorConfiguration;
-import org.apache.commons.meiyo.classvisitor.AnnotationHandler;
-import org.apache.commons.meiyo.classvisitor.MeiyoVisitor;
-import org.testng.annotations.BeforeClass;
-import org.testng.annotations.Test;
+import org.junit.Before;
+import org.junit.Test;
 
 /**
  * FILL ME.
@@ -40,7 +37,7 @@ public final class ClassVisitorTestCase
 
     private boolean foundMethodAnnotation = false;
 
-    @BeforeClass
+    @Before
     public void setUp()
     {
         MeiyoVisitor.createVisitor( new AbstractVisitorConfiguration()



Mime
View raw message