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
This commit is contained in:
parent
2f8f67ab29
commit
a7bbdfb54b
|
@ -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;
|
||||
|
|
|
@ -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());
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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());
|
||||
|
|
|
@ -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));
|
||||
}
|
||||
|
|
|
@ -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()));
|
||||
|
|
|
@ -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()));
|
||||
|
|
|
@ -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());
|
||||
|
|
|
@ -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());
|
||||
|
|
|
@ -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 {
|
||||
}
|
||||
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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());
|
||||
|
|
|
@ -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());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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());
|
||||
|
|
|
@ -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());
|
||||
|
|
|
@ -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() {
|
||||
|
|
|
@ -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() {
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
|
||||
|
|
|
@ -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());
|
||||
|
|
|
@ -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));
|
||||
|
|
|
@ -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());
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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());
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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() {
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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() {
|
||||
|
|
|
@ -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 {
|
||||
}
|
||||
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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() {
|
||||
|
|
|
@ -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());
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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());
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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());
|
||||
|
|
|
@ -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());
|
||||
|
|
|
@ -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<String>().getValue());
|
||||
|
|
|
@ -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());
|
||||
|
|
|
@ -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<?>, 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();
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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<?>, 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();
|
||||
|
|
|
@ -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.
|
||||
*
|
||||
|
|
|
@ -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<String, FormatFactory> registry = new HashMap<String, FormatFactory>();
|
||||
|
||||
/**
|
||||
* 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.
|
||||
*/
|
||||
|
|
|
@ -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.
|
||||
*
|
||||
|
|
|
@ -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.
|
||||
*
|
||||
|
|
|
@ -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));
|
||||
|
|
|
@ -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.
|
||||
*
|
||||
|
|
|
@ -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<String, String> 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();
|
||||
|
|
|
@ -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.
|
||||
*
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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());
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue