commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bay...@apache.org
Subject svn commit: r631847 - in /commons/sandbox/csv/trunk/src/test/org/apache/commons/csv: CSVParserTest.java CSVPrinterTest.java CSVStrategyTest.java ExtendedBufferedReaderTest.java
Date Thu, 28 Feb 2008 04:59:17 GMT
Author: bayard
Date: Wed Feb 27 20:59:16 2008
New Revision: 631847

URL: http://svn.apache.org/viewvc?rev=631847&view=rev
Log:
Removing unnecessary suite() methods, object attributes and constructors

Modified:
    commons/sandbox/csv/trunk/src/test/org/apache/commons/csv/CSVParserTest.java
    commons/sandbox/csv/trunk/src/test/org/apache/commons/csv/CSVPrinterTest.java
    commons/sandbox/csv/trunk/src/test/org/apache/commons/csv/CSVStrategyTest.java
    commons/sandbox/csv/trunk/src/test/org/apache/commons/csv/ExtendedBufferedReaderTest.java

Modified: commons/sandbox/csv/trunk/src/test/org/apache/commons/csv/CSVParserTest.java
URL: http://svn.apache.org/viewvc/commons/sandbox/csv/trunk/src/test/org/apache/commons/csv/CSVParserTest.java?rev=631847&r1=631846&r2=631847&view=diff
==============================================================================
--- commons/sandbox/csv/trunk/src/test/org/apache/commons/csv/CSVParserTest.java (original)
+++ commons/sandbox/csv/trunk/src/test/org/apache/commons/csv/CSVParserTest.java Wed Feb 27
20:59:16 2008
@@ -59,23 +59,6 @@
     }
   }
   
-  /**
-   * Constructor for JUnit.
-   * @param name Name to be used in JUnit Test Environment
-   */
-  public CSVParserTest(String name) {
-    super(name);
-  }
-
-  /**
-   * Returns a Test suite for JUnit.
-   * @return Test suite for JUnit
-   */
-  public static Test suite() {
-    return new TestSuite(CSVParserTest.class);
-  }
-
-
   // ======================================================
   //   lexer tests
   // ======================================================

Modified: commons/sandbox/csv/trunk/src/test/org/apache/commons/csv/CSVPrinterTest.java
URL: http://svn.apache.org/viewvc/commons/sandbox/csv/trunk/src/test/org/apache/commons/csv/CSVPrinterTest.java?rev=631847&r1=631846&r2=631847&view=diff
==============================================================================
--- commons/sandbox/csv/trunk/src/test/org/apache/commons/csv/CSVPrinterTest.java (original)
+++ commons/sandbox/csv/trunk/src/test/org/apache/commons/csv/CSVPrinterTest.java Wed Feb
27 20:59:16 2008
@@ -26,19 +26,7 @@
  */
 public class CSVPrinterTest extends TestCase {
   
-  String lineSeparator = null;
-  
-  /**
-   * Constructor for CSVPrinterTest.
-   */
-  public CSVPrinterTest(String name) {
-    super(name);
-    this.lineSeparator = System.getProperty("line.separator");
-  }
-
-  public static Test suite() {
-    return new TestSuite(CSVPrinterTest.class);
-  }
+  String lineSeparator = System.getProperty("line.separator");
 
   public void testPrinter1() {
     StringWriter sw = new StringWriter();

Modified: commons/sandbox/csv/trunk/src/test/org/apache/commons/csv/CSVStrategyTest.java
URL: http://svn.apache.org/viewvc/commons/sandbox/csv/trunk/src/test/org/apache/commons/csv/CSVStrategyTest.java?rev=631847&r1=631846&r2=631847&view=diff
==============================================================================
--- commons/sandbox/csv/trunk/src/test/org/apache/commons/csv/CSVStrategyTest.java (original)
+++ commons/sandbox/csv/trunk/src/test/org/apache/commons/csv/CSVStrategyTest.java Wed Feb
27 20:59:16 2008
@@ -32,23 +32,6 @@
  * has problems...).
  */
 public class CSVStrategyTest extends TestCase {
-  
-  /**
-   * Constructor for JUnit.
-   * @param name Name to be used in JUnit Test Environment
-   */
-  public CSVStrategyTest(String name) {
-    super(name);
-  }
-
-  /**
-   * Returns a Test suite for JUnit.
-   * @return Test suite for JUnit
-   */
-  public static Test suite() {
-    return new TestSuite(CSVStrategyTest.class);
-  }
-
 
   // ======================================================
   //   getters / setters

Modified: commons/sandbox/csv/trunk/src/test/org/apache/commons/csv/ExtendedBufferedReaderTest.java
URL: http://svn.apache.org/viewvc/commons/sandbox/csv/trunk/src/test/org/apache/commons/csv/ExtendedBufferedReaderTest.java?rev=631847&r1=631846&r2=631847&view=diff
==============================================================================
--- commons/sandbox/csv/trunk/src/test/org/apache/commons/csv/ExtendedBufferedReaderTest.java
(original)
+++ commons/sandbox/csv/trunk/src/test/org/apache/commons/csv/ExtendedBufferedReaderTest.java
Wed Feb 27 20:59:16 2008
@@ -29,33 +29,19 @@
  */
 public class ExtendedBufferedReaderTest extends TestCase {
 
-  private ExtendedBufferedReader br = null;
-  
-  /**
-   * Constructor for ExtendedBufferedReaderTest.
-   * @param arg0
-   */
-  public ExtendedBufferedReaderTest(String arg0) {
-    super(arg0);
-  }
-
-  public static Test suite() {
-    return new TestSuite(ExtendedBufferedReaderTest.class);
-  }
-  
   // ======================================================
   //   the test cases
   // ======================================================
  
   public void testConstructors() {
-    br = new ExtendedBufferedReader(new StringReader(""));
+    ExtendedBufferedReader br = new ExtendedBufferedReader(new StringReader(""));
     br = new ExtendedBufferedReader(new StringReader(""), 10); 
   }
   
   public void testReadLookahead1() throws Exception {
    
     assertEquals(ExtendedBufferedReader.END_OF_STREAM, getEBR("").read());
-    br = getEBR("1\n2\r3\n");
+    ExtendedBufferedReader br = getEBR("1\n2\r3\n");
     assertEquals('1', br.lookAhead());
     assertEquals(ExtendedBufferedReader.UNDEFINED, br.readAgain());
     assertEquals('1', br.read());
@@ -109,7 +95,7 @@
     char[] ref = new char[5];
     char[] res = new char[5];  
     
-    br = getEBR("");
+    ExtendedBufferedReader br = getEBR("");
     assertEquals(0, br.read(res, 0, 0));
     assertTrue(Arrays.equals(res, ref)); 
     
@@ -134,7 +120,7 @@
   }
   
   public void testReadLine() throws Exception {
-    br = getEBR("");
+    ExtendedBufferedReader br = getEBR("");
     assertTrue(br.readLine() == null);
     
     br = getEBR("\n");
@@ -177,7 +163,7 @@
   
   public void testSkip0() throws Exception {
     
-    br = getEBR("");
+    ExtendedBufferedReader br = getEBR("");
     assertEquals(0, br.skip(0));
     assertEquals(0, br.skip(1));
     
@@ -203,7 +189,7 @@
   }
   
   public void testSkipUntil() throws Exception {   
-    br = getEBR("");
+    ExtendedBufferedReader br = getEBR("");
     assertEquals(0, br.skipUntil(';'));
     br = getEBR("ABCDEF,GHL,,MN");
     assertEquals(6, br.skipUntil(','));
@@ -217,7 +203,7 @@
   }
   
   public void testReadUntil() throws Exception {
-    br = getEBR("");
+    ExtendedBufferedReader br = getEBR("");
     assertTrue(br.readUntil(';').equals(""));
     br = getEBR("ABCDEF;GHL;;MN");
     assertTrue(br.readUntil(';').equals("ABCDEF"));



Mime
View raw message