commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From scolebou...@apache.org
Subject cvs commit: jakarta-commons-sandbox/lang/src/test/org/apache/commons/lang ObjectsTest.java NumberRangeTest.java LangTestSuite.java StringsSubstringTest.java NumbersTest.java CharSetTest.java RandomStringsTest.java StringsEqualsIndexOfTest.java SerializationTest.java StringsTrimEmptyTest.java StringsTest.java
Date Mon, 08 Jul 2002 21:48:30 GMT
scolebourne    2002/07/08 14:48:30

  Modified:    lang/src/test/org/apache/commons/lang ObjectsTest.java
                        NumberRangeTest.java LangTestSuite.java
                        StringsSubstringTest.java NumbersTest.java
                        CharSetTest.java RandomStringsTest.java
                        StringsEqualsIndexOfTest.java
                        SerializationTest.java StringsTrimEmptyTest.java
                        StringsTest.java
  Log:
  Update test suite methods to be consistent
  Update test suite methods to each have a name
  from Ringo de Smet
  
  Revision  Changes    Path
  1.6       +7 -2      jakarta-commons-sandbox/lang/src/test/org/apache/commons/lang/ObjectsTest.java
  
  Index: ObjectsTest.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/lang/src/test/org/apache/commons/lang/ObjectsTest.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- ObjectsTest.java	5 Jul 2002 07:03:39 -0000	1.5
  +++ ObjectsTest.java	8 Jul 2002 21:48:29 -0000	1.6
  @@ -54,6 +54,7 @@
    * <http://www.apache.org/>.
    */
   
  +import junit.framework.Test;
   import junit.framework.TestCase;
   import junit.framework.TestSuite;
   import junit.textui.TestRunner;
  @@ -62,6 +63,8 @@
    *
    * @author <a href="mailto:jmcnally@collab.net">John McNally</a>
    * @author <a href="mailto:scolebourne@joda.org">Stephen Colebourne</a>
  + * @author <a href="mailto:ringo.desmet@mediagenix.com">Ringo Desmet</a>
  + * @version $Id$
    */
   public class ObjectsTest extends TestCase
   {
  @@ -78,9 +81,11 @@
           TestRunner.run(suite());
       }
   
  -    public static TestSuite suite() 
  +    public static Test suite() 
       {
  -        return new TestSuite(ObjectsTest.class);
  +    	TestSuite suite = new TestSuite(ObjectsTest.class);
  +    	suite.setName("Objects Tests");
  +        return suite;
       }
   
       protected void setUp() throws Exception 
  
  
  
  1.3       +4 -6      jakarta-commons-sandbox/lang/src/test/org/apache/commons/lang/NumberRangeTest.java
  
  Index: NumberRangeTest.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/lang/src/test/org/apache/commons/lang/NumberRangeTest.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- NumberRangeTest.java	5 Jul 2002 07:03:39 -0000	1.2
  +++ NumberRangeTest.java	8 Jul 2002 21:48:30 -0000	1.3
  @@ -63,6 +63,7 @@
    * Test cases for the {@link NumberRange} class.
    *
    * @author <a href="mailto:chrise@esha.com">Christopher Elkins</a>
  + * @author <a href="mailto:ringo.desmet@mediagenix.com">Ringo Desmet</a>
    * @version $Revision$ $Date$
    */
   
  @@ -94,11 +95,8 @@
   
   
       public static Test suite() {
  -        TestSuite suite = new TestSuite();
  -        suite.addTest(new NumberRangeTest("testEquals"));
  -        suite.addTest(new NumberRangeTest("testIncludesNumber"));
  -        suite.addTest(new NumberRangeTest("testIncludesRange"));
  -        suite.addTest(new NumberRangeTest("testToString"));
  +        TestSuite suite = new TestSuite(NumberRangeTest.class);
  +        suite.setName("NumberRange Tests");
           return suite;
       }
   
  
  
  
  1.3       +4 -1      jakarta-commons-sandbox/lang/src/test/org/apache/commons/lang/LangTestSuite.java
  
  Index: LangTestSuite.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/lang/src/test/org/apache/commons/lang/LangTestSuite.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- LangTestSuite.java	4 Jul 2002 19:24:10 -0000	1.2
  +++ LangTestSuite.java	8 Jul 2002 21:48:30 -0000	1.3
  @@ -61,6 +61,7 @@
    * Test suite for the Lang package.
    *
    * @author <a href="mailto:scolebourne@joda.org">Stephen Colebourne</a>
  + * @author <a href="mailto:ringo.desmet@mediagenix.com">Ringo Desmet</a>
    * @version $Id$
    */
   public class LangTestSuite extends TestCase {
  @@ -84,6 +85,8 @@
        */
       public static Test suite() {
           TestSuite suite = new TestSuite();
  +        suite.setName("Commons-Lang Tests");
  +        suite.addTest(CharSetTest.suite());
           suite.addTest(NumberRangeTest.suite());
           suite.addTest(NumbersTest.suite());
           suite.addTest(ObjectsTest.suite());
  
  
  
  1.2       +8 -3      jakarta-commons-sandbox/lang/src/test/org/apache/commons/lang/StringsSubstringTest.java
  
  Index: StringsSubstringTest.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/lang/src/test/org/apache/commons/lang/StringsSubstringTest.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- StringsSubstringTest.java	2 Jul 2002 22:03:29 -0000	1.1
  +++ StringsSubstringTest.java	8 Jul 2002 21:48:30 -0000	1.2
  @@ -53,13 +53,16 @@
    */
   package org.apache.commons.lang;
   
  +import junit.framework.Test;
   import junit.framework.TestCase;
   import junit.framework.TestSuite;
   import junit.textui.TestRunner;
  +
   /**
    * Unit tests {@link org.apache.commons.lang.Strings} - Substring methods
    *
    * @author <a href="mailto:scolebourne@joda.org">Stephen Colebourne</a>
  + * @author <a href="mailto:ringo.desmet@mediagenix.com">Ringo Desmet</a>
    * @version $Id$
    */
   public class StringsSubstringTest extends TestCase {
  @@ -77,8 +80,10 @@
           TestRunner.run(suite());
       }
   
  -    public static TestSuite suite() {
  -        return new TestSuite(StringsSubstringTest.class);
  +    public static Test suite() {
  +    	TestSuite suite = new TestSuite(StringsSubstringTest.class);
  +    	suite.setName("StringsSubstring Tests");
  +        return suite;
       }
   
       protected void setUp() throws Exception {
  
  
  
  1.4       +4 -8      jakarta-commons-sandbox/lang/src/test/org/apache/commons/lang/NumbersTest.java
  
  Index: NumbersTest.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/lang/src/test/org/apache/commons/lang/NumbersTest.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- NumbersTest.java	5 Jul 2002 07:03:39 -0000	1.3
  +++ NumbersTest.java	8 Jul 2002 21:48:30 -0000	1.4
  @@ -65,6 +65,7 @@
    * Unit tests {@link org.apache.commons.lang.Numbers}.
    *
    * @author <a href="mailto:rand_mcneely@yahoo.com">Rand McNeely</a>
  + * @author <a href="mailto:ringo.desmet@mediagenix.com">Ringo Desmet</a>
    * @version $Id$
    */
   public class NumbersTest extends TestCase {
  @@ -93,13 +94,8 @@
       }
   
   	public static Test suite() {
  -		TestSuite suite = new TestSuite();
  -		Method m[] = NumbersTest.class.getDeclaredMethods();
  -		for (int i = 0; i < m.length; i++) {
  -			if (m[i].getName().startsWith("test")) {
  -				suite.addTest(new NumbersTest(m[i].getName()));
  -			}
  -		}
  +		TestSuite suite = new TestSuite(NumbersTest.class);
  +		suite.setName("Numbers Tests");
   		return suite;
   	}
   
  
  
  
  1.2       +6 -3      jakarta-commons-sandbox/lang/src/test/org/apache/commons/lang/CharSetTest.java
  
  Index: CharSetTest.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/lang/src/test/org/apache/commons/lang/CharSetTest.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- CharSetTest.java	5 Jul 2002 06:58:35 -0000	1.1
  +++ CharSetTest.java	8 Jul 2002 21:48:30 -0000	1.2
  @@ -64,6 +64,7 @@
    * Unit tests {@link org.apache.commons.lang.CharSet}.
    *
    * @author <a href="mailto:bayard@generationjava.com">Henri Yandell</a>
  + * @author <a href="mailto:ringo.desmet@mediagenix.com">Ringo Desmet</a>
    * @version $Id$
    */
   public class CharSetTest extends TestCase
  @@ -76,8 +77,10 @@
           TestRunner.run(suite());
       }
   
  -    public static TestSuite suite() {
  -        return new TestSuite(CharSetTest.class);
  +    public static Test suite() {
  +    	TestSuite suite = new TestSuite(CharSetTest.class);
  +    	suite.setName("CharSet Tests");
  +        return suite;
       }
   
       protected void setUp() throws Exception {
  
  
  
  1.2       +5 -2      jakarta-commons-sandbox/lang/src/test/org/apache/commons/lang/RandomStringsTest.java
  
  Index: RandomStringsTest.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/lang/src/test/org/apache/commons/lang/RandomStringsTest.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- RandomStringsTest.java	2 Jul 2002 00:18:46 -0000	1.1
  +++ RandomStringsTest.java	8 Jul 2002 21:48:30 -0000	1.2
  @@ -60,6 +60,7 @@
    * Unit tests {@link org.apache.commons.lang.RandomStrings}.
    *
    * @author <a href="mailto:steven@caswell.name">Steven Caswell</a>
  + * @author <a href="mailto:ringo.desmet@mediagenix.com">Ringo Desmet</a>
    * @version $Id$
    */
   public class RandomStringsTest extends junit.framework.TestCase {
  @@ -71,7 +72,9 @@
       }
   
       public static Test suite() {
  -        return new TestSuite(RandomStringsTest.class);
  +    	TestSuite suite = new TestSuite(RandomStringsTest.class);
  +    	suite.setName("RandomStrings Tests");
  +        return suite;
       }
       
       /**
  
  
  
  1.2       +8 -3      jakarta-commons-sandbox/lang/src/test/org/apache/commons/lang/StringsEqualsIndexOfTest.java
  
  Index: StringsEqualsIndexOfTest.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/lang/src/test/org/apache/commons/lang/StringsEqualsIndexOfTest.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- StringsEqualsIndexOfTest.java	2 Jul 2002 22:03:29 -0000	1.1
  +++ StringsEqualsIndexOfTest.java	8 Jul 2002 21:48:30 -0000	1.2
  @@ -53,13 +53,16 @@
    */
   package org.apache.commons.lang;
   
  +import junit.framework.Test;
   import junit.framework.TestCase;
   import junit.framework.TestSuite;
   import junit.textui.TestRunner;
  +
   /**
    * Unit tests {@link org.apache.commons.lang.Strings} - Substring methods
    *
    * @author <a href="mailto:scolebourne@joda.org">Stephen Colebourne</a>
  + * @author <a href="mailto:ringo.desmet@mediagenix.com">Ringo Desmet</a>
    * @version $Id$
    */
   public class StringsEqualsIndexOfTest extends TestCase {
  @@ -76,8 +79,10 @@
           TestRunner.run(suite());
       }
   
  -    public static TestSuite suite() {
  -        return new TestSuite(StringsEqualsIndexOfTest.class);
  +    public static Test suite() {
  +    	TestSuite suite = new TestSuite(StringsEqualsIndexOfTest.class);
  +    	suite.setName("StringsEqualsIndexOf Tests");
  +        return suite;
       }
   
       protected void setUp() throws Exception {
  
  
  
  1.3       +6 -2      jakarta-commons-sandbox/lang/src/test/org/apache/commons/lang/SerializationTest.java
  
  Index: SerializationTest.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/lang/src/test/org/apache/commons/lang/SerializationTest.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- SerializationTest.java	5 Jul 2002 07:03:39 -0000	1.2
  +++ SerializationTest.java	8 Jul 2002 21:48:30 -0000	1.3
  @@ -69,6 +69,8 @@
    * Unit tests {@link org.apache.commons.lang.Serialization}.
    *
    * @author <a href="mailto:scolebourne@joda.org">Stephen Colebourne</a>
  + * @author <a href="mailto:ringo.desmet@mediagenix.com">Ringo Desmet</a>
  + * @version $Id$
    */
   public class SerializationTest extends TestCase {
       private String iString;
  @@ -83,8 +85,10 @@
           TestRunner.run(suite());
       }
   
  -    public static TestSuite suite() {
  -        return new TestSuite(SerializationTest.class);
  +    public static Test suite() {
  +    	TestSuite suite = new TestSuite(SerializationTest.class);
  +    	suite.setName("Serialization Tests");
  +        return suite;
       }
   
       protected void setUp() throws Exception {
  
  
  
  1.2       +8 -3      jakarta-commons-sandbox/lang/src/test/org/apache/commons/lang/StringsTrimEmptyTest.java
  
  Index: StringsTrimEmptyTest.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/lang/src/test/org/apache/commons/lang/StringsTrimEmptyTest.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- StringsTrimEmptyTest.java	2 Jul 2002 22:03:29 -0000	1.1
  +++ StringsTrimEmptyTest.java	8 Jul 2002 21:48:30 -0000	1.2
  @@ -53,13 +53,16 @@
    */
   package org.apache.commons.lang;
   
  +import junit.framework.Test;
   import junit.framework.TestCase;
   import junit.framework.TestSuite;
   import junit.textui.TestRunner;
  +
   /**
    * Unit tests {@link org.apache.commons.lang.Strings} - Trim/Empty methods
    *
    * @author <a href="mailto:scolebourne@joda.org">Stephen Colebourne</a>
  + * @author <a href="mailto:ringo.desmet@mediagenix.com">Ringo Desmet</a>
    * @version $Id$
    */
   public class StringsTrimEmptyTest extends TestCase {
  @@ -73,8 +76,10 @@
           TestRunner.run(suite());
       }
   
  -    public static TestSuite suite() {
  -        return new TestSuite(StringsTrimEmptyTest.class);
  +    public static Test suite() {
  +    	TestSuite suite = new TestSuite(StringsTrimEmptyTest.class);
  +    	suite.setName("StringsTrimEmpty Tests");
  +        return suite;
       }
   
       protected void setUp() throws Exception {
  
  
  
  1.9       +6 -3      jakarta-commons-sandbox/lang/src/test/org/apache/commons/lang/StringsTest.java
  
  Index: StringsTest.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/lang/src/test/org/apache/commons/lang/StringsTest.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- StringsTest.java	5 Jul 2002 18:54:26 -0000	1.8
  +++ StringsTest.java	8 Jul 2002 21:48:30 -0000	1.9
  @@ -66,6 +66,7 @@
    * @author <a href="mailto:dlr@collab.net">Daniel Rall</a>
    * @author <a href="mailto:bayard@generationjava.com">Henri Yandell</a>
    * @author <a href="mailto:scolebourne@joda.org">Stephen Colebourne</a>
  + * @author <a href="mailto:ringo.desmet@mediagenix.com">Ringo Desmet</a>
    * @version $Id$
    */
   public class StringsTest extends TestCase
  @@ -90,8 +91,10 @@
           TestRunner.run(suite());
       }
   
  -    public static TestSuite suite() {
  -        return new TestSuite(StringsTest.class);
  +    public static Test suite() {
  +    	TestSuite suite = new TestSuite(StringsTest.class);
  +    	suite.setName("StringsTest Tests");
  +        return suite;
       }
   
       protected void setUp() throws Exception {
  
  
  

--
To unsubscribe, e-mail:   <mailto:commons-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:commons-dev-help@jakarta.apache.org>


Mime
View raw message