junit.framework.TestCaseorg.junit.Test



Project SpringSource/spring-framework in file ...aspectj.autoproxy.AtAspectJAfterThrowingTests.java (2008-12-11)
@@ -16,7 +16,9 @@
 
 package org.springframework.aop.aspectj.autoproxy;
 
-import junit.framework.TestCase;
+import static org.junit.Assert.*;
+
+import org.junit.Test;
 import org.springframework.beans.ITestBean;
 import org.springframework.aop.support.AopUtils;
 import org.springframework.context.support.ClassPathXmlApplicationContext;
@@ -27,8 +29,9 @@ import java.io.IOException;
  * @author Rob Harrop
  * @since 2.0
  */
-public class AtAspectJAfterThrowingTests extends TestCase {
+public class AtAspectJAfterThrowingTests {
 
+    @Test
 	public void testAccessThrowable() throws Exception {
 		ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext("afterThrowingAdviceTests.xml", getClass());
 
Project SpringSource/spring-framework in file ...pringframework.aop.config.PrototypeProxyTests.java (2008-12-12)
@@ -16,15 +16,15 @@
 
 package org.springframework.aop.config;
 
-import junit.framework.TestCase;
-
+import org.junit.Test;
 import org.springframework.context.support.ClassPathXmlApplicationContext;
 
 /**
  * @author Juergen Hoeller
  */
-public class PrototypeProxyTests extends TestCase {
+public class PrototypeProxyTests {
 
+    @Test
 	public void testInjectionBeforeWrappingCheckDoesNotKickInForPrototypeProxy() {
 		new ClassPathXmlApplicationContext("prototypeProxy.xml", getClass());
 	}
Project cloudera/flume in file ...10/src.javaperf.com.cloudera.flume.PerfDiskIO.java (2010-10-24)
@@ -20,7 +20,7 @@ package com.cloudera.flume;
 import java.io.File;
 import java.io.IOException;
 
-import junit.framework.TestCase;
+import org.junit.Test;
 
 import com.cloudera.flume.core.EventUtil;
 import com.cloudera.flume.handlers.debug.Log4jTextFileSource;
@@ -34,8 +34,9 @@ import com.cloudera.util.Benchmark;
  * This performance test tests the throughput of various disk reading and
  * writing sources and sinks.
  */
-public class PerfDiskIO extends TestCase implements ExamplePerfData {
+public class PerfDiskIO implements ExamplePerfData {
 
+  @Test
   public void testWrite() throws IOException {
     Benchmark b = new Benchmark("seqfile write");
     b.mark("begin");
@@ -76,6 +77,7 @@ public class PerfDiskIO extends TestCase implements ExamplePerfData {
     b2.done();
   }
 
+  @Test
   public void testReadFormat() throws IOException {
     Benchmark b = new Benchmark("log4j format read");
     b.mark("begin");
Project cloudera/flume in file ...10/src.javaperf.com.cloudera.flume.PerfHdfsIO.java (2010-10-24)
@@ -20,12 +20,11 @@ package com.cloudera.flume;
 import java.io.File;
 import java.io.IOException;
 
-import junit.framework.TestCase;
-
 import org.apache.hadoop.fs.FileSystem;
 import org.apache.hadoop.fs.Path;
 import org.apache.hadoop.io.SequenceFile;
 import org.apache.hadoop.io.SequenceFile.Writer;
+import org.junit.Test;
 
 import com.cloudera.flume.conf.FlumeConfiguration;
 import com.cloudera.flume.core.Event;
@@ -37,8 +36,9 @@ import com.cloudera.flume.handlers.hdfs.WriteableEvent;
 import com.cloudera.flume.handlers.hdfs.WriteableEventKey;
 import com.cloudera.util.Benchmark;
 
-public class PerfHdfsIO extends TestCase implements ExamplePerfData {
+public class PerfHdfsIO implements ExamplePerfData {
 
+  @Test
   public void testCopy() throws IOException {
 
     Benchmark b = new Benchmark("hdfs seqfile copy");
@@ -77,6 +77,7 @@ public class PerfHdfsIO extends TestCase implements ExamplePerfData {
     b.done();
   }
 
+  @Test
   public void testDirectWrite() throws IOException {
 
     Benchmark b = new Benchmark("hdfs seqfile write");
Project cloudera/flume in file ...javaperf.com.cloudera.flume.PerfSyslogFormats.java (2010-10-24)
@@ -19,7 +19,7 @@ package com.cloudera.flume;
 
 import java.io.IOException;
 
-import junit.framework.TestCase;
+import org.junit.Test;
 
 import com.cloudera.flume.core.Event;
 import com.cloudera.flume.core.EventUtil;
@@ -35,8 +35,9 @@ import com.cloudera.util.Benchmark;
  * Performance testing for the throughput of syslog and apache log format
  * parsing.
  */
-public class PerfSyslogFormats extends TestCase implements ExamplePerfData {
+public class PerfSyslogFormats implements ExamplePerfData {
 
+  @Test
   public void testSyslogFormat() throws IOException, EventExtractException {
     Benchmark b = new Benchmark("Syslog format + nullsink");
     b.mark("begin");