From a7bbdfb54b6d390f852c478d3d7c1e552554fd78 Mon Sep 17 00:00:00 2001 From: Sebastian Bazley Date: Fri, 18 Dec 2009 03:39:13 +0000 Subject: [PATCH] Remove unnecessary main() and suite() methods from tests Also remove setUp() and tearDown() methods with no useful code. git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@892118 13f79535-47bb-0310-9956-ffa450edef68 --- .../commons/lang3/ArrayUtilsRemoveTest.java | 12 ------- .../apache/commons/lang3/ArrayUtilsTest.java | 23 ------------- .../apache/commons/lang3/BitFieldTest.java | 13 -------- .../commons/lang3/BooleanUtilsTest.java | 23 ------------- .../commons/lang3/CharEncodingTest.java | 13 -------- .../apache/commons/lang3/CharRangeTest.java | 23 ------------- .../org/apache/commons/lang3/CharSetTest.java | 23 ------------- .../commons/lang3/CharSetUtilsTest.java | 23 ------------- .../apache/commons/lang3/CharUtilsTest.java | 23 ------------- .../apache/commons/lang3/ClassUtilsTest.java | 23 ------------- .../apache/commons/lang3/EnumUtilsTest.java | 8 ----- .../apache/commons/lang3/LocaleUtilsTest.java | 21 ------------ .../apache/commons/lang3/ObjectUtilsTest.java | 23 ------------- .../commons/lang3/RandomStringUtilsTest.java | 28 ---------------- .../commons/lang3/SerializationUtilsTest.java | 18 ---------- .../commons/lang3/StringEscapeUtilsTest.java | 13 -------- .../lang3/StringUtilsEqualsIndexOfTest.java | 23 ------------- .../commons/lang3/StringUtilsIsTest.java | 23 ------------- .../lang3/StringUtilsStartsEndsWithTest.java | 23 ------------- .../lang3/StringUtilsSubstringTest.java | 23 ------------- .../apache/commons/lang3/StringUtilsTest.java | 23 ------------- .../lang3/StringUtilsTrimEmptyTest.java | 23 ------------- .../apache/commons/lang3/SystemUtilsTest.java | 22 ------------- .../apache/commons/lang3/ValidateTest.java | 24 +------------- .../apache/commons/lang3/WordUtilsTest.java | 8 ----- .../lang3/builder/CompareToBuilderTest.java | 26 ++------------- .../builder/DefaultToStringStyleTest.java | 17 ++-------- .../lang3/builder/EqualsBuilderTest.java | 23 ------------- .../HashCodeBuilderAndEqualsBuilderTest.java | 23 ------------- .../lang3/builder/HashCodeBuilderTest.java | 23 ------------- .../builder/MultiLineToStringStyleTest.java | 13 -------- .../NoFieldNamesToStringStyleTest.java | 17 ++-------- .../builder/SimpleToStringStyleTest.java | 17 ++-------- .../builder/StandardToStringStyleTest.java | 17 ++-------- .../lang3/builder/ToStringBuilderTest.java | 23 ------------- .../lang3/builder/ToStringStyleTest.java | 18 ---------- .../lang3/exception/ExceptionUtilsTest.java | 6 ---- .../commons/lang3/math/FractionTest.java | 12 ------- .../commons/lang3/math/NumberUtilsTest.java | 13 -------- .../lang3/mutable/MutableBooleanTest.java | 11 ------- .../lang3/mutable/MutableByteTest.java | 11 ------- .../lang3/mutable/MutableDoubleTest.java | 11 ------- .../lang3/mutable/MutableFloatTest.java | 11 ------- .../commons/lang3/mutable/MutableIntTest.java | 11 ------- .../lang3/mutable/MutableLongTest.java | 11 ------- .../lang3/mutable/MutableObjectTest.java | 11 ------- .../lang3/mutable/MutableShortTest.java | 11 ------- .../lang3/reflect/ConstructorUtilsTest.java | 12 ------- .../commons/lang3/reflect/FieldUtilsTest.java | 16 ++------- .../lang3/reflect/MethodUtilsTest.java | 12 ------- .../lang3/text/CompositeFormatTest.java | 23 ------------- .../lang3/text/ExtendedMessageFormatTest.java | 22 ++----------- .../text/StrBuilderAppendInsertTest.java | 23 ------------- .../commons/lang3/text/StrBuilderTest.java | 23 ------------- .../commons/lang3/text/StrLookupTest.java | 33 ------------------- .../commons/lang3/text/StrMatcherTest.java | 23 ------------- .../lang3/text/StrSubstitutorTest.java | 23 ------------- .../commons/lang3/text/StrTokenizerTest.java | 13 -------- .../lang3/time/DateFormatUtilsTest.java | 13 -------- .../lang3/time/DateUtilsFragmentTest.java | 8 ----- .../lang3/time/DateUtilsRoundingTest.java | 8 ----- .../commons/lang3/time/DateUtilsTest.java | 18 ---------- .../lang3/time/DurationFormatUtilsTest.java | 13 -------- .../lang3/time/FastDateFormatTest.java | 24 -------------- .../commons/lang3/time/StopWatchTest.java | 13 -------- 65 files changed, 15 insertions(+), 1143 deletions(-) diff --git a/src/test/org/apache/commons/lang3/ArrayUtilsRemoveTest.java b/src/test/org/apache/commons/lang3/ArrayUtilsRemoveTest.java index 2833fb8aa..ecb8a075c 100644 --- a/src/test/org/apache/commons/lang3/ArrayUtilsRemoveTest.java +++ b/src/test/org/apache/commons/lang3/ArrayUtilsRemoveTest.java @@ -19,10 +19,7 @@ package org.apache.commons.lang3; import java.util.Arrays; -import junit.framework.Test; import junit.framework.TestCase; -import junit.framework.TestSuite; -import junit.textui.TestRunner; /** * Tests ArrayUtils remove and removeElement methods. @@ -31,15 +28,6 @@ import junit.textui.TestRunner; * @version $Id$ */ public class ArrayUtilsRemoveTest extends TestCase { - public static void main(String[] args) { - TestRunner.run(suite()); - } - - public static Test suite() { - TestSuite suite = new TestSuite(ArrayUtilsRemoveTest.class); - suite.setName("ArrayUtils remove Tests"); - return suite; - } public void testRemoveObjectArray() { Object[] array; diff --git a/src/test/org/apache/commons/lang3/ArrayUtilsTest.java b/src/test/org/apache/commons/lang3/ArrayUtilsTest.java index b3b8ea2ea..62b3b6f2a 100644 --- a/src/test/org/apache/commons/lang3/ArrayUtilsTest.java +++ b/src/test/org/apache/commons/lang3/ArrayUtilsTest.java @@ -22,10 +22,7 @@ import java.util.Arrays; import java.util.Date; import java.util.Map; -import junit.framework.Test; import junit.framework.TestCase; -import junit.framework.TestSuite; -import junit.textui.TestRunner; /** * Unit tests {@link org.apache.commons.lang3.ArrayUtils}. @@ -47,26 +44,6 @@ public class ArrayUtilsTest extends TestCase { super(name); } - public static void main(String[] args) { - TestRunner.run(suite()); - } - - public static Test suite() { - TestSuite suite = new TestSuite(ArrayUtilsTest.class); - suite.setName("ArrayUtils Tests"); - return suite; - } - - @Override - protected void setUp() throws Exception { - super.setUp(); - } - - @Override - protected void tearDown() throws Exception { - super.tearDown(); - } - //----------------------------------------------------------------------- public void testConstructor() { assertNotNull(new ArrayUtils()); diff --git a/src/test/org/apache/commons/lang3/BitFieldTest.java b/src/test/org/apache/commons/lang3/BitFieldTest.java index 135aa1849..bfba7be59 100644 --- a/src/test/org/apache/commons/lang3/BitFieldTest.java +++ b/src/test/org/apache/commons/lang3/BitFieldTest.java @@ -16,10 +16,7 @@ */ package org.apache.commons.lang3; -import junit.framework.Test; import junit.framework.TestCase; -import junit.framework.TestSuite; -import junit.textui.TestRunner; /** * Class to test BitField functionality @@ -31,16 +28,6 @@ import junit.textui.TestRunner; */ public class BitFieldTest extends TestCase { - public static void main(String[] args) { - TestRunner.run(suite()); - } - - public static Test suite() { - TestSuite suite = new TestSuite(BitFieldTest.class); - suite.setName("BitField Tests"); - return suite; - } - private static final BitField bf_multi = new BitField(0x3F80); private static final BitField bf_single = new BitField(0x4000); private static final BitField bf_zero = new BitField(0); diff --git a/src/test/org/apache/commons/lang3/BooleanUtilsTest.java b/src/test/org/apache/commons/lang3/BooleanUtilsTest.java index a8462f3e7..4f0449d5c 100644 --- a/src/test/org/apache/commons/lang3/BooleanUtilsTest.java +++ b/src/test/org/apache/commons/lang3/BooleanUtilsTest.java @@ -19,10 +19,7 @@ package org.apache.commons.lang3; import java.lang.reflect.Constructor; import java.lang.reflect.Modifier; -import junit.framework.Test; import junit.framework.TestCase; -import junit.framework.TestSuite; -import junit.textui.TestRunner; /** * Unit tests {@link org.apache.commons.lang3.BooleanUtils}. @@ -37,26 +34,6 @@ public class BooleanUtilsTest extends TestCase { super(name); } - public static void main(String[] args) { - TestRunner.run(suite()); - } - - public static Test suite() { - TestSuite suite = new TestSuite(BooleanUtilsTest.class); - suite.setName("BooleanUtils Tests"); - return suite; - } - - @Override - protected void setUp() throws Exception { - super.setUp(); - } - - @Override - protected void tearDown() throws Exception { - super.tearDown(); - } - //----------------------------------------------------------------------- public void testConstructor() { assertNotNull(new BooleanUtils()); diff --git a/src/test/org/apache/commons/lang3/CharEncodingTest.java b/src/test/org/apache/commons/lang3/CharEncodingTest.java index 91cbb945c..b0ca6ca3f 100644 --- a/src/test/org/apache/commons/lang3/CharEncodingTest.java +++ b/src/test/org/apache/commons/lang3/CharEncodingTest.java @@ -17,10 +17,7 @@ package org.apache.commons.lang3; -import junit.framework.Test; import junit.framework.TestCase; -import junit.framework.TestSuite; -import junit.textui.TestRunner; /** * Tests CharEncoding. @@ -31,16 +28,6 @@ import junit.textui.TestRunner; */ public class CharEncodingTest extends TestCase { - public static void main(String[] args) { - TestRunner.run(suite()); - } - - public static Test suite() { - TestSuite suite = new TestSuite(CharEncodingTest.class); - suite.setName("CharEncoding Tests"); - return suite; - } - private void assertSupportedEncoding(String name) { assertTrue("Encoding should be supported: " + name, CharEncoding.isSupported(name)); } diff --git a/src/test/org/apache/commons/lang3/CharRangeTest.java b/src/test/org/apache/commons/lang3/CharRangeTest.java index 4a5bfbab7..1bc1cc3f2 100644 --- a/src/test/org/apache/commons/lang3/CharRangeTest.java +++ b/src/test/org/apache/commons/lang3/CharRangeTest.java @@ -20,10 +20,7 @@ package org.apache.commons.lang3; import java.lang.reflect.Modifier; -import junit.framework.Test; import junit.framework.TestCase; -import junit.framework.TestSuite; -import junit.textui.TestRunner; /** * Unit tests {@link org.apache.commons.lang3.CharRange}. @@ -37,26 +34,6 @@ public class CharRangeTest extends TestCase { super(name); } - public static void main(String[] args) { - TestRunner.run(suite()); - } - - public static Test suite() { - TestSuite suite = new TestSuite(CharRangeTest.class); - suite.setName("CharRange Tests"); - return suite; - } - - @Override - protected void setUp() throws Exception { - super.setUp(); - } - - @Override - protected void tearDown() throws Exception { - super.tearDown(); - } - //----------------------------------------------------------------------- public void testClass() { assertEquals(true, Modifier.isPublic(CharRange.class.getModifiers())); diff --git a/src/test/org/apache/commons/lang3/CharSetTest.java b/src/test/org/apache/commons/lang3/CharSetTest.java index 546f74c5b..e52dccae7 100644 --- a/src/test/org/apache/commons/lang3/CharSetTest.java +++ b/src/test/org/apache/commons/lang3/CharSetTest.java @@ -20,10 +20,7 @@ package org.apache.commons.lang3; import java.lang.reflect.Modifier; -import junit.framework.Test; import junit.framework.TestCase; -import junit.framework.TestSuite; -import junit.textui.TestRunner; /** * Unit tests {@link org.apache.commons.lang3.CharSet}. @@ -38,26 +35,6 @@ public class CharSetTest extends TestCase { super(name); } - public static void main(String[] args) { - TestRunner.run(suite()); - } - - public static Test suite() { - TestSuite suite = new TestSuite(CharSetTest.class); - suite.setName("CharSet Tests"); - return suite; - } - - @Override - protected void setUp() throws Exception { - super.setUp(); - } - - @Override - protected void tearDown() throws Exception { - super.tearDown(); - } - //----------------------------------------------------------------------- public void testClass() { assertEquals(true, Modifier.isPublic(CharSet.class.getModifiers())); diff --git a/src/test/org/apache/commons/lang3/CharSetUtilsTest.java b/src/test/org/apache/commons/lang3/CharSetUtilsTest.java index 17e8caf8b..c20208cb0 100644 --- a/src/test/org/apache/commons/lang3/CharSetUtilsTest.java +++ b/src/test/org/apache/commons/lang3/CharSetUtilsTest.java @@ -19,10 +19,7 @@ package org.apache.commons.lang3; import java.lang.reflect.Constructor; import java.lang.reflect.Modifier; -import junit.framework.Test; import junit.framework.TestCase; -import junit.framework.TestSuite; -import junit.textui.TestRunner; /** * Unit tests {@link org.apache.commons.lang3.CharSetUtils}. @@ -38,26 +35,6 @@ public class CharSetUtilsTest extends TestCase { super(name); } - public static void main(String[] args) { - TestRunner.run(suite()); - } - - public static Test suite() { - TestSuite suite = new TestSuite(CharSetUtilsTest.class); - suite.setName("CharSetUtils Tests"); - return suite; - } - - @Override - protected void setUp() throws Exception { - super.setUp(); - } - - @Override - protected void tearDown() throws Exception { - super.tearDown(); - } - //----------------------------------------------------------------------- public void testConstructor() { assertNotNull(new CharSetUtils()); diff --git a/src/test/org/apache/commons/lang3/CharUtilsTest.java b/src/test/org/apache/commons/lang3/CharUtilsTest.java index 1a87e3720..cf86cfe23 100644 --- a/src/test/org/apache/commons/lang3/CharUtilsTest.java +++ b/src/test/org/apache/commons/lang3/CharUtilsTest.java @@ -19,10 +19,7 @@ package org.apache.commons.lang3; import java.lang.reflect.Constructor; import java.lang.reflect.Modifier; -import junit.framework.Test; import junit.framework.TestCase; -import junit.framework.TestSuite; -import junit.textui.TestRunner; /** * Unit tests {@link org.apache.commons.lang3.CharUtils}. @@ -40,26 +37,6 @@ public class CharUtilsTest extends TestCase { super(name); } - public static void main(String[] args) { - TestRunner.run(suite()); - } - - public static Test suite() { - TestSuite suite = new TestSuite(CharUtilsTest.class); - suite.setName("CharUtils Tests"); - return suite; - } - - @Override - protected void setUp() throws Exception { - super.setUp(); - } - - @Override - protected void tearDown() throws Exception { - super.tearDown(); - } - //----------------------------------------------------------------------- public void testConstructor() { assertNotNull(new CharUtils()); diff --git a/src/test/org/apache/commons/lang3/ClassUtilsTest.java b/src/test/org/apache/commons/lang3/ClassUtilsTest.java index cd7ae4532..db5df4e89 100644 --- a/src/test/org/apache/commons/lang3/ClassUtilsTest.java +++ b/src/test/org/apache/commons/lang3/ClassUtilsTest.java @@ -26,10 +26,7 @@ import java.util.List; import java.util.Map; import java.util.Set; -import junit.framework.Test; import junit.framework.TestCase; -import junit.framework.TestSuite; -import junit.textui.TestRunner; @@ -47,26 +44,6 @@ public class ClassUtilsTest extends TestCase { super(name); } - public static void main(String[] args) { - TestRunner.run(suite()); - } - - public static Test suite() { - TestSuite suite = new TestSuite(ClassUtilsTest.class); - suite.setName("ClassUtils Tests"); - return suite; - } - - @Override - protected void setUp() throws Exception { - super.setUp(); - } - - @Override - protected void tearDown() throws Exception { - super.tearDown(); - } - private static class Inner { } diff --git a/src/test/org/apache/commons/lang3/EnumUtilsTest.java b/src/test/org/apache/commons/lang3/EnumUtilsTest.java index fca795a03..3efcc634a 100644 --- a/src/test/org/apache/commons/lang3/EnumUtilsTest.java +++ b/src/test/org/apache/commons/lang3/EnumUtilsTest.java @@ -21,18 +21,10 @@ package org.apache.commons.lang3; import java.util.List; import java.util.Map; -import junit.framework.Test; import junit.framework.TestCase; -import junit.framework.TestSuite; public class EnumUtilsTest extends TestCase { - public static Test suite() { - TestSuite suite = new TestSuite(EnumUtilsTest.class); - suite.setName("EnumUtils Tests"); - return suite; - } - public void testConstructable() { // enforce public constructor new EnumUtils(); diff --git a/src/test/org/apache/commons/lang3/LocaleUtilsTest.java b/src/test/org/apache/commons/lang3/LocaleUtilsTest.java index c822b3a37..28ab263cf 100644 --- a/src/test/org/apache/commons/lang3/LocaleUtilsTest.java +++ b/src/test/org/apache/commons/lang3/LocaleUtilsTest.java @@ -26,10 +26,7 @@ import java.util.List; import java.util.Locale; import java.util.Set; -import junit.framework.Test; import junit.framework.TestCase; -import junit.framework.TestSuite; -import junit.textui.TestRunner; /** * Unit tests for {@link LocaleUtils}. @@ -57,24 +54,6 @@ public class LocaleUtilsTest extends TestCase { super(name); } - /** - * Main. - * @param args - */ - public static void main(String[] args) { - TestRunner.run(suite()); - } - - /** - * Run the test cases as a suite. - * @return the Test - */ - public static Test suite() { - TestSuite suite = new TestSuite(LocaleUtilsTest.class); - suite.setName("LocaleUtils Tests"); - return suite; - } - @Override public void setUp() throws Exception { super.setUp(); diff --git a/src/test/org/apache/commons/lang3/ObjectUtilsTest.java b/src/test/org/apache/commons/lang3/ObjectUtilsTest.java index b60402e81..448e10d6b 100644 --- a/src/test/org/apache/commons/lang3/ObjectUtilsTest.java +++ b/src/test/org/apache/commons/lang3/ObjectUtilsTest.java @@ -21,10 +21,7 @@ import java.lang.reflect.Modifier; import java.util.Calendar; import java.util.Date; -import junit.framework.Test; import junit.framework.TestCase; -import junit.framework.TestSuite; -import junit.textui.TestRunner; /** * Unit tests {@link org.apache.commons.lang3.ObjectUtils}. @@ -43,26 +40,6 @@ public class ObjectUtilsTest extends TestCase { super(name); } - public static void main(String[] args) { - TestRunner.run(suite()); - } - - public static Test suite() { - TestSuite suite = new TestSuite(ObjectUtilsTest.class); - suite.setName("ObjectUtils Tests"); - return suite; - } - - @Override - protected void setUp() throws Exception { - super.setUp(); - } - - @Override - protected void tearDown() throws Exception { - super.tearDown(); - } - //----------------------------------------------------------------------- public void testConstructor() { assertNotNull(new ObjectUtils()); diff --git a/src/test/org/apache/commons/lang3/RandomStringUtilsTest.java b/src/test/org/apache/commons/lang3/RandomStringUtilsTest.java index c7d729ba0..695d040a9 100644 --- a/src/test/org/apache/commons/lang3/RandomStringUtilsTest.java +++ b/src/test/org/apache/commons/lang3/RandomStringUtilsTest.java @@ -20,10 +20,6 @@ import java.lang.reflect.Constructor; import java.lang.reflect.Modifier; import java.util.Random; -import junit.framework.Test; -import junit.framework.TestSuite; -import junit.textui.TestRunner; - /** * Unit tests {@link org.apache.commons.lang3.RandomStringUtils}. * @@ -40,26 +36,6 @@ public class RandomStringUtilsTest extends junit.framework.TestCase { super(name); } - public static Test suite() { - TestSuite suite = new TestSuite(RandomStringUtilsTest.class); - suite.setName("RandomStringUtils Tests"); - return suite; - } - - /** - * Set up instance variables required by this test case. - */ - @Override - public void setUp() { - } - - /** - * Tear down instance variables required by this test case. - */ - @Override - public void tearDown() { - } - //----------------------------------------------------------------------- public void testConstructor() { assertNotNull(new RandomStringUtils()); @@ -346,9 +322,5 @@ public class RandomStringUtilsTest extends junit.framework.TestCase { // just to be complete assertEquals(orig, copy); } - - public static void main(String args[]) { - TestRunner.run(suite()); - } } diff --git a/src/test/org/apache/commons/lang3/SerializationUtilsTest.java b/src/test/org/apache/commons/lang3/SerializationUtilsTest.java index c425cfc14..6fe793ba3 100644 --- a/src/test/org/apache/commons/lang3/SerializationUtilsTest.java +++ b/src/test/org/apache/commons/lang3/SerializationUtilsTest.java @@ -28,10 +28,7 @@ import java.lang.reflect.Constructor; import java.lang.reflect.Modifier; import java.util.HashMap; -import junit.framework.Test; import junit.framework.TestCase; -import junit.framework.TestSuite; -import junit.textui.TestRunner; /** * Unit tests {@link org.apache.commons.lang3.SerializationUtils}. @@ -53,16 +50,6 @@ public class SerializationUtilsTest extends TestCase { super(name); } - public static void main(String[] args) { - TestRunner.run(suite()); - } - - public static Test suite() { - TestSuite suite = new TestSuite(SerializationUtilsTest.class); - suite.setName("SerializationUtils Tests"); - return suite; - } - @Override protected void setUp() throws Exception { super.setUp(); @@ -74,11 +61,6 @@ public class SerializationUtilsTest extends TestCase { iMap.put("BAR", iInteger); } - @Override - protected void tearDown() throws Exception { - super.tearDown(); - } - //----------------------------------------------------------------------- public void testConstructor() { assertNotNull(new SerializationUtils()); diff --git a/src/test/org/apache/commons/lang3/StringEscapeUtilsTest.java b/src/test/org/apache/commons/lang3/StringEscapeUtilsTest.java index 208083458..d834bd224 100644 --- a/src/test/org/apache/commons/lang3/StringEscapeUtilsTest.java +++ b/src/test/org/apache/commons/lang3/StringEscapeUtilsTest.java @@ -21,10 +21,7 @@ import java.io.StringWriter; import java.lang.reflect.Constructor; import java.lang.reflect.Modifier; -import junit.framework.Test; import junit.framework.TestCase; -import junit.framework.TestSuite; -import junit.textui.TestRunner; /** * Unit tests for {@link StringEscapeUtils}. @@ -39,16 +36,6 @@ public class StringEscapeUtilsTest extends TestCase { super(name); } - public static void main(String[] args) { - TestRunner.run(suite()); - } - - public static Test suite() { - TestSuite suite = new TestSuite(StringEscapeUtilsTest.class); - suite.setName("StringEscapeUtilsTest Tests"); - return suite; - } - //----------------------------------------------------------------------- public void testConstructor() { assertNotNull(new StringEscapeUtils()); diff --git a/src/test/org/apache/commons/lang3/StringUtilsEqualsIndexOfTest.java b/src/test/org/apache/commons/lang3/StringUtilsEqualsIndexOfTest.java index fbef90543..0aa13a59d 100644 --- a/src/test/org/apache/commons/lang3/StringUtilsEqualsIndexOfTest.java +++ b/src/test/org/apache/commons/lang3/StringUtilsEqualsIndexOfTest.java @@ -18,10 +18,7 @@ package org.apache.commons.lang3; import java.util.Locale; -import junit.framework.Test; import junit.framework.TestCase; -import junit.framework.TestSuite; -import junit.textui.TestRunner; /** * Unit tests {@link org.apache.commons.lang3.StringUtils} - Substring methods @@ -41,26 +38,6 @@ public class StringUtilsEqualsIndexOfTest extends TestCase { super(name); } - public static void main(String[] args) { - TestRunner.run(suite()); - } - - public static Test suite() { - TestSuite suite = new TestSuite(StringUtilsEqualsIndexOfTest.class); - suite.setName("StringUtilsEqualsIndexOf Tests"); - return suite; - } - - @Override - protected void setUp() throws Exception { - super.setUp(); - } - - @Override - protected void tearDown() throws Exception { - super.tearDown(); - } - //----------------------------------------------------------------------- public void testEquals() { diff --git a/src/test/org/apache/commons/lang3/StringUtilsIsTest.java b/src/test/org/apache/commons/lang3/StringUtilsIsTest.java index 85457afb0..f0001e3ad 100644 --- a/src/test/org/apache/commons/lang3/StringUtilsIsTest.java +++ b/src/test/org/apache/commons/lang3/StringUtilsIsTest.java @@ -16,10 +16,7 @@ */ package org.apache.commons.lang3; -import junit.framework.Test; import junit.framework.TestCase; -import junit.framework.TestSuite; -import junit.textui.TestRunner; /** * Unit tests {@link org.apache.commons.lang3.StringUtils} - Substring methods @@ -34,26 +31,6 @@ public class StringUtilsIsTest extends TestCase { super(name); } - public static void main(String[] args) { - TestRunner.run(suite()); - } - - public static Test suite() { - TestSuite suite = new TestSuite(StringUtilsIsTest.class); - suite.setName("StringUtilsIsXxx Tests"); - return suite; - } - - @Override - protected void setUp() throws Exception { - super.setUp(); - } - - @Override - protected void tearDown() throws Exception { - super.tearDown(); - } - //----------------------------------------------------------------------- public void testIsAlpha() { diff --git a/src/test/org/apache/commons/lang3/StringUtilsStartsEndsWithTest.java b/src/test/org/apache/commons/lang3/StringUtilsStartsEndsWithTest.java index da98687d9..83d5c9069 100644 --- a/src/test/org/apache/commons/lang3/StringUtilsStartsEndsWithTest.java +++ b/src/test/org/apache/commons/lang3/StringUtilsStartsEndsWithTest.java @@ -16,10 +16,7 @@ */ package org.apache.commons.lang3; -import junit.framework.Test; import junit.framework.TestCase; -import junit.framework.TestSuite; -import junit.textui.TestRunner; /** * Unit tests {@link org.apache.commons.lang3.StringUtils} - StartsWith/EndsWith methods @@ -38,26 +35,6 @@ public class StringUtilsStartsEndsWithTest extends TestCase { super(name); } - public static void main(String[] args) { - TestRunner.run(suite()); - } - - public static Test suite() { - TestSuite suite = new TestSuite(StringUtilsStartsEndsWithTest.class); - suite.setName("StringUtilsStartsEndsWith Tests"); - return suite; - } - - @Override - protected void setUp() throws Exception { - super.setUp(); - } - - @Override - protected void tearDown() throws Exception { - super.tearDown(); - } - //----------------------------------------------------------------------- /** diff --git a/src/test/org/apache/commons/lang3/StringUtilsSubstringTest.java b/src/test/org/apache/commons/lang3/StringUtilsSubstringTest.java index abc19c728..3458038a5 100644 --- a/src/test/org/apache/commons/lang3/StringUtilsSubstringTest.java +++ b/src/test/org/apache/commons/lang3/StringUtilsSubstringTest.java @@ -16,10 +16,7 @@ */ package org.apache.commons.lang3; -import junit.framework.Test; import junit.framework.TestCase; -import junit.framework.TestSuite; -import junit.textui.TestRunner; /** * Unit tests {@link org.apache.commons.lang3.StringUtils} - Substring methods @@ -40,26 +37,6 @@ public class StringUtilsSubstringTest extends TestCase { super(name); } - public static void main(String[] args) { - TestRunner.run(suite()); - } - - public static Test suite() { - TestSuite suite = new TestSuite(StringUtilsSubstringTest.class); - suite.setName("StringUtilsSubstring Tests"); - return suite; - } - - @Override - protected void setUp() throws Exception { - super.setUp(); - } - - @Override - protected void tearDown() throws Exception { - super.tearDown(); - } - //----------------------------------------------------------------------- diff --git a/src/test/org/apache/commons/lang3/StringUtilsTest.java b/src/test/org/apache/commons/lang3/StringUtilsTest.java index 7a74598a6..0b3c69916 100644 --- a/src/test/org/apache/commons/lang3/StringUtilsTest.java +++ b/src/test/org/apache/commons/lang3/StringUtilsTest.java @@ -23,10 +23,7 @@ import java.util.Collections; import java.util.Iterator; import java.util.Locale; -import junit.framework.Test; import junit.framework.TestCase; -import junit.framework.TestSuite; -import junit.textui.TestRunner; /** * Unit tests {@link org.apache.commons.lang3.StringUtils}. @@ -96,26 +93,6 @@ public class StringUtilsTest extends TestCase { super(name); } - public static void main(String[] args) { - TestRunner.run(suite()); - } - - public static Test suite() { - TestSuite suite = new TestSuite(StringUtilsTest.class); - suite.setName("StringUtilsTest Tests"); - return suite; - } - - @Override - protected void setUp() throws Exception { - super.setUp(); - } - - @Override - protected void tearDown() throws Exception { - super.tearDown(); - } - //----------------------------------------------------------------------- public void testConstructor() { assertNotNull(new StringUtils()); diff --git a/src/test/org/apache/commons/lang3/StringUtilsTrimEmptyTest.java b/src/test/org/apache/commons/lang3/StringUtilsTrimEmptyTest.java index 273f98027..f7cd3c5c9 100644 --- a/src/test/org/apache/commons/lang3/StringUtilsTrimEmptyTest.java +++ b/src/test/org/apache/commons/lang3/StringUtilsTrimEmptyTest.java @@ -16,10 +16,7 @@ */ package org.apache.commons.lang3; -import junit.framework.Test; import junit.framework.TestCase; -import junit.framework.TestSuite; -import junit.textui.TestRunner; /** * Unit tests {@link org.apache.commons.lang3.StringUtils} - Trim/Empty methods @@ -35,26 +32,6 @@ public class StringUtilsTrimEmptyTest extends TestCase { super(name); } - public static void main(String[] args) { - TestRunner.run(suite()); - } - - public static Test suite() { - TestSuite suite = new TestSuite(StringUtilsTrimEmptyTest.class); - suite.setName("StringUtilsTrimEmpty Tests"); - return suite; - } - - @Override - protected void setUp() throws Exception { - super.setUp(); - } - - @Override - protected void tearDown() throws Exception { - super.tearDown(); - } - //----------------------------------------------------------------------- public void testIsEmpty() { assertEquals(true, StringUtils.isEmpty(null)); diff --git a/src/test/org/apache/commons/lang3/SystemUtilsTest.java b/src/test/org/apache/commons/lang3/SystemUtilsTest.java index 8117b55da..f1d2902f1 100644 --- a/src/test/org/apache/commons/lang3/SystemUtilsTest.java +++ b/src/test/org/apache/commons/lang3/SystemUtilsTest.java @@ -25,10 +25,7 @@ import java.lang.reflect.Modifier; import java.util.Locale; import junit.framework.Assert; -import junit.framework.Test; import junit.framework.TestCase; -import junit.framework.TestSuite; -import junit.textui.TestRunner; /** * Unit tests {@link org.apache.commons.lang3.SystemUtils}. @@ -41,15 +38,6 @@ import junit.textui.TestRunner; * @version $Id$ */ public class SystemUtilsTest extends TestCase { - public static void main(String[] args) { - TestRunner.run(suite()); - } - - public static Test suite() { - TestSuite suite = new TestSuite(SystemUtilsTest.class); - suite.setName("SystemUtils Tests"); - return suite; - } //----------------------------------------------------------------------- // COPIED FROM SystemUtils @@ -188,16 +176,6 @@ public class SystemUtilsTest extends TestCase { return OS_NAME.startsWith(osNamePrefix) && OS_VERSION.startsWith(osVersionPrefix); } - @Override - protected void setUp() throws Exception { - super.setUp(); - } - - @Override - protected void tearDown() throws Exception { - super.tearDown(); - } - //----------------------------------------------------------------------- public void testConstructor() { assertNotNull(new SystemUtils()); diff --git a/src/test/org/apache/commons/lang3/ValidateTest.java b/src/test/org/apache/commons/lang3/ValidateTest.java index 617379e29..dd0fee7a2 100644 --- a/src/test/org/apache/commons/lang3/ValidateTest.java +++ b/src/test/org/apache/commons/lang3/ValidateTest.java @@ -27,10 +27,8 @@ import java.util.HashMap; import java.util.List; import java.util.Map; -import junit.framework.Test; import junit.framework.TestCase; -import junit.framework.TestSuite; -import junit.textui.TestRunner; + /** * Unit tests {@link org.apache.commons.lang3.Validate}. * @@ -44,26 +42,6 @@ public class ValidateTest extends TestCase { super(name); } - public static void main(String[] args) { - TestRunner.run(suite()); - } - - public static Test suite() { - TestSuite suite = new TestSuite(ValidateTest.class); - suite.setName("Validate Tests"); - return suite; - } - - @Override - protected void setUp() throws Exception { - super.setUp(); - } - - @Override - protected void tearDown() throws Exception { - super.tearDown(); - } - //----------------------------------------------------------------------- public void testIsTrue1() { Validate.isTrue(true); diff --git a/src/test/org/apache/commons/lang3/WordUtilsTest.java b/src/test/org/apache/commons/lang3/WordUtilsTest.java index d847fd34b..023eb0560 100644 --- a/src/test/org/apache/commons/lang3/WordUtilsTest.java +++ b/src/test/org/apache/commons/lang3/WordUtilsTest.java @@ -19,9 +19,7 @@ package org.apache.commons.lang3; import java.lang.reflect.Constructor; import java.lang.reflect.Modifier; -import junit.framework.Test; import junit.framework.TestCase; -import junit.framework.TestSuite; /** * Unit tests for WordUtils class. @@ -36,12 +34,6 @@ public class WordUtilsTest extends TestCase { super(name); } - public static Test suite() { - TestSuite suite = new TestSuite(WordUtilsTest.class); - suite.setName("WordUtilsTests"); - return suite; - } - //----------------------------------------------------------------------- public void testConstructor() { assertNotNull(new WordUtils()); diff --git a/src/test/org/apache/commons/lang3/builder/CompareToBuilderTest.java b/src/test/org/apache/commons/lang3/builder/CompareToBuilderTest.java index bc23dad6c..49ebd5ab6 100644 --- a/src/test/org/apache/commons/lang3/builder/CompareToBuilderTest.java +++ b/src/test/org/apache/commons/lang3/builder/CompareToBuilderTest.java @@ -18,10 +18,7 @@ package org.apache.commons.lang3.builder; import java.math.BigInteger; -import junit.framework.Test; import junit.framework.TestCase; -import junit.framework.TestSuite; -import junit.textui.TestRunner; /** * Unit tests {@link org.apache.commons.lang3.builder.CompareToBuilder}. @@ -32,27 +29,8 @@ import junit.textui.TestRunner; */ public class CompareToBuilderTest extends TestCase { - public CompareToBuilderTest(String name) { - super(name); - } - public static void main(String[] args) { - TestRunner.run(suite()); - } - - public static Test suite() { - TestSuite suite = new TestSuite(CompareToBuilderTest.class); - suite.setName("CompareToBuilder Tests"); - return suite; - } - - @Override - protected void setUp() throws Exception { - super.setUp(); - } - - @Override - protected void tearDown() throws Exception { - super.tearDown(); + public CompareToBuilderTest(String name) { + super(name); } //----------------------------------------------------------------------- diff --git a/src/test/org/apache/commons/lang3/builder/DefaultToStringStyleTest.java b/src/test/org/apache/commons/lang3/builder/DefaultToStringStyleTest.java index b276fdb5b..ba97b34cd 100644 --- a/src/test/org/apache/commons/lang3/builder/DefaultToStringStyleTest.java +++ b/src/test/org/apache/commons/lang3/builder/DefaultToStringStyleTest.java @@ -19,12 +19,9 @@ package org.apache.commons.lang3.builder; import java.util.ArrayList; import java.util.HashMap; -import org.apache.commons.lang3.builder.ToStringStyleTest.Person; - -import junit.framework.Test; import junit.framework.TestCase; -import junit.framework.TestSuite; -import junit.textui.TestRunner; + +import org.apache.commons.lang3.builder.ToStringStyleTest.Person; /** * Unit tests {@link org.apache.commons.lang3.builder.DefaultToStringStyleTest}. @@ -41,16 +38,6 @@ public class DefaultToStringStyleTest extends TestCase { super(name); } - public static void main(String[] args) { - TestRunner.run(suite()); - } - - public static Test suite() { - TestSuite suite = new TestSuite(DefaultToStringStyleTest.class); - suite.setName("DefaultToStringStyle Tests"); - return suite; - } - @Override protected void setUp() throws Exception { super.setUp(); diff --git a/src/test/org/apache/commons/lang3/builder/EqualsBuilderTest.java b/src/test/org/apache/commons/lang3/builder/EqualsBuilderTest.java index 11e0f7471..c315bdd46 100644 --- a/src/test/org/apache/commons/lang3/builder/EqualsBuilderTest.java +++ b/src/test/org/apache/commons/lang3/builder/EqualsBuilderTest.java @@ -18,10 +18,7 @@ package org.apache.commons.lang3.builder; import java.util.Arrays; -import junit.framework.Test; import junit.framework.TestCase; -import junit.framework.TestSuite; -import junit.textui.TestRunner; /** * Unit tests {@link org.apache.commons.lang3.builder.EqualsBuilder}. @@ -38,26 +35,6 @@ public class EqualsBuilderTest extends TestCase { super(name); } - public static void main(String[] args) { - TestRunner.run(suite()); - } - - public static Test suite() { - TestSuite suite = new TestSuite(EqualsBuilderTest.class); - suite.setName("EqualsBuilder Tests"); - return suite; - } - - @Override - protected void setUp() throws Exception { - super.setUp(); - } - - @Override - protected void tearDown() throws Exception { - super.tearDown(); - } - //----------------------------------------------------------------------- static class TestObject { diff --git a/src/test/org/apache/commons/lang3/builder/HashCodeBuilderAndEqualsBuilderTest.java b/src/test/org/apache/commons/lang3/builder/HashCodeBuilderAndEqualsBuilderTest.java index 30c418b79..155e4ef8d 100644 --- a/src/test/org/apache/commons/lang3/builder/HashCodeBuilderAndEqualsBuilderTest.java +++ b/src/test/org/apache/commons/lang3/builder/HashCodeBuilderAndEqualsBuilderTest.java @@ -16,10 +16,7 @@ */ package org.apache.commons.lang3.builder; -import junit.framework.Test; import junit.framework.TestCase; -import junit.framework.TestSuite; -import junit.textui.TestRunner; /** * Tests {@link org.apache.commons.lang3.builder.HashCodeBuilder} and @@ -39,26 +36,6 @@ public class HashCodeBuilderAndEqualsBuilderTest extends TestCase { super(name); } - public static void main(String[] args) { - TestRunner.run(suite()); - } - - public static Test suite() { - TestSuite suite = new TestSuite(HashCodeBuilderAndEqualsBuilderTest.class); - suite.setName("HashCodeBuilderAndEqualsBuilder Tests"); - return suite; - } - - @Override - protected void setUp() throws Exception { - super.setUp(); - } - - @Override - protected void tearDown() throws Exception { - super.tearDown(); - } - //----------------------------------------------------------------------- public void testInteger(boolean testTransients) { diff --git a/src/test/org/apache/commons/lang3/builder/HashCodeBuilderTest.java b/src/test/org/apache/commons/lang3/builder/HashCodeBuilderTest.java index 79b4077d4..f6af5f035 100644 --- a/src/test/org/apache/commons/lang3/builder/HashCodeBuilderTest.java +++ b/src/test/org/apache/commons/lang3/builder/HashCodeBuilderTest.java @@ -17,10 +17,7 @@ package org.apache.commons.lang3.builder; -import junit.framework.Test; import junit.framework.TestCase; -import junit.framework.TestSuite; -import junit.textui.TestRunner; /** * Unit tests {@link org.apache.commons.lang3.builder.HashCodeBuilder}. @@ -58,26 +55,6 @@ public class HashCodeBuilderTest extends TestCase { super(name); } - public static void main(String[] args) { - TestRunner.run(suite()); - } - - public static Test suite() { - TestSuite suite = new TestSuite(HashCodeBuilderTest.class); - suite.setName("HashCodeBuilder Tests"); - return suite; - } - - @Override - protected void setUp() throws Exception { - super.setUp(); - } - - @Override - protected void tearDown() throws Exception { - super.tearDown(); - } - // ----------------------------------------------------------------------- public void testConstructorEx1() { diff --git a/src/test/org/apache/commons/lang3/builder/MultiLineToStringStyleTest.java b/src/test/org/apache/commons/lang3/builder/MultiLineToStringStyleTest.java index ed930caab..2932103d4 100644 --- a/src/test/org/apache/commons/lang3/builder/MultiLineToStringStyleTest.java +++ b/src/test/org/apache/commons/lang3/builder/MultiLineToStringStyleTest.java @@ -19,10 +19,7 @@ package org.apache.commons.lang3.builder; import java.util.ArrayList; import java.util.HashMap; -import junit.framework.Test; import junit.framework.TestCase; -import junit.framework.TestSuite; -import junit.textui.TestRunner; import org.apache.commons.lang3.SystemUtils; import org.apache.commons.lang3.builder.ToStringStyleTest.Person; @@ -42,16 +39,6 @@ public class MultiLineToStringStyleTest extends TestCase { super(name); } - public static void main(String[] args) { - TestRunner.run(suite()); - } - - public static Test suite() { - TestSuite suite = new TestSuite(MultiLineToStringStyleTest.class); - suite.setName("MultiLineToStringStyle Tests"); - return suite; - } - @Override protected void setUp() throws Exception { super.setUp(); diff --git a/src/test/org/apache/commons/lang3/builder/NoFieldNamesToStringStyleTest.java b/src/test/org/apache/commons/lang3/builder/NoFieldNamesToStringStyleTest.java index afeb7664c..6facaa1cb 100644 --- a/src/test/org/apache/commons/lang3/builder/NoFieldNamesToStringStyleTest.java +++ b/src/test/org/apache/commons/lang3/builder/NoFieldNamesToStringStyleTest.java @@ -19,12 +19,9 @@ package org.apache.commons.lang3.builder; import java.util.ArrayList; import java.util.HashMap; -import org.apache.commons.lang3.builder.ToStringStyleTest.Person; - -import junit.framework.Test; import junit.framework.TestCase; -import junit.framework.TestSuite; -import junit.textui.TestRunner; + +import org.apache.commons.lang3.builder.ToStringStyleTest.Person; /** * Unit tests {@link org.apache.commons.lang3.builder.NoFieldNamesToStringStyleTest}. @@ -41,16 +38,6 @@ public class NoFieldNamesToStringStyleTest extends TestCase { super(name); } - public static void main(String[] args) { - TestRunner.run(suite()); - } - - public static Test suite() { - TestSuite suite = new TestSuite(NoFieldNamesToStringStyleTest.class); - suite.setName("NoFieldNamesToStringStyle Tests"); - return suite; - } - @Override protected void setUp() throws Exception { super.setUp(); diff --git a/src/test/org/apache/commons/lang3/builder/SimpleToStringStyleTest.java b/src/test/org/apache/commons/lang3/builder/SimpleToStringStyleTest.java index 9093c79bd..46b805100 100644 --- a/src/test/org/apache/commons/lang3/builder/SimpleToStringStyleTest.java +++ b/src/test/org/apache/commons/lang3/builder/SimpleToStringStyleTest.java @@ -19,12 +19,9 @@ package org.apache.commons.lang3.builder; import java.util.ArrayList; import java.util.HashMap; -import org.apache.commons.lang3.builder.ToStringStyleTest.Person; - -import junit.framework.Test; import junit.framework.TestCase; -import junit.framework.TestSuite; -import junit.textui.TestRunner; + +import org.apache.commons.lang3.builder.ToStringStyleTest.Person; /** * Unit tests {@link org.apache.commons.lang3.builder.SimpleToStringStyleTest}. @@ -40,16 +37,6 @@ public class SimpleToStringStyleTest extends TestCase { super(name); } - public static void main(String[] args) { - TestRunner.run(suite()); - } - - public static Test suite() { - TestSuite suite = new TestSuite(SimpleToStringStyleTest.class); - suite.setName("SimpleToStringStyle Tests"); - return suite; - } - @Override protected void setUp() throws Exception { super.setUp(); diff --git a/src/test/org/apache/commons/lang3/builder/StandardToStringStyleTest.java b/src/test/org/apache/commons/lang3/builder/StandardToStringStyleTest.java index dba5596a3..77436a474 100644 --- a/src/test/org/apache/commons/lang3/builder/StandardToStringStyleTest.java +++ b/src/test/org/apache/commons/lang3/builder/StandardToStringStyleTest.java @@ -19,12 +19,9 @@ package org.apache.commons.lang3.builder; import java.util.ArrayList; import java.util.HashMap; -import org.apache.commons.lang3.builder.ToStringStyleTest.Person; - -import junit.framework.Test; import junit.framework.TestCase; -import junit.framework.TestSuite; -import junit.textui.TestRunner; + +import org.apache.commons.lang3.builder.ToStringStyleTest.Person; /** * Unit tests {@link org.apache.commons.lang3.builder.ToStringStyle}. @@ -56,16 +53,6 @@ public class StandardToStringStyleTest extends TestCase { super(name); } - public static void main(String[] args) { - TestRunner.run(suite()); - } - - public static Test suite() { - TestSuite suite = new TestSuite(StandardToStringStyleTest.class); - suite.setName("StandardToStringStyle Tests"); - return suite; - } - @Override protected void setUp() throws Exception { super.setUp(); diff --git a/src/test/org/apache/commons/lang3/builder/ToStringBuilderTest.java b/src/test/org/apache/commons/lang3/builder/ToStringBuilderTest.java index a16a045e7..228704a09 100644 --- a/src/test/org/apache/commons/lang3/builder/ToStringBuilderTest.java +++ b/src/test/org/apache/commons/lang3/builder/ToStringBuilderTest.java @@ -20,10 +20,7 @@ import java.util.ArrayList; import java.util.HashMap; import java.util.List; -import junit.framework.Test; import junit.framework.TestCase; -import junit.framework.TestSuite; -import junit.textui.TestRunner; /** * Unit tests for {@link org.apache.commons.lang3.builder.ToStringBuilder}. @@ -42,26 +39,6 @@ public class ToStringBuilderTest extends TestCase { super(name); } - public static void main(String[] args) { - TestRunner.run(suite()); - } - - public static Test suite() { - TestSuite suite = new TestSuite(ToStringBuilderTest.class); - suite.setName("ToStringBuilder Tests"); - return suite; - } - - @Override - protected void setUp() throws Exception { - super.setUp(); - } - - @Override - protected void tearDown() throws Exception { - super.tearDown(); - } - //----------------------------------------------------------------------- public void testConstructorEx1() { diff --git a/src/test/org/apache/commons/lang3/builder/ToStringStyleTest.java b/src/test/org/apache/commons/lang3/builder/ToStringStyleTest.java index 6aa46aac4..379d687d5 100644 --- a/src/test/org/apache/commons/lang3/builder/ToStringStyleTest.java +++ b/src/test/org/apache/commons/lang3/builder/ToStringStyleTest.java @@ -16,10 +16,7 @@ */ package org.apache.commons.lang3.builder; -import junit.framework.Test; import junit.framework.TestCase; -import junit.framework.TestSuite; -import junit.textui.TestRunner; /** * Test case for ToStringStyle. @@ -33,21 +30,6 @@ public class ToStringStyleTest extends TestCase { super(name); } - public static void main(String[] args) { - TestRunner.run(suite()); - } - - public static Test suite() { - TestSuite suite = new TestSuite(ToStringStyleTest.class); - suite.setName("ToStringStyle Tests"); - return suite; - } - - @Override - protected void setUp() throws Exception { - super.setUp(); - } - private static class ToStringStyleImpl extends ToStringStyle { } diff --git a/src/test/org/apache/commons/lang3/exception/ExceptionUtilsTest.java b/src/test/org/apache/commons/lang3/exception/ExceptionUtilsTest.java index 533ee2210..f1da25dc8 100644 --- a/src/test/org/apache/commons/lang3/exception/ExceptionUtilsTest.java +++ b/src/test/org/apache/commons/lang3/exception/ExceptionUtilsTest.java @@ -28,9 +28,7 @@ import java.sql.SQLException; import java.util.List; import junit.framework.Assert; -import junit.framework.Test; import junit.framework.TestCase; -import junit.framework.TestSuite; import org.apache.commons.lang3.SystemUtils; @@ -72,10 +70,6 @@ public class ExceptionUtilsTest extends TestCase { super(name); } - public static Test suite() { - return new TestSuite(ExceptionUtilsTest.class); - } - @Override public void setUp() { withoutCause = createExceptionWithoutCause(); diff --git a/src/test/org/apache/commons/lang3/math/FractionTest.java b/src/test/org/apache/commons/lang3/math/FractionTest.java index 13628805d..3116f4e70 100644 --- a/src/test/org/apache/commons/lang3/math/FractionTest.java +++ b/src/test/org/apache/commons/lang3/math/FractionTest.java @@ -18,9 +18,7 @@ */ package org.apache.commons.lang3.math; -import junit.framework.Test; import junit.framework.TestCase; -import junit.framework.TestSuite; /** * Test cases for the {@link Fraction} class @@ -37,16 +35,6 @@ public class FractionTest extends TestCase { super(name); } - public static Test suite() { - TestSuite suite = new TestSuite(FractionTest.class); - suite.setName("Fraction Tests"); - return suite; - } - - @Override - public void setUp() { - } - //-------------------------------------------------------------------------- public void testConstants() { diff --git a/src/test/org/apache/commons/lang3/math/NumberUtilsTest.java b/src/test/org/apache/commons/lang3/math/NumberUtilsTest.java index 85765f107..31eb37612 100644 --- a/src/test/org/apache/commons/lang3/math/NumberUtilsTest.java +++ b/src/test/org/apache/commons/lang3/math/NumberUtilsTest.java @@ -21,10 +21,7 @@ import java.lang.reflect.Modifier; import java.math.BigDecimal; import java.math.BigInteger; -import junit.framework.Test; import junit.framework.TestCase; -import junit.framework.TestSuite; -import junit.textui.TestRunner; import org.apache.commons.lang3.SystemUtils; @@ -46,16 +43,6 @@ public class NumberUtilsTest extends TestCase { super(name); } - public static void main(String[] args) { - TestRunner.run(suite()); - } - - public static Test suite() { - TestSuite suite = new TestSuite(NumberUtilsTest.class); - suite.setName("NumberUtils Tests"); - return suite; - } - //----------------------------------------------------------------------- public void testConstructor() { assertNotNull(new NumberUtils()); diff --git a/src/test/org/apache/commons/lang3/mutable/MutableBooleanTest.java b/src/test/org/apache/commons/lang3/mutable/MutableBooleanTest.java index acd2d1da2..ffc6b9384 100644 --- a/src/test/org/apache/commons/lang3/mutable/MutableBooleanTest.java +++ b/src/test/org/apache/commons/lang3/mutable/MutableBooleanTest.java @@ -17,10 +17,7 @@ package org.apache.commons.lang3.mutable; -import junit.framework.Test; import junit.framework.TestCase; -import junit.framework.TestSuite; -import junit.textui.TestRunner; /** * JUnit tests. @@ -32,14 +29,6 @@ import junit.textui.TestRunner; */ public class MutableBooleanTest extends TestCase { - public static void main(String[] args) { - TestRunner.run(suite()); - } - - public static Test suite() { - return new TestSuite(MutableBooleanTest.class); - } - public MutableBooleanTest(String testName) { super(testName); } diff --git a/src/test/org/apache/commons/lang3/mutable/MutableByteTest.java b/src/test/org/apache/commons/lang3/mutable/MutableByteTest.java index e4c324db2..8f0a875c3 100644 --- a/src/test/org/apache/commons/lang3/mutable/MutableByteTest.java +++ b/src/test/org/apache/commons/lang3/mutable/MutableByteTest.java @@ -16,10 +16,7 @@ */ package org.apache.commons.lang3.mutable; -import junit.framework.Test; import junit.framework.TestCase; -import junit.framework.TestSuite; -import junit.textui.TestRunner; /** * JUnit tests. @@ -33,14 +30,6 @@ public class MutableByteTest extends TestCase { super(testName); } - public static void main(String[] args) { - TestRunner.run(suite()); - } - - public static Test suite() { - return new TestSuite(MutableByteTest.class); - } - // ---------------------------------------------------------------- public void testConstructors() { assertEquals((byte) 0, new MutableByte().byteValue()); diff --git a/src/test/org/apache/commons/lang3/mutable/MutableDoubleTest.java b/src/test/org/apache/commons/lang3/mutable/MutableDoubleTest.java index c584a5c99..859e0f1f9 100644 --- a/src/test/org/apache/commons/lang3/mutable/MutableDoubleTest.java +++ b/src/test/org/apache/commons/lang3/mutable/MutableDoubleTest.java @@ -16,10 +16,7 @@ */ package org.apache.commons.lang3.mutable; -import junit.framework.Test; import junit.framework.TestCase; -import junit.framework.TestSuite; -import junit.textui.TestRunner; /** * JUnit tests. @@ -33,14 +30,6 @@ public class MutableDoubleTest extends TestCase { super(testName); } - public static void main(String[] args) { - TestRunner.run(suite()); - } - - public static Test suite() { - return new TestSuite(MutableDoubleTest.class); - } - // ---------------------------------------------------------------- public void testConstructors() { assertEquals(0d, new MutableDouble().doubleValue(), 0.0001d); diff --git a/src/test/org/apache/commons/lang3/mutable/MutableFloatTest.java b/src/test/org/apache/commons/lang3/mutable/MutableFloatTest.java index f4fb0dff6..936573271 100644 --- a/src/test/org/apache/commons/lang3/mutable/MutableFloatTest.java +++ b/src/test/org/apache/commons/lang3/mutable/MutableFloatTest.java @@ -16,10 +16,7 @@ */ package org.apache.commons.lang3.mutable; -import junit.framework.Test; import junit.framework.TestCase; -import junit.framework.TestSuite; -import junit.textui.TestRunner; /** * JUnit tests. @@ -33,14 +30,6 @@ public class MutableFloatTest extends TestCase { super(testName); } - public static void main(String[] args) { - TestRunner.run(suite()); - } - - public static Test suite() { - return new TestSuite(MutableFloatTest.class); - } - // ---------------------------------------------------------------- public void testConstructors() { assertEquals(0f, new MutableFloat().floatValue(), 0.0001f); diff --git a/src/test/org/apache/commons/lang3/mutable/MutableIntTest.java b/src/test/org/apache/commons/lang3/mutable/MutableIntTest.java index 8172c6854..93b5279ea 100644 --- a/src/test/org/apache/commons/lang3/mutable/MutableIntTest.java +++ b/src/test/org/apache/commons/lang3/mutable/MutableIntTest.java @@ -16,10 +16,7 @@ */ package org.apache.commons.lang3.mutable; -import junit.framework.Test; import junit.framework.TestCase; -import junit.framework.TestSuite; -import junit.textui.TestRunner; /** * JUnit tests. @@ -33,14 +30,6 @@ public class MutableIntTest extends TestCase { super(testName); } - public static void main(String[] args) { - TestRunner.run(suite()); - } - - public static Test suite() { - return new TestSuite(MutableIntTest.class); - } - // ---------------------------------------------------------------- public void testConstructors() { assertEquals(0, new MutableInt().intValue()); diff --git a/src/test/org/apache/commons/lang3/mutable/MutableLongTest.java b/src/test/org/apache/commons/lang3/mutable/MutableLongTest.java index 2bd77d307..b69a1f141 100644 --- a/src/test/org/apache/commons/lang3/mutable/MutableLongTest.java +++ b/src/test/org/apache/commons/lang3/mutable/MutableLongTest.java @@ -16,10 +16,7 @@ */ package org.apache.commons.lang3.mutable; -import junit.framework.Test; import junit.framework.TestCase; -import junit.framework.TestSuite; -import junit.textui.TestRunner; /** * JUnit tests. @@ -33,14 +30,6 @@ public class MutableLongTest extends TestCase { super(testName); } - public static void main(String[] args) { - TestRunner.run(suite()); - } - - public static Test suite() { - return new TestSuite(MutableLongTest.class); - } - // ---------------------------------------------------------------- public void testConstructors() { assertEquals(0, new MutableLong().longValue()); diff --git a/src/test/org/apache/commons/lang3/mutable/MutableObjectTest.java b/src/test/org/apache/commons/lang3/mutable/MutableObjectTest.java index 98a2c25c0..b6cd5892c 100644 --- a/src/test/org/apache/commons/lang3/mutable/MutableObjectTest.java +++ b/src/test/org/apache/commons/lang3/mutable/MutableObjectTest.java @@ -16,10 +16,7 @@ */ package org.apache.commons.lang3.mutable; -import junit.framework.Test; import junit.framework.TestCase; -import junit.framework.TestSuite; -import junit.textui.TestRunner; /** * JUnit tests. @@ -33,14 +30,6 @@ public class MutableObjectTest extends TestCase { super(testName); } - public static void main(String[] args) { - TestRunner.run(suite()); - } - - public static Test suite() { - return new TestSuite(MutableObjectTest.class); - } - // ---------------------------------------------------------------- public void testConstructors() { assertEquals(null, new MutableObject().getValue()); diff --git a/src/test/org/apache/commons/lang3/mutable/MutableShortTest.java b/src/test/org/apache/commons/lang3/mutable/MutableShortTest.java index d81930883..5d649013c 100644 --- a/src/test/org/apache/commons/lang3/mutable/MutableShortTest.java +++ b/src/test/org/apache/commons/lang3/mutable/MutableShortTest.java @@ -16,10 +16,7 @@ */ package org.apache.commons.lang3.mutable; -import junit.framework.Test; import junit.framework.TestCase; -import junit.framework.TestSuite; -import junit.textui.TestRunner; /** * JUnit tests. @@ -33,14 +30,6 @@ public class MutableShortTest extends TestCase { super(testName); } - public static void main(String[] args) { - TestRunner.run(suite()); - } - - public static Test suite() { - return new TestSuite(MutableShortTest.class); - } - // ---------------------------------------------------------------- public void testConstructors() { assertEquals((short) 0, new MutableShort().shortValue()); diff --git a/src/test/org/apache/commons/lang3/reflect/ConstructorUtilsTest.java b/src/test/org/apache/commons/lang3/reflect/ConstructorUtilsTest.java index 8a9ef55d3..01557dcf0 100644 --- a/src/test/org/apache/commons/lang3/reflect/ConstructorUtilsTest.java +++ b/src/test/org/apache/commons/lang3/reflect/ConstructorUtilsTest.java @@ -21,9 +21,7 @@ import java.util.Arrays; import java.util.HashMap; import java.util.Map; -import junit.framework.Test; import junit.framework.TestCase; -import junit.framework.TestSuite; import org.apache.commons.lang3.ArrayUtils; import org.apache.commons.lang3.math.NumberUtils; @@ -80,16 +78,6 @@ public class ConstructorUtilsTest extends TestCase { classCache = new HashMap, Class[]>(); } - /** - * Run the test cases as a suite. - * @return the Test - */ - public static Test suite() { - TestSuite suite = new TestSuite(ConstructorUtilsTest.class); - suite.setName("ConstructorUtils Tests"); - return suite; - } - @Override protected void setUp() throws Exception { super.setUp(); diff --git a/src/test/org/apache/commons/lang3/reflect/FieldUtilsTest.java b/src/test/org/apache/commons/lang3/reflect/FieldUtilsTest.java index 1ce9d3417..2c1a1ba37 100644 --- a/src/test/org/apache/commons/lang3/reflect/FieldUtilsTest.java +++ b/src/test/org/apache/commons/lang3/reflect/FieldUtilsTest.java @@ -18,6 +18,8 @@ package org.apache.commons.lang3.reflect; import java.lang.reflect.Field; +import junit.framework.TestCase; + import org.apache.commons.lang3.reflect.testbed.Ambig; import org.apache.commons.lang3.reflect.testbed.Foo; import org.apache.commons.lang3.reflect.testbed.PrivatelyShadowedChild; @@ -26,10 +28,6 @@ import org.apache.commons.lang3.reflect.testbed.PubliclyShadowedChild; import org.apache.commons.lang3.reflect.testbed.StaticContainer; import org.apache.commons.lang3.reflect.testbed.StaticContainerChild; -import junit.framework.Test; -import junit.framework.TestCase; -import junit.framework.TestSuite; - /** * Unit tests FieldUtils * @author mbenson @@ -49,16 +47,6 @@ public class FieldUtilsTest extends TestCase { private PrivatelyShadowedChild privatelyShadowedChild; private Class parentClass = PublicChild.class.getSuperclass(); - /** - * Run the test cases as a suite. - * @return the Test - */ - public static Test suite() { - TestSuite suite = new TestSuite(FieldUtilsTest.class); - suite.setName("FieldUtils Tests"); - return suite; - } - @Override protected void setUp() throws Exception { super.setUp(); diff --git a/src/test/org/apache/commons/lang3/reflect/MethodUtilsTest.java b/src/test/org/apache/commons/lang3/reflect/MethodUtilsTest.java index 99cf61e94..c092161f2 100644 --- a/src/test/org/apache/commons/lang3/reflect/MethodUtilsTest.java +++ b/src/test/org/apache/commons/lang3/reflect/MethodUtilsTest.java @@ -21,9 +21,7 @@ import java.util.Arrays; import java.util.HashMap; import java.util.Map; -import junit.framework.Test; import junit.framework.TestCase; -import junit.framework.TestSuite; import org.apache.commons.lang3.ArrayUtils; import org.apache.commons.lang3.math.NumberUtils; @@ -104,16 +102,6 @@ public class MethodUtilsTest extends TestCase { classCache = new HashMap, Class[]>(); } - /** - * Run the test cases as a suite. - * @return the Test - */ - public static Test suite() { - TestSuite suite = new TestSuite(MethodUtilsTest.class); - suite.setName("MethodUtils Tests"); - return suite; - } - @Override protected void setUp() throws Exception { super.setUp(); diff --git a/src/test/org/apache/commons/lang3/text/CompositeFormatTest.java b/src/test/org/apache/commons/lang3/text/CompositeFormatTest.java index 1b21f22f2..a03346e3b 100644 --- a/src/test/org/apache/commons/lang3/text/CompositeFormatTest.java +++ b/src/test/org/apache/commons/lang3/text/CompositeFormatTest.java @@ -23,36 +23,13 @@ import java.text.ParsePosition; import java.text.SimpleDateFormat; import java.util.Locale; -import junit.framework.Test; import junit.framework.TestCase; -import junit.framework.TestSuite; -import junit.textui.TestRunner; /** * Unit tests for {@link org.apache.commons.lang3.text.CompositeFormat}. */ public class CompositeFormatTest extends TestCase { - /** - * Main method. - * - * @param args command line arguments, ignored - */ - public static void main(String[] args) { - TestRunner.run(suite()); - } - - /** - * Return a new test suite containing this test case. - * - * @return a new test suite containing this test case - */ - public static Test suite() { - TestSuite suite = new TestSuite(CompositeFormatTest.class); - suite.setName("CompositeFormat Tests"); - return suite; - } - /** * Create a new test case with the specified name. * diff --git a/src/test/org/apache/commons/lang3/text/ExtendedMessageFormatTest.java b/src/test/org/apache/commons/lang3/text/ExtendedMessageFormatTest.java index b45e80331..845a2bd09 100644 --- a/src/test/org/apache/commons/lang3/text/ExtendedMessageFormatTest.java +++ b/src/test/org/apache/commons/lang3/text/ExtendedMessageFormatTest.java @@ -32,11 +32,9 @@ import java.util.Iterator; import java.util.Locale; import java.util.Map; -import org.apache.commons.lang3.SystemUtils; - -import junit.framework.Test; import junit.framework.TestCase; -import junit.framework.TestSuite; + +import org.apache.commons.lang3.SystemUtils; /** * Test case for {@link ExtendedMessageFormat}. @@ -48,17 +46,6 @@ public class ExtendedMessageFormatTest extends TestCase { private final Map registry = new HashMap(); - /** - * Return a new test suite containing this test case. - * - * @return a new test suite containing this test case - */ - public static Test suite() { - TestSuite suite = new TestSuite(ExtendedMessageFormatTest.class); - suite.setName("ExtendedMessageFormat Tests"); - return suite; - } - /** * Create a new test case. * @@ -75,11 +62,6 @@ public class ExtendedMessageFormatTest extends TestCase { registry.put("upper", new UpperCaseFormatFactory()); } - @Override - protected void tearDown() throws Exception { - super.tearDown(); - } - /** * Test extended formats. */ diff --git a/src/test/org/apache/commons/lang3/text/StrBuilderAppendInsertTest.java b/src/test/org/apache/commons/lang3/text/StrBuilderAppendInsertTest.java index dfa9385a6..f78182fa2 100644 --- a/src/test/org/apache/commons/lang3/text/StrBuilderAppendInsertTest.java +++ b/src/test/org/apache/commons/lang3/text/StrBuilderAppendInsertTest.java @@ -22,10 +22,7 @@ import java.util.Collection; import java.util.Collections; import java.util.Iterator; -import junit.framework.Test; import junit.framework.TestCase; -import junit.framework.TestSuite; -import junit.textui.TestRunner; import org.apache.commons.lang3.SystemUtils; @@ -47,26 +44,6 @@ public class StrBuilderAppendInsertTest extends TestCase { } }; - /** - * Main method. - * - * @param args command line arguments, ignored - */ - public static void main(String[] args) { - TestRunner.run(suite()); - } - - /** - * Return a new test suite containing this test case. - * - * @return a new test suite containing this test case - */ - public static Test suite() { - TestSuite suite = new TestSuite(StrBuilderAppendInsertTest.class); - suite.setName("StrBuilder Tests"); - return suite; - } - /** * Create a new test case with the specified name. * diff --git a/src/test/org/apache/commons/lang3/text/StrBuilderTest.java b/src/test/org/apache/commons/lang3/text/StrBuilderTest.java index c5146f192..5e8a34020 100644 --- a/src/test/org/apache/commons/lang3/text/StrBuilderTest.java +++ b/src/test/org/apache/commons/lang3/text/StrBuilderTest.java @@ -21,10 +21,7 @@ import java.io.Reader; import java.io.Writer; import java.util.Arrays; -import junit.framework.Test; import junit.framework.TestCase; -import junit.framework.TestSuite; -import junit.textui.TestRunner; import org.apache.commons.lang3.ArrayUtils; @@ -36,26 +33,6 @@ import org.apache.commons.lang3.ArrayUtils; */ public class StrBuilderTest extends TestCase { - /** - * Main method. - * - * @param args command line arguments, ignored - */ - public static void main(String[] args) { - TestRunner.run(suite()); - } - - /** - * Return a new test suite containing this test case. - * - * @return a new test suite containing this test case - */ - public static Test suite() { - TestSuite suite = new TestSuite(StrBuilderTest.class); - suite.setName("StrBuilder Tests"); - return suite; - } - /** * Create a new test case with the specified name. * diff --git a/src/test/org/apache/commons/lang3/text/StrLookupTest.java b/src/test/org/apache/commons/lang3/text/StrLookupTest.java index fe1a0dfa8..a9feb5dd6 100644 --- a/src/test/org/apache/commons/lang3/text/StrLookupTest.java +++ b/src/test/org/apache/commons/lang3/text/StrLookupTest.java @@ -20,10 +20,7 @@ package org.apache.commons.lang3.text; import java.util.HashMap; import java.util.Map; -import junit.framework.Test; import junit.framework.TestCase; -import junit.framework.TestSuite; -import junit.textui.TestRunner; /** * Test class for StrLookup. @@ -32,36 +29,6 @@ import junit.textui.TestRunner; */ public class StrLookupTest extends TestCase { - /** - * Main method. - * - * @param args command line arguments, ignored - */ - public static void main(String[] args) { - TestRunner.run(suite()); - } - - /** - * Return a new test suite containing this test case. - * - * @return a new test suite containing this test case - */ - public static Test suite() { - TestSuite suite = new TestSuite(StrLookupTest.class); - suite.setName("StrLookup Tests"); - return suite; - } - - @Override - protected void setUp() throws Exception { - super.setUp(); - } - - @Override - protected void tearDown() throws Exception { - super.tearDown(); - } - //----------------------------------------------------------------------- public void testNoneLookup() { assertEquals(null, StrLookup.noneLookup().lookup(null)); diff --git a/src/test/org/apache/commons/lang3/text/StrMatcherTest.java b/src/test/org/apache/commons/lang3/text/StrMatcherTest.java index 08fc27c2e..657fd29e2 100644 --- a/src/test/org/apache/commons/lang3/text/StrMatcherTest.java +++ b/src/test/org/apache/commons/lang3/text/StrMatcherTest.java @@ -17,10 +17,7 @@ package org.apache.commons.lang3.text; -import junit.framework.Test; import junit.framework.TestCase; -import junit.framework.TestSuite; -import junit.textui.TestRunner; /** * Unit tests for {@link org.apache.commons.lang3.text.StrMatcher}. @@ -33,26 +30,6 @@ public class StrMatcherTest extends TestCase { private static final char[] BUFFER2 = "abcdef".toCharArray(); - /** - * Main method. - * - * @param args command line arguments, ignored - */ - public static void main(String[] args) { - TestRunner.run(suite()); - } - - /** - * Return a new test suite containing this test case. - * - * @return a new test suite containing this test case - */ - public static Test suite() { - TestSuite suite = new TestSuite(StrMatcherTest.class); - suite.setName("StrMatcher Tests"); - return suite; - } - /** * Create a new test case with the specified name. * diff --git a/src/test/org/apache/commons/lang3/text/StrSubstitutorTest.java b/src/test/org/apache/commons/lang3/text/StrSubstitutorTest.java index 46aa8fbad..b55d6f583 100644 --- a/src/test/org/apache/commons/lang3/text/StrSubstitutorTest.java +++ b/src/test/org/apache/commons/lang3/text/StrSubstitutorTest.java @@ -20,10 +20,7 @@ package org.apache.commons.lang3.text; import java.util.HashMap; import java.util.Map; -import junit.framework.Test; import junit.framework.TestCase; -import junit.framework.TestSuite; -import junit.textui.TestRunner; import org.apache.commons.lang3.mutable.MutableObject; @@ -37,26 +34,6 @@ public class StrSubstitutorTest extends TestCase { private Map values; - /** - * Main method. - * - * @param args command line arguments, ignored - */ - public static void main(String[] args) { - TestRunner.run(suite()); - } - - /** - * Return a new test suite containing this test case. - * - * @return a new test suite containing this test case - */ - public static Test suite() { - TestSuite suite = new TestSuite(StrSubstitutorTest.class); - suite.setName("StrSubstitutor Tests"); - return suite; - } - @Override protected void setUp() throws Exception { super.setUp(); diff --git a/src/test/org/apache/commons/lang3/text/StrTokenizerTest.java b/src/test/org/apache/commons/lang3/text/StrTokenizerTest.java index 2178f2d6f..27fa5d09e 100644 --- a/src/test/org/apache/commons/lang3/text/StrTokenizerTest.java +++ b/src/test/org/apache/commons/lang3/text/StrTokenizerTest.java @@ -22,10 +22,7 @@ import java.util.Collections; import java.util.List; import java.util.NoSuchElementException; -import junit.framework.Test; import junit.framework.TestCase; -import junit.framework.TestSuite; -import junit.textui.TestRunner; import org.apache.commons.lang3.ArrayUtils; import org.apache.commons.lang3.ObjectUtils; @@ -41,16 +38,6 @@ public class StrTokenizerTest extends TestCase { private static final String TSV_SIMPLE_FIXTURE = "A\tb\tc"; - public static void main(String[] args) { - TestRunner.run(suite()); - } - - public static Test suite() { - TestSuite suite = new TestSuite(StrTokenizerTest.class); - suite.setName("TokenizerTest Tests"); - return suite; - } - /** * JUnit constructor. * diff --git a/src/test/org/apache/commons/lang3/time/DateFormatUtilsTest.java b/src/test/org/apache/commons/lang3/time/DateFormatUtilsTest.java index 6a0ea9b1d..05754d360 100644 --- a/src/test/org/apache/commons/lang3/time/DateFormatUtilsTest.java +++ b/src/test/org/apache/commons/lang3/time/DateFormatUtilsTest.java @@ -22,10 +22,7 @@ import java.util.Calendar; import java.util.Locale; import java.util.TimeZone; -import junit.framework.Test; import junit.framework.TestCase; -import junit.framework.TestSuite; -import junit.textui.TestRunner; /** * TestCase for DateFormatUtils. @@ -38,16 +35,6 @@ import junit.textui.TestRunner; */ public class DateFormatUtilsTest extends TestCase { - public static void main(String[] args) { - TestRunner.run(suite()); - } - - public static Test suite() { - TestSuite suite = new TestSuite(DateFormatUtilsTest.class); - suite.setName("DateFormatUtils Tests"); - return suite; - } - public DateFormatUtilsTest(String s) { super(s); } diff --git a/src/test/org/apache/commons/lang3/time/DateUtilsFragmentTest.java b/src/test/org/apache/commons/lang3/time/DateUtilsFragmentTest.java index 605a26c4d..97f4de1d9 100644 --- a/src/test/org/apache/commons/lang3/time/DateUtilsFragmentTest.java +++ b/src/test/org/apache/commons/lang3/time/DateUtilsFragmentTest.java @@ -19,18 +19,10 @@ package org.apache.commons.lang3.time; import java.util.Calendar; import java.util.Date; -import junit.framework.Test; import junit.framework.TestCase; -import junit.framework.TestSuite; public class DateUtilsFragmentTest extends TestCase { - public static Test suite() { - TestSuite suite = new TestSuite(DateUtilsFragmentTest.class); - suite.setName("DateUtils Fragment Tests"); - return suite; - } - private static final int months = 7; // second final prime before 12 private static final int days = 23; // second final prime before 31 (and valid) private static final int hours = 19; // second final prime before 24 diff --git a/src/test/org/apache/commons/lang3/time/DateUtilsRoundingTest.java b/src/test/org/apache/commons/lang3/time/DateUtilsRoundingTest.java index 565dd8525..73cce6a80 100644 --- a/src/test/org/apache/commons/lang3/time/DateUtilsRoundingTest.java +++ b/src/test/org/apache/commons/lang3/time/DateUtilsRoundingTest.java @@ -23,8 +23,6 @@ import java.util.Date; import java.util.Locale; import junit.framework.TestCase; -import junit.framework.Test; -import junit.framework.TestSuite; /** * These Unit-tests will check all possible extremes when using some rounding-methods of DateUtils. @@ -43,12 +41,6 @@ import junit.framework.TestSuite; // TODO: Add DateUtils.ceil()-tests if method is available public class DateUtilsRoundingTest extends TestCase { - public static Test suite() { - TestSuite suite = new TestSuite(DateUtilsRoundingTest.class); - suite.setName("DateUtils Rounding Tests"); - return suite; - } - DateFormat dateTimeParser; Date januaryOneDate; diff --git a/src/test/org/apache/commons/lang3/time/DateUtilsTest.java b/src/test/org/apache/commons/lang3/time/DateUtilsTest.java index 8198bf05f..0b9722854 100644 --- a/src/test/org/apache/commons/lang3/time/DateUtilsTest.java +++ b/src/test/org/apache/commons/lang3/time/DateUtilsTest.java @@ -30,10 +30,7 @@ import java.util.NoSuchElementException; import java.util.TimeZone; import junit.framework.AssertionFailedError; -import junit.framework.Test; import junit.framework.TestCase; -import junit.framework.TestSuite; -import junit.textui.TestRunner; import org.apache.commons.lang3.SystemUtils; @@ -87,16 +84,6 @@ public class DateUtilsTest extends TestCase { super(name); } - public static void main(String[] args) { - TestRunner.run(suite()); - } - - public static Test suite() { - TestSuite suite = new TestSuite(DateUtilsTest.class); - suite.setName("DateUtils Tests"); - return suite; - } - @Override protected void setUp() throws Exception { super.setUp(); @@ -151,11 +138,6 @@ public class DateUtilsTest extends TestCase { TimeZone.setDefault(defaultZone); } - @Override - protected void tearDown() throws Exception { - super.tearDown(); - } - //----------------------------------------------------------------------- public void testConstructor() { assertNotNull(new DateUtils()); diff --git a/src/test/org/apache/commons/lang3/time/DurationFormatUtilsTest.java b/src/test/org/apache/commons/lang3/time/DurationFormatUtilsTest.java index 2627fc178..de27af809 100644 --- a/src/test/org/apache/commons/lang3/time/DurationFormatUtilsTest.java +++ b/src/test/org/apache/commons/lang3/time/DurationFormatUtilsTest.java @@ -22,10 +22,7 @@ import java.lang.reflect.Modifier; import java.util.Calendar; import java.util.TimeZone; -import junit.framework.Test; import junit.framework.TestCase; -import junit.framework.TestSuite; -import junit.textui.TestRunner; /** * TestCase for DurationFormatUtils. @@ -38,16 +35,6 @@ import junit.textui.TestRunner; */ public class DurationFormatUtilsTest extends TestCase { - public static void main(String[] args) { - TestRunner.run(suite()); - } - - public static Test suite() { - TestSuite suite = new TestSuite(DurationFormatUtilsTest.class); - suite.setName("DurationFormatUtils Tests"); - return suite; - } - public DurationFormatUtilsTest(String s) { super(s); } diff --git a/src/test/org/apache/commons/lang3/time/FastDateFormatTest.java b/src/test/org/apache/commons/lang3/time/FastDateFormatTest.java index 4a20ddf1d..45156e3a4 100644 --- a/src/test/org/apache/commons/lang3/time/FastDateFormatTest.java +++ b/src/test/org/apache/commons/lang3/time/FastDateFormatTest.java @@ -23,10 +23,7 @@ import java.util.GregorianCalendar; import java.util.Locale; import java.util.TimeZone; -import junit.framework.Test; import junit.framework.TestCase; -import junit.framework.TestSuite; -import junit.textui.TestRunner; import org.apache.commons.lang3.SerializationUtils; @@ -45,27 +42,6 @@ public class FastDateFormatTest extends TestCase { super(name); } - public static void main(String[] args) { - TestRunner.run(suite()); - } - - public static Test suite() { - TestSuite suite = new TestSuite(FastDateFormatTest.class); - suite.setName("FastDateFormat Tests"); - - return suite; - } - - @Override - protected void setUp() throws Exception { - super.setUp(); - } - - @Override - protected void tearDown() throws Exception { - super.tearDown(); - } - public void test_getInstance() { FastDateFormat format1 = FastDateFormat.getInstance(); FastDateFormat format2 = FastDateFormat.getInstance(); diff --git a/src/test/org/apache/commons/lang3/time/StopWatchTest.java b/src/test/org/apache/commons/lang3/time/StopWatchTest.java index 327f22774..26346b246 100644 --- a/src/test/org/apache/commons/lang3/time/StopWatchTest.java +++ b/src/test/org/apache/commons/lang3/time/StopWatchTest.java @@ -17,10 +17,7 @@ package org.apache.commons.lang3.time; import junit.framework.Assert; -import junit.framework.Test; import junit.framework.TestCase; -import junit.framework.TestSuite; -import junit.textui.TestRunner; /** * TestCase for StopWatch. @@ -30,16 +27,6 @@ import junit.textui.TestRunner; */ public class StopWatchTest extends TestCase { - public static void main(String[] args) { - TestRunner.run(suite()); - } - - public static Test suite() { - TestSuite suite = new TestSuite(StopWatchTest.class); - suite.setName("StopWatch Tests"); - return suite; - } - public StopWatchTest(String s) { super(s); }