Remove unnecessary main() and suite() methods

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/collections/trunk@1023744 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Sebastian Bazley 2010-10-18 11:36:20 +00:00
parent 7de09a809c
commit 9dfb8286f3
121 changed files with 0 additions and 1062 deletions

View File

@ -18,9 +18,6 @@ package org.apache.commons.collections;
import java.util.ArrayList;
import junit.framework.Test;
import junit.framework.TestSuite;
import org.apache.commons.collections.list.AbstractTestList;
/**
@ -36,15 +33,6 @@ public abstract class TestArrayList<E> extends AbstractTestList<E> {
super(testName);
}
public static Test suite() {
return new TestSuite(TestArrayList.class);
}
public static void main(String args[]) {
String[] testCaseName = { TestArrayList.class.getName()};
junit.textui.TestRunner.main(testCaseName);
}
/**
* {@inheritDoc}
*/

View File

@ -37,11 +37,6 @@ public class TestArrayStack<E> extends TestArrayList<E> {
return BulkTest.makeSuite(TestArrayStack.class);
}
public static void main(String args[]) {
String[] testCaseName = { TestArrayStack.class.getName() };
junit.textui.TestRunner.main(testCaseName);
}
@Override
public ArrayStack<E> makeObject() {
return new ArrayStack<E>();

View File

@ -50,10 +50,6 @@ import org.junit.Test;
* @version $Revision$ $Date$
*/
public class TestCollectionUtils extends MockTestCase {
public static void main(String args[]) {
String[] testCaseName = { TestCollectionUtils.class.getName() };
junit.textui.TestRunner.main(testCaseName);
}
/**
* Collection of {@link Integer}s

View File

@ -22,9 +22,7 @@ import java.io.IOException;
import java.util.Iterator;
import java.util.Properties;
import junit.framework.Test;
import junit.framework.TestCase;
import junit.framework.TestSuite;
/**
* Tests some basic functions of the ExtendedProperties class.
@ -45,15 +43,6 @@ public class TestExtendedProperties extends TestCase {
super(testName);
}
public static Test suite() {
return new TestSuite(TestExtendedProperties.class);
}
public static void main(String args[]) {
String[] testCaseName = { TestExtendedProperties.class.getName()};
junit.textui.TestRunner.main(testCaseName);
}
public void testRetrieve() {
/*
* should be empty and return null

View File

@ -44,10 +44,6 @@ public class TestIteratorUtils extends BulkTest {
super(name);
}
public static void main(String args[]) {
junit.textui.TestRunner.run(suite());
}
public static Test suite() {
return BulkTest.makeSuite(TestIteratorUtils.class);
}

View File

@ -24,10 +24,6 @@ import java.util.HashMap;
import java.util.List;
import java.util.Map;
import junit.framework.Test;
import junit.framework.TestSuite;
import junit.textui.TestRunner;
import org.apache.commons.collections.functors.CloneTransformer;
import org.apache.commons.collections.functors.ConstantTransformer;
import org.apache.commons.collections.functors.EqualPredicate;
@ -59,21 +55,6 @@ public class TestTransformerUtils extends junit.framework.TestCase {
super(name);
}
/**
* Main.
* @param args
*/
public static void main(String[] args) {
TestRunner.run(suite());
}
/**
* Return class as a test suite.
*/
public static Test suite() {
return new TestSuite(TestTransformerUtils.class);
}
/**
* Set up instance variables required by this test case.
*/

View File

@ -33,11 +33,6 @@ public abstract class TestTreeMap<K, V> extends AbstractTestMap<K, V> {
super(testName);
}
public static void main(String args[]) {
String[] testCaseName = { TestTreeMap.class.getName()};
junit.textui.TestRunner.main(testCaseName);
}
@Override
public boolean isAllowNullKey() {
return false;

View File

@ -16,9 +16,6 @@
*/
package org.apache.commons.collections.bag;
import junit.framework.Test;
import junit.framework.TestSuite;
import org.apache.commons.collections.Bag;
/**
@ -35,15 +32,6 @@ public class TestHashBag<T> extends AbstractTestBag<T> {
super(testName);
}
public static Test suite() {
return new TestSuite(TestHashBag.class);
}
public static void main(String args[]) {
String[] testCaseName = { TestHashBag.class.getName()};
junit.textui.TestRunner.main(testCaseName);
}
@Override
public Bag<T> makeObject() {
return new HashBag<T>();

View File

@ -18,9 +18,6 @@ package org.apache.commons.collections.bag;
import java.util.Set;
import junit.framework.Test;
import junit.framework.TestSuite;
import org.apache.commons.collections.Bag;
import org.apache.commons.collections.Predicate;
import org.apache.commons.collections.functors.TruePredicate;
@ -40,15 +37,6 @@ public class TestPredicatedBag<T> extends AbstractTestBag<T> {
super(testName);
}
public static Test suite() {
return new TestSuite(TestPredicatedBag.class);
}
public static void main(String args[]) {
String[] testCaseName = { TestPredicatedBag.class.getName()};
junit.textui.TestRunner.main(testCaseName);
}
//--------------------------------------------------------------------------
protected Predicate<T> stringPredicate() {

View File

@ -18,9 +18,6 @@ package org.apache.commons.collections.bag;
import java.util.Comparator;
import junit.framework.Test;
import junit.framework.TestSuite;
import org.apache.commons.collections.Predicate;
import org.apache.commons.collections.SortedBag;
import org.apache.commons.collections.functors.TruePredicate;
@ -42,15 +39,6 @@ public class TestPredicatedSortedBag<T> extends AbstractTestSortedBag<T> {
super(testName);
}
public static Test suite() {
return new TestSuite(TestPredicatedSortedBag.class);
}
public static void main(String args[]) {
String[] testCaseName = { TestPredicatedSortedBag.class.getName()};
junit.textui.TestRunner.main(testCaseName);
}
//--------------------------------------------------------------------------
protected Predicate<T> stringPredicate() {

View File

@ -16,9 +16,6 @@
*/
package org.apache.commons.collections.bag;
import junit.framework.Test;
import junit.framework.TestSuite;
import org.apache.commons.collections.Bag;
import org.apache.commons.collections.Transformer;
import org.apache.commons.collections.collection.TestTransformedCollection;
@ -38,15 +35,6 @@ public class TestTransformedBag<T> extends AbstractTestBag<T> {
super(testName);
}
public static Test suite() {
return new TestSuite(TestTransformedBag.class);
}
public static void main(String args[]) {
String[] testCaseName = { TestTransformedBag.class.getName()};
junit.textui.TestRunner.main(testCaseName);
}
@Override
@SuppressWarnings("unchecked")
public Bag<T> makeObject() {

View File

@ -16,9 +16,6 @@
*/
package org.apache.commons.collections.bag;
import junit.framework.Test;
import junit.framework.TestSuite;
import org.apache.commons.collections.Bag;
import org.apache.commons.collections.SortedBag;
import org.apache.commons.collections.Transformer;
@ -39,15 +36,6 @@ public class TestTransformedSortedBag<T> extends AbstractTestSortedBag<T> {
super(testName);
}
public static Test suite() {
return new TestSuite(TestTransformedSortedBag.class);
}
public static void main(String args[]) {
String[] testCaseName = { TestTransformedSortedBag.class.getName()};
junit.textui.TestRunner.main(testCaseName);
}
@Override
@SuppressWarnings("unchecked")
public SortedBag<T> makeObject() {

View File

@ -16,9 +16,6 @@
*/
package org.apache.commons.collections.bag;
import junit.framework.Test;
import junit.framework.TestSuite;
import org.apache.commons.collections.Bag;
import org.apache.commons.collections.SortedBag;
@ -36,15 +33,6 @@ public class TestTreeBag<T> extends AbstractTestSortedBag<T> {
super(testName);
}
public static Test suite() {
return new TestSuite(TestTreeBag.class);
}
public static void main(String args[]) {
String[] testCaseName = { TestTreeBag.class.getName() };
junit.textui.TestRunner.main(testCaseName);
}
@Override
public SortedBag<T> makeObject() {
return new TreeBag<T>();

View File

@ -19,9 +19,6 @@ package org.apache.commons.collections.bidimap;
import java.util.SortedMap;
import java.util.TreeMap;
import junit.framework.Test;
import junit.framework.TestSuite;
import org.apache.commons.collections.OrderedBidiMap;
/**
@ -36,10 +33,6 @@ public class TestAbstractOrderedBidiMapDecorator<K, V>
super(testName);
}
public static Test suite() {
return new TestSuite(TestAbstractOrderedBidiMapDecorator.class);
}
/**
* {@inheritDoc}
*/

View File

@ -17,8 +17,6 @@
package org.apache.commons.collections.bidimap;
import junit.framework.Test;
import junit.textui.TestRunner;
import org.apache.commons.collections.BulkTest;
/**
@ -31,10 +29,6 @@ import org.apache.commons.collections.BulkTest;
*/
public class TestDualHashBidiMap<K, V> extends AbstractTestBidiMap<K, V> {
public static void main(String[] args) {
TestRunner.run(suite());
}
public static Test suite() {
return BulkTest.makeSuite(TestDualHashBidiMap.class);
}

View File

@ -17,8 +17,6 @@
package org.apache.commons.collections.bidimap;
import junit.framework.Test;
import junit.textui.TestRunner;
import org.apache.commons.collections.BulkTest;
/**
@ -31,10 +29,6 @@ import org.apache.commons.collections.BulkTest;
*/
public class TestDualTreeBidiMap<K extends Comparable<K>, V extends Comparable<V>> extends AbstractTestSortedBidiMap<K, V> {
public static void main(String[] args) {
TestRunner.run(suite());
}
public static Test suite() {
return BulkTest.makeSuite(TestDualTreeBidiMap.class);
}

View File

@ -27,8 +27,6 @@ import java.util.List;
import java.util.TreeMap;
import junit.framework.Test;
import junit.textui.TestRunner;
import org.apache.commons.collections.BulkTest;
import org.apache.commons.collections.SortedBidiMap;
import org.apache.commons.collections.comparators.ComparableComparator;
@ -45,10 +43,6 @@ import org.apache.commons.collections.comparators.ReverseComparator;
*/
public class TestDualTreeBidiMap2<K extends Comparable<K>, V extends Comparable<V>> extends AbstractTestSortedBidiMap<K, V> {
public static void main(String[] args) {
TestRunner.run(suite());
}
public static Test suite() {
return BulkTest.makeSuite(TestDualTreeBidiMap2.class);
}

View File

@ -19,8 +19,6 @@ package org.apache.commons.collections.bidimap;
import java.util.TreeMap;
import junit.framework.Test;
import junit.textui.TestRunner;
import org.apache.commons.collections.BidiMap;
import org.apache.commons.collections.BulkTest;
@ -33,10 +31,6 @@ import org.apache.commons.collections.BulkTest;
*/
public class TestTreeBidiMap<K extends Comparable<K>, V extends Comparable<V>> extends AbstractTestOrderedBidiMap<K, V> {
public static void main(String[] args) {
TestRunner.run(suite());
}
public static Test suite() {
return BulkTest.makeSuite(TestTreeBidiMap.class);
}

View File

@ -20,8 +20,6 @@ import java.util.HashMap;
import java.util.Map;
import junit.framework.Test;
import junit.textui.TestRunner;
import org.apache.commons.collections.BidiMap;
import org.apache.commons.collections.BulkTest;
@ -34,10 +32,6 @@ import org.apache.commons.collections.BulkTest;
*/
public class TestUnmodifiableBidiMap<K, V> extends AbstractTestBidiMap<K, V> {
public static void main(String[] args) {
TestRunner.run(suite());
}
public static Test suite() {
return BulkTest.makeSuite(TestUnmodifiableBidiMap.class);
}

View File

@ -20,8 +20,6 @@ import java.util.Map;
import java.util.TreeMap;
import junit.framework.Test;
import junit.textui.TestRunner;
import org.apache.commons.collections.BidiMap;
import org.apache.commons.collections.BulkTest;
import org.apache.commons.collections.OrderedBidiMap;
@ -35,10 +33,6 @@ import org.apache.commons.collections.OrderedBidiMap;
*/
public class TestUnmodifiableOrderedBidiMap<K extends Comparable<K>, V extends Comparable<V>> extends AbstractTestOrderedBidiMap<K, V> {
public static void main(String[] args) {
TestRunner.run(suite());
}
public static Test suite() {
return BulkTest.makeSuite(TestUnmodifiableOrderedBidiMap.class);
}

View File

@ -20,8 +20,6 @@ import java.util.SortedMap;
import java.util.TreeMap;
import junit.framework.Test;
import junit.textui.TestRunner;
import org.apache.commons.collections.BulkTest;
import org.apache.commons.collections.SortedBidiMap;
@ -34,10 +32,6 @@ import org.apache.commons.collections.SortedBidiMap;
*/
public class TestUnmodifiableSortedBidiMap<K extends Comparable<K>, V extends Comparable<V>> extends AbstractTestSortedBidiMap<K, V> {
public static void main(String[] args) {
TestRunner.run(suite());
}
public static Test suite() {
return BulkTest.makeSuite(TestUnmodifiableSortedBidiMap.class);
}

View File

@ -16,8 +16,6 @@
*/
package org.apache.commons.collections.buffer;
import junit.framework.Test;
import junit.framework.TestSuite;
import org.apache.commons.collections.AbstractTestObject;
import org.apache.commons.collections.Buffer;
import org.apache.commons.collections.BufferUnderflowException;
@ -43,15 +41,6 @@ public class TestBlockingBuffer<E> extends AbstractTestObject {
super(testName);
}
public static Test suite() {
return new TestSuite(TestBlockingBuffer.class);
}
public static void main(String args[]) {
String[] testCaseName = { TestBlockingBuffer.class.getName() };
junit.textui.TestRunner.main(testCaseName);
}
@Override
public Buffer<E> makeObject() {
return BlockingBuffer.decorate(new MyBuffer<E>());

View File

@ -25,24 +25,12 @@ import java.util.Iterator;
import java.util.Collections;
import java.util.Arrays;
import junit.framework.Test;
import junit.framework.TestSuite;
public class TestBoundedBuffer<E> extends AbstractTestObject {
public TestBoundedBuffer(String testName) {
super(testName);
}
public static Test suite() {
return new TestSuite(TestBoundedBuffer.class);
}
public static void main(String args[]) {
String[] testCaseName = { TestBoundedBuffer.class.getName() };
junit.textui.TestRunner.main(testCaseName);
}
@Override
public String getCompatibilityVersion() {
return "3.2";

View File

@ -26,8 +26,6 @@ import java.util.Iterator;
import java.util.List;
import junit.framework.Test;
import junit.textui.TestRunner;
import org.apache.commons.collections.Buffer;
import org.apache.commons.collections.BufferUnderflowException;
import org.apache.commons.collections.BulkTest;
@ -50,10 +48,6 @@ public class TestCircularFifoBuffer<E> extends AbstractTestCollection<E> {
return BulkTest.makeSuite(TestCircularFifoBuffer.class);
}
public static void main(String args[]) {
TestRunner.run(TestCircularFifoBuffer.class);
}
//-----------------------------------------------------------------------
/**
* Runs through the regular verifications, but also verifies that

View File

@ -18,9 +18,6 @@ package org.apache.commons.collections.buffer;
import java.util.Collection;
import junit.framework.Test;
import junit.framework.TestSuite;
import org.apache.commons.collections.ArrayStack;
import org.apache.commons.collections.Buffer;
import org.apache.commons.collections.BufferUnderflowException;
@ -42,15 +39,6 @@ public class TestPredicatedBuffer<E> extends TestPredicatedCollection<E> {
super(testName);
}
public static Test suite() {
return new TestSuite(TestPredicatedBuffer.class);
}
public static void main(String args[]) {
String[] testCaseName = { TestPredicatedBuffer.class.getName()};
junit.textui.TestRunner.main(testCaseName);
}
//---------------------------------------------------------------
protected Buffer<E> decorateCollection(Buffer<E> buffer, Predicate<E> predicate) {

View File

@ -24,9 +24,6 @@ import java.util.Comparator;
import java.util.Iterator;
import java.util.Random;
import junit.framework.Test;
import junit.framework.TestSuite;
import org.apache.commons.collections.Buffer;
import org.apache.commons.collections.BufferUnderflowException;
import org.apache.commons.collections.ComparatorUtils;
@ -44,14 +41,6 @@ import org.apache.commons.collections.comparators.ReverseComparator;
*/
public class TestPriorityBuffer<E> extends AbstractTestCollection<E> {
public static void main(String[] args) {
junit.textui.TestRunner.run(suite());
}
public static Test suite() {
return new TestSuite(TestPriorityBuffer.class);
}
public TestPriorityBuffer(String testName) {
super(testName);
}

View File

@ -19,9 +19,6 @@ package org.apache.commons.collections.buffer;
import java.util.Arrays;
import java.util.Collection;
import junit.framework.Test;
import junit.framework.TestSuite;
import org.apache.commons.collections.ArrayStack;
import org.apache.commons.collections.Buffer;
import org.apache.commons.collections.collection.AbstractTestCollection;
@ -42,15 +39,6 @@ public class TestSynchronizedBuffer<E> extends AbstractTestCollection<E> {
super(testName);
}
public static Test suite() {
return new TestSuite(TestSynchronizedBuffer.class);
}
public static void main(String args[]) {
String[] testCaseName = { TestSynchronizedBuffer.class.getName()};
junit.textui.TestRunner.main(testCaseName);
}
//-----------------------------------------------------------------------
@Override
public Buffer<E> makeObject() {

View File

@ -16,10 +16,7 @@
*/
package org.apache.commons.collections.buffer;
import junit.framework.Test;
import junit.framework.TestCase;
import junit.framework.TestSuite;
import org.apache.commons.collections.ArrayStack;
import org.apache.commons.collections.Buffer;
import org.apache.commons.collections.collection.TestTransformedCollection;
@ -39,15 +36,6 @@ public class TestTransformedBuffer extends TestCase {
super(testName);
}
public static Test suite() {
return new TestSuite(TestTransformedBuffer.class);
}
public static void main(String args[]) {
String[] testCaseName = { TestTransformedBuffer.class.getName()};
junit.textui.TestRunner.main(testCaseName);
}
public void testTransformedBuffer() {
Buffer<Object> buffer = TransformedBuffer.decorate(new ArrayStack<Object>(), TestTransformedCollection.STRING_TO_INTEGER_TRANSFORMER);
assertEquals(0, buffer.size());

View File

@ -19,9 +19,6 @@ package org.apache.commons.collections.buffer;
import java.util.Arrays;
import java.util.Collection;
import junit.framework.Test;
import junit.framework.TestSuite;
import org.apache.commons.collections.ArrayStack;
import org.apache.commons.collections.Buffer;
import org.apache.commons.collections.collection.AbstractTestCollection;
@ -42,15 +39,6 @@ public class TestUnmodifiableBuffer<E> extends AbstractTestCollection<E> {
super(testName);
}
public static Test suite() {
return new TestSuite(TestUnmodifiableBuffer.class);
}
public static void main(String args[]) {
String[] testCaseName = { TestUnmodifiableBuffer.class.getName()};
junit.textui.TestRunner.main(testCaseName);
}
//-----------------------------------------------------------------------
@Override
public Collection<E> makeObject() {

View File

@ -23,9 +23,6 @@ import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
import junit.framework.Test;
import junit.framework.TestSuite;
/**
* Extension of {@link AbstractTestCollection} for exercising the
* {@link CompositeCollection} implementation.
@ -42,15 +39,6 @@ public class TestCompositeCollection<E> extends AbstractTestCollection<E> {
super(name);
}
public static Test suite() {
return new TestSuite(TestCompositeCollection.class);
}
public static void main(String args[]) {
String[] testCaseName = { TestCompositeCollection.class.getName()};
junit.textui.TestRunner.main(testCaseName);
}
//-----------------------------------------------------------------------------
/**
* Run stock collection tests without Mutator, so turn off add, remove

View File

@ -21,9 +21,6 @@ import java.util.Arrays;
import java.util.Collection;
import java.util.List;
import junit.framework.Test;
import junit.framework.TestSuite;
import org.apache.commons.collections.Predicate;
import org.apache.commons.collections.functors.TruePredicate;
@ -42,15 +39,6 @@ public class TestPredicatedCollection<E> extends AbstractTestCollection<E> {
super(name);
}
public static Test suite() {
return new TestSuite(TestPredicatedCollection.class);
}
public static void main(String args[]) {
String[] testCaseName = { TestPredicatedCollection.class.getName()};
junit.textui.TestRunner.main(testCaseName);
}
//------------------------------------------------------------------------
protected Predicate<E> truePredicate = TruePredicate.<E>truePredicate();

View File

@ -20,9 +20,6 @@ import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import junit.framework.Test;
import junit.framework.TestSuite;
/**
* Extension of {@link AbstractTestCollection} for exercising the
* {@link SynchronizedCollection} implementation.
@ -39,15 +36,6 @@ public class TestSynchronizedCollection<E> extends AbstractTestCollection<E> {
super(testName);
}
public static Test suite() {
return new TestSuite(TestSynchronizedCollection.class);
}
public static void main(String args[]) {
String[] testCaseName = { TestSynchronizedCollection.class.getName()};
junit.textui.TestRunner.main(testCaseName);
}
//-----------------------------------------------------------------------
@Override
public Collection<E> makeObject() {

View File

@ -21,9 +21,6 @@ import java.util.Arrays;
import java.util.Collection;
import java.util.List;
import junit.framework.Test;
import junit.framework.TestSuite;
import org.apache.commons.collections.Transformer;
import org.apache.commons.collections.TransformerUtils;
@ -51,15 +48,6 @@ public class TestTransformedCollection extends AbstractTestCollection<Object> {
super(testName);
}
public static Test suite() {
return new TestSuite(TestTransformedCollection.class);
}
public static void main(String args[]) {
String[] testCaseName = { TestTransformedCollection.class.getName()};
junit.textui.TestRunner.main(testCaseName);
}
//-----------------------------------------------------------------------
@Override
public Collection<Object> makeConfirmedCollection() {

View File

@ -21,9 +21,6 @@ import java.util.Arrays;
import java.util.Collection;
import java.util.List;
import junit.framework.Test;
import junit.framework.TestSuite;
/**
* Extension of {@link AbstractTestCollection} for exercising the
* {@link UnmodifiableCollection} implementation.
@ -40,15 +37,6 @@ public class TestUnmodifiableCollection<E> extends AbstractTestCollection<E> {
super(testName);
}
public static Test suite() {
return new TestSuite(TestUnmodifiableCollection.class);
}
public static void main(String args[]) {
String[] testCaseName = { TestUnmodifiableCollection.class.getName()};
junit.textui.TestRunner.main(testCaseName);
}
//-----------------------------------------------------------------------
@Override
public Collection<E> makeObject() {

View File

@ -20,9 +20,6 @@ import java.util.ArrayList;
import java.util.Comparator;
import java.util.List;
import junit.framework.Test;
import junit.framework.TestSuite;
/**
* Tests for {@link BooleanComparator}.
*
@ -39,10 +36,6 @@ public class TestBooleanComparator extends AbstractTestComparator<Boolean> {
super(testName);
}
public static Test suite() {
return new TestSuite(TestBooleanComparator.class);
}
// collections testing framework
// ------------------------------------------------------------------------

View File

@ -20,9 +20,6 @@ import java.util.Comparator;
import java.util.LinkedList;
import java.util.List;
import junit.framework.Test;
import junit.framework.TestSuite;
/**
* Tests for ComparableComparator.
*
@ -36,10 +33,6 @@ public class TestComparableComparator extends AbstractTestComparator<Integer> {
super(testName);
}
public static Test suite() {
return new TestSuite(TestComparableComparator.class);
}
@Override
public Comparator<Integer> makeObject() {
return new ComparableComparator<Integer>();

View File

@ -21,9 +21,6 @@ import java.util.Comparator;
import java.util.LinkedList;
import java.util.List;
import junit.framework.Test;
import junit.framework.TestSuite;
/**
* Tests for ComparatorChain.
*
@ -37,10 +34,6 @@ public class TestComparatorChain extends AbstractTestComparator<TestComparatorCh
super(testName);
}
public static Test suite() {
return new TestSuite(TestComparatorChain.class);
}
@Override
public Comparator<PseudoRow> makeObject() {
ComparatorChain<PseudoRow> chain = new ComparatorChain<PseudoRow>(new ColumnComparator(0));

View File

@ -22,9 +22,7 @@ import java.util.LinkedList;
import java.util.List;
import java.util.Random;
import junit.framework.Test;
import junit.framework.TestCase;
import junit.framework.TestSuite;
/**
* Test class for FixedOrderComparator.
@ -60,14 +58,6 @@ public class TestFixedOrderComparator extends TestCase {
super(name);
}
public static Test suite() {
return new TestSuite(TestFixedOrderComparator.class);
}
public static void main(String args[]) {
junit.textui.TestRunner.run(suite());
}
//
// Set up and tear down
//

View File

@ -25,9 +25,6 @@ import java.util.Comparator;
import java.util.LinkedList;
import java.util.List;
import junit.framework.Test;
import junit.framework.TestSuite;
/**
* Tests for ReverseComparator.
*
@ -41,10 +38,6 @@ public class TestReverseComparator extends AbstractTestComparator<Integer> {
super(testName);
}
public static Test suite() {
return new TestSuite(TestReverseComparator.class);
}
/**
* For the purposes of this test, return a
* ReverseComparator that wraps the java.util.Collections.reverseOrder()

View File

@ -1,6 +1,5 @@
package org.apache.commons.collections.functors;
import junit.framework.JUnit4TestAdapter;
import org.apache.commons.collections.Predicate;
import static org.apache.commons.collections.functors.AllPredicate.allPredicate;
@ -21,15 +20,6 @@ import java.util.Collections;
*/
public class TestAllPredicate extends TestAnyAllOnePredicate<Integer> {
/**
* Creates a JUnit3 test suite.
*
* @return a JUnit3 test suite
*/
public static junit.framework.Test suite() {
return new JUnit4TestAdapter(TestAllPredicate.class);
}
/**
* Creates a new <code>TestAllPredicate</code>.
*/

View File

@ -19,9 +19,6 @@ package org.apache.commons.collections.iterators;
import java.util.Iterator;
import java.util.NoSuchElementException;
import junit.framework.Test;
import junit.framework.TestSuite;
/**
* Tests the ArrayIterator to ensure that the next() method will actually
* perform the iteration rather than the hasNext() method.
@ -38,10 +35,6 @@ public class TestArrayIterator<E> extends AbstractTestIterator<E> {
protected String[] testArray = { "One", "Two", "Three" };
public static Test suite() {
return new TestSuite(TestArrayIterator.class);
}
public TestArrayIterator(String testName) {
super(testName);
}

View File

@ -19,9 +19,6 @@ package org.apache.commons.collections.iterators;
import java.util.Iterator;
import java.util.NoSuchElementException;
import junit.framework.Test;
import junit.framework.TestSuite;
/**
* Tests the ArrayIterator with primitive type arrays.
*
@ -34,10 +31,6 @@ public class TestArrayIterator2<E> extends AbstractTestIterator<E> {
protected int[] testArray = { 2, 4, 6, 8 };
public static Test suite() {
return new TestSuite(TestArrayIterator2.class);
}
public TestArrayIterator2(String testName) {
super(testName);
}

View File

@ -20,9 +20,6 @@ import java.util.Arrays;
import java.util.ListIterator;
import java.util.NoSuchElementException;
import junit.framework.Test;
import junit.framework.TestSuite;
/**
* Test the ArrayListIterator class.
*
@ -35,10 +32,6 @@ public class TestArrayListIterator<E> extends TestArrayIterator<E> {
super(testName);
}
public static Test suite() {
return new TestSuite(TestArrayListIterator.class);
}
@Override
public ArrayListIterator<E> makeEmptyIterator() {
return new ArrayListIterator<E>(new Object[0]);

View File

@ -16,9 +16,6 @@
*/
package org.apache.commons.collections.iterators;
import junit.framework.Test;
import junit.framework.TestSuite;
/**
* Test the ArrayListIterator class with primitives.
*
@ -31,10 +28,6 @@ public class TestArrayListIterator2<E> extends TestArrayIterator2<E> {
super(testName);
}
public static Test suite() {
return new TestSuite(TestArrayListIterator2.class);
}
@Override
public ArrayListIterator<E> makeEmptyIterator() {
return new ArrayListIterator<E>(new int[0]);

View File

@ -19,9 +19,6 @@ package org.apache.commons.collections.iterators;
import java.util.ArrayList;
import java.util.Comparator;
import junit.framework.Test;
import junit.framework.TestSuite;
import org.apache.commons.collections.comparators.ComparableComparator;
/**
@ -38,10 +35,6 @@ public class TestCollatingIterator extends AbstractTestIterator<Integer> {
super(testName);
}
public static Test suite() {
return new TestSuite(TestCollatingIterator.class);
}
//--------------------------------------------------------------- Lifecycle
private Comparator<Integer> comparator = null;

View File

@ -25,9 +25,6 @@ import java.util.Iterator;
import java.util.List;
import java.util.NoSuchElementException;
import junit.framework.Test;
import junit.framework.TestSuite;
import org.apache.commons.collections.Predicate;
import org.apache.commons.collections.functors.NotNullPredicate;
@ -68,13 +65,6 @@ public class TestFilterIterator<E> extends AbstractTestIterator<E> {
iterator = null;
}
/**
* Return the tests included in this test suite.
*/
public static Test suite() {
return (new TestSuite(TestFilterIterator.class));
}
/**
* Returns an full iterator wrapped in a
* FilterIterator that blocks all the elements

View File

@ -21,10 +21,7 @@ import java.util.List;
import java.util.ListIterator;
import java.util.Random;
import junit.framework.Test;
import junit.framework.TestCase;
import junit.framework.TestSuite;
import org.apache.commons.collections.Predicate;
/**
@ -39,15 +36,6 @@ public class TestFilterListIterator extends TestCase {
super(testName);
}
public static Test suite() {
return new TestSuite(TestFilterListIterator.class);
}
public static void main(String args[]) {
String[] testCaseName = { TestFilterListIterator.class.getName() };
junit.textui.TestRunner.main(testCaseName);
}
private ArrayList<Integer> list = null;
private ArrayList<Integer> odds = null;
private ArrayList<Integer> evens = null;

View File

@ -21,9 +21,6 @@ import java.util.Iterator;
import java.util.List;
import java.util.NoSuchElementException;
import junit.framework.Test;
import junit.framework.TestSuite;
import org.apache.commons.collections.IteratorUtils;
import org.apache.commons.collections.Predicate;
@ -46,10 +43,6 @@ public class TestIteratorChain extends AbstractTestIterator<String> {
protected List<String> list2 = null;
protected List<String> list3 = null;
public static Test suite() {
return new TestSuite(TestIteratorChain.class);
}
public TestIteratorChain(String testName) {
super(testName);
}

View File

@ -21,8 +21,6 @@ import java.util.List;
import java.util.ListIterator;
import java.util.NoSuchElementException;
import junit.framework.Test;
import junit.framework.TestSuite;
import org.apache.commons.collections.ResettableListIterator;
/**
@ -41,10 +39,6 @@ public class TestListIteratorWrapper<E> extends AbstractTestIterator<E> {
protected List<E> list1 = null;
public static Test suite() {
return new TestSuite(TestListIteratorWrapper.class);
}
public TestListIteratorWrapper(String testName) {
super(testName);
}

View File

@ -21,8 +21,6 @@ import java.util.List;
import java.util.ListIterator;
import java.util.NoSuchElementException;
import junit.framework.Test;
import junit.framework.TestSuite;
import org.apache.commons.collections.ResettableListIterator;
/**
@ -40,10 +38,6 @@ public class TestListIteratorWrapper2<E> extends AbstractTestIterator<E> {
protected List<E> list1 = null;
public static Test suite() {
return new TestSuite(TestListIteratorWrapper2.class);
}
public TestListIteratorWrapper2(String testName) {
super(testName);
}

View File

@ -21,9 +21,7 @@ import java.util.Arrays;
import java.util.List;
import java.util.NoSuchElementException;
import junit.framework.Test;
import junit.framework.TestCase;
import junit.framework.TestSuite;
/**
* Tests the LoopingIterator class.
@ -39,10 +37,6 @@ public class TestLoopingIterator extends TestCase {
super(testName);
}
public static Test suite() {
return new TestSuite(TestLoopingIterator.class);
}
/**
* Tests constructor exception.
*/

View File

@ -21,9 +21,7 @@ import java.util.Arrays;
import java.util.List;
import java.util.NoSuchElementException;
import junit.framework.Test;
import junit.framework.TestCase;
import junit.framework.TestSuite;
/**
* Tests the LoopingListIterator class.
@ -38,10 +36,6 @@ public class TestLoopingListIterator extends TestCase {
super(testName);
}
public static Test suite() {
return new TestSuite(TestLoopingListIterator.class);
}
/**
* Tests constructor exception.
*/

View File

@ -19,9 +19,6 @@ package org.apache.commons.collections.iterators;
import java.util.Iterator;
import java.util.NoSuchElementException;
import junit.framework.Test;
import junit.framework.TestSuite;
/**
* Tests the ObjectArrayIterator.
*
@ -36,10 +33,6 @@ public class TestObjectArrayIterator<E> extends AbstractTestIterator<E> {
protected String[] testArray = { "One", "Two", "Three" };
public static Test suite() {
return new TestSuite(TestObjectArrayIterator.class);
}
public TestObjectArrayIterator(String testName) {
super(testName);
}

View File

@ -20,9 +20,6 @@ import java.util.Arrays;
import java.util.ListIterator;
import java.util.NoSuchElementException;
import junit.framework.Test;
import junit.framework.TestSuite;
/**
* Tests the ObjectArrayListIterator class.
*
@ -36,10 +33,6 @@ public class TestObjectArrayListIterator<E> extends TestObjectArrayIterator<E> {
super(testName);
}
public static Test suite() {
return new TestSuite(TestObjectArrayListIterator.class);
}
@Override
@SuppressWarnings("unchecked")
public ObjectArrayListIterator<E> makeEmptyIterator() {

View File

@ -16,9 +16,6 @@
*/
package org.apache.commons.collections.iterators;
import junit.framework.Test;
import junit.framework.TestSuite;
/**
* Tests the ObjectArrayListIterator class.
*
@ -34,10 +31,6 @@ public class TestObjectArrayListIterator2<E> extends AbstractTestListIterator<E>
super(testName);
}
public static Test suite() {
return new TestSuite(TestObjectArrayListIterator2.class);
}
@Override
@SuppressWarnings("unchecked")
public ObjectArrayListIterator<E> makeEmptyIterator() {

View File

@ -21,10 +21,6 @@ import java.util.Iterator;
import java.util.List;
import java.util.NoSuchElementException;
import junit.framework.Test;
import junit.framework.TestSuite;
import junit.textui.TestRunner;
import org.apache.commons.collections.IteratorUtils;
import org.apache.commons.collections.Transformer;
@ -48,14 +44,6 @@ public class TestObjectGraphIterator extends AbstractTestIterator<Object> {
super(testName);
}
public static void main(String[] args) {
TestRunner.run(suite());
}
public static Test suite() {
return new TestSuite(TestObjectGraphIterator.class);
}
@Override
public void setUp() {
list1 = new ArrayList<String>();

View File

@ -22,10 +22,6 @@ import java.util.List;
import java.util.ListIterator;
import java.util.NoSuchElementException;
import junit.framework.Test;
import junit.framework.TestSuite;
import junit.textui.TestRunner;
import org.apache.commons.collections.ResettableListIterator;
/**
@ -37,15 +33,6 @@ public class TestReverseListIterator<E> extends AbstractTestListIterator<E> {
protected String[] testArray = { "One", "Two", "Three", "Four" };
public static void main(String args[]) {
String[] testCaseName = { TestReverseListIterator.class.getName() };
TestRunner.main(testCaseName);
}
public static Test suite() {
return new TestSuite(TestReverseListIterator.class);
}
public TestReverseListIterator(String testName) {
super(testName);
}

View File

@ -19,9 +19,6 @@ package org.apache.commons.collections.iterators;
import java.util.Iterator;
import java.util.NoSuchElementException;
import junit.framework.Test;
import junit.framework.TestSuite;
import org.apache.commons.collections.ResettableIterator;
/**
@ -36,10 +33,6 @@ public class TestSingletonIterator<E> extends AbstractTestIterator<E> {
private static final Object testValue = "foo";
public static Test suite() {
return new TestSuite(TestSingletonIterator.class);
}
public TestSingletonIterator(String testName) {
super(testName);
}

View File

@ -19,9 +19,6 @@ package org.apache.commons.collections.iterators;
import java.util.Iterator;
import java.util.NoSuchElementException;
import junit.framework.Test;
import junit.framework.TestSuite;
import org.apache.commons.collections.ResettableIterator;
/**
@ -36,10 +33,6 @@ public class TestSingletonIterator2<E> extends AbstractTestIterator<E> {
private static final Object testValue = "foo";
public static Test suite() {
return new TestSuite(TestSingletonIterator2.class);
}
public TestSingletonIterator2(String testName) {
super(testName);
}

View File

@ -19,9 +19,6 @@ package org.apache.commons.collections.iterators;
import java.util.ListIterator;
import java.util.NoSuchElementException;
import junit.framework.Test;
import junit.framework.TestSuite;
import org.apache.commons.collections.ResettableListIterator;
/**
@ -35,10 +32,6 @@ public class TestSingletonListIterator<E> extends AbstractTestListIterator<E> {
private static final Object testValue = "foo";
public static Test suite() {
return new TestSuite(TestSingletonListIterator.class);
}
public TestSingletonListIterator(String testName) {
super(testName);
}

View File

@ -21,9 +21,6 @@ import java.util.Iterator;
import java.util.List;
import java.util.NoSuchElementException;
import junit.framework.Test;
import junit.framework.TestSuite;
/**
* Tests the UniqueFilterIterator class.
*
@ -42,10 +39,6 @@ public class TestUniqueFilterIterator<E> extends AbstractTestIterator<E> {
protected List<E> list1 = null;
public static Test suite() {
return new TestSuite(TestUniqueFilterIterator.class);
}
public TestUniqueFilterIterator(String testName) {
super(testName);
}

View File

@ -22,9 +22,6 @@ import java.util.Collections;
import java.util.Iterator;
import java.util.List;
import junit.framework.Test;
import junit.framework.TestSuite;
import org.apache.commons.collections.Unmodifiable;
/**
@ -39,10 +36,6 @@ public class TestUnmodifiableIterator<E> extends AbstractTestIterator<E> {
protected String[] testArray = { "One", "Two", "Three" };
protected List<E> testList;
public static Test suite() {
return new TestSuite(TestUnmodifiableIterator.class);
}
public TestUnmodifiableIterator(String testName) {
super(testName);
}

View File

@ -22,9 +22,6 @@ import java.util.Collections;
import java.util.List;
import java.util.ListIterator;
import junit.framework.Test;
import junit.framework.TestSuite;
import org.apache.commons.collections.Unmodifiable;
/**
@ -39,10 +36,6 @@ public class TestUnmodifiableListIterator<E> extends AbstractTestListIterator<E>
protected String[] testArray = { "One", "Two", "Three" };
protected List<E> testList;
public static Test suite() {
return new TestSuite(TestUnmodifiableListIterator.class);
}
public TestUnmodifiableListIterator(String testName) {
super(testName);
}

View File

@ -19,9 +19,6 @@ package org.apache.commons.collections.iterators;
import java.util.HashMap;
import java.util.Map;
import junit.framework.Test;
import junit.framework.TestSuite;
import org.apache.commons.collections.IterableMap;
import org.apache.commons.collections.MapIterator;
import org.apache.commons.collections.Unmodifiable;
@ -36,10 +33,6 @@ import org.apache.commons.collections.bidimap.DualHashBidiMap;
*/
public class TestUnmodifiableMapIterator<K, V> extends AbstractTestMapIterator<K, V> {
public static Test suite() {
return new TestSuite(TestUnmodifiableMapIterator.class);
}
public TestUnmodifiableMapIterator(String testName) {
super(testName);
}

View File

@ -20,9 +20,6 @@ import java.util.HashMap;
import java.util.Map;
import java.util.TreeMap;
import junit.framework.Test;
import junit.framework.TestSuite;
import org.apache.commons.collections.OrderedMap;
import org.apache.commons.collections.OrderedMapIterator;
import org.apache.commons.collections.Unmodifiable;
@ -37,10 +34,6 @@ import org.apache.commons.collections.map.ListOrderedMap;
*/
public class TestUnmodifiableOrderedMapIterator<K, V> extends AbstractTestOrderedMapIterator<K, V> {
public static Test suite() {
return new TestSuite(TestUnmodifiableOrderedMapIterator.class);
}
public TestUnmodifiableOrderedMapIterator(String testName) {
super(testName);
}

View File

@ -19,9 +19,7 @@ package org.apache.commons.collections.keyvalue;
import java.util.HashMap;
import java.util.Map;
import junit.framework.Test;
import junit.framework.TestCase;
import junit.framework.TestSuite;
/**
* Test the DefaultKeyValue class.
@ -46,14 +44,6 @@ public class TestDefaultKeyValue<K, V> extends TestCase {
}
public static void main(String[] args) {
junit.textui.TestRunner.run(TestDefaultKeyValue.class);
}
public static Test suite() {
return new TestSuite(TestDefaultKeyValue.class);
}
//-----------------------------------------------------------------------
/**
* Make an instance of DefaultKeyValue with the default (null) key and value.

View File

@ -18,9 +18,6 @@ package org.apache.commons.collections.keyvalue;
import java.util.Map;
import junit.framework.Test;
import junit.framework.TestSuite;
import org.apache.commons.collections.KeyValue;
/**
@ -37,14 +34,6 @@ public class TestDefaultMapEntry<K, V> extends AbstractTestMapEntry<K, V> {
super(testName);
}
public static void main(String[] args) {
junit.textui.TestRunner.run(TestDefaultMapEntry.class);
}
public static Test suite() {
return new TestSuite(TestDefaultMapEntry.class);
}
//-----------------------------------------------------------------------
/**
* Make an instance of Map.Entry with the default (null) key and value.

View File

@ -27,9 +27,7 @@ import java.util.HashMap;
import java.util.Map;
import junit.framework.Assert;
import junit.framework.Test;
import junit.framework.TestCase;
import junit.framework.TestSuite;
/**
* Unit tests for {@link org.apache.commons.collections.keyvalue.MultiKey}.
@ -50,15 +48,6 @@ public class TestMultiKey extends TestCase {
super(name);
}
public static Test suite() {
return new TestSuite(TestMultiKey.class);
}
public static void main(String[] args) {
String[] testCaseName = { TestMultiKey.class.getName() };
junit.textui.TestRunner.main(testCaseName);
}
@Override
public void setUp() throws Exception {
super.setUp();

View File

@ -19,9 +19,6 @@ package org.apache.commons.collections.keyvalue;
import java.util.HashMap;
import java.util.Map;
import junit.framework.Test;
import junit.framework.TestSuite;
/**
* Test the TiedMapEntry class.
*
@ -36,14 +33,6 @@ public class TestTiedMapEntry<K, V> extends AbstractTestMapEntry<K, V> {
super(testName);
}
public static void main(String[] args) {
junit.textui.TestRunner.run(TestTiedMapEntry.class);
}
public static Test suite() {
return new TestSuite(TestTiedMapEntry.class);
}
//-----------------------------------------------------------------------
/**
* Gets the instance to test

View File

@ -18,9 +18,6 @@ package org.apache.commons.collections.keyvalue;
import java.util.Map;
import junit.framework.Test;
import junit.framework.TestSuite;
import org.apache.commons.collections.KeyValue;
import org.apache.commons.collections.Unmodifiable;
@ -38,14 +35,6 @@ public class TestUnmodifiableMapEntry<K, V> extends AbstractTestMapEntry<K, V> {
super(testName);
}
public static void main(String[] args) {
junit.textui.TestRunner.run(TestUnmodifiableMapEntry.class);
}
public static Test suite() {
return new TestSuite(TestUnmodifiableMapEntry.class);
}
//-----------------------------------------------------------------------
/**
* Make an instance of Map.Entry with the default (null) key and value.

View File

@ -45,11 +45,6 @@ public class TestCursorableLinkedList<E> extends TestAbstractLinkedList<E> {
return BulkTest.makeSuite(TestCursorableLinkedList.class);
}
public static void main(String args[]) {
String[] testCaseName = { TestCursorableLinkedList.class.getName() };
junit.textui.TestRunner.main(testCaseName);
}
private CursorableLinkedList<E> list;
@Override

View File

@ -20,9 +20,6 @@ import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import junit.framework.Test;
import junit.framework.TestSuite;
/**
* Extension of {@link AbstractTestList} for exercising the {@link FixedSizeList}
* implementation.
@ -38,15 +35,6 @@ public class TestFixedSizeList<E> extends AbstractTestList<E> {
super(testName);
}
public static Test suite() {
return new TestSuite(TestFixedSizeList.class);
}
public static void main(String args[]) {
String[] testCaseName = { TestFixedSizeList.class.getName()};
junit.textui.TestRunner.main(testCaseName);
}
@Override
public List<E> makeObject() {
return FixedSizeList.decorate(new ArrayList<E>());

View File

@ -21,9 +21,6 @@ import java.util.Arrays;
import java.util.Collection;
import java.util.List;
import junit.framework.Test;
import junit.framework.TestSuite;
/**
* Extension of {@link AbstractTestList} for exercising the {@link GrowthList}.
*
@ -38,15 +35,6 @@ public class TestGrowthList<E> extends AbstractTestList<E> {
super(testName);
}
public static Test suite() {
return new TestSuite(TestGrowthList.class);
}
public static void main(String args[]) {
String[] testCaseName = { TestGrowthList.class.getName()};
junit.textui.TestRunner.main(testCaseName);
}
@Override
public List<E> makeObject() {
return new GrowthList<E>();

View File

@ -37,12 +37,6 @@ public class TestNodeCachingLinkedList<E> extends TestAbstractLinkedList<E> {
super(testName);
}
public static void main(String args[]) {
compareSpeed();
String[] testCaseName = { TestNodeCachingLinkedList.class.getName()};
junit.textui.TestRunner.main(testCaseName);
}
public static Test suite() {
return BulkTest.makeSuite(TestNodeCachingLinkedList.class);
}

View File

@ -19,9 +19,6 @@ package org.apache.commons.collections.list;
import java.util.ArrayList;
import java.util.List;
import junit.framework.Test;
import junit.framework.TestSuite;
import org.apache.commons.collections.Predicate;
import org.apache.commons.collections.functors.TruePredicate;
@ -40,15 +37,6 @@ public class TestPredicatedList<E> extends AbstractTestList<E> {
super(testName);
}
public static Test suite() {
return new TestSuite(TestPredicatedList.class);
}
public static void main(String args[]) {
String[] testCaseName = { TestPredicatedList.class.getName()};
junit.textui.TestRunner.main(testCaseName);
}
//-------------------------------------------------------------------
protected Predicate<E> truePredicate = TruePredicate.<E>truePredicate();

View File

@ -25,10 +25,6 @@ import java.util.List;
import java.util.ListIterator;
import java.util.Set;
import junit.framework.Test;
import junit.framework.TestSuite;
import junit.textui.TestRunner;
/**
* JUnit tests.
*
@ -40,14 +36,6 @@ import junit.textui.TestRunner;
*/
public class TestSetUniqueList<E> extends AbstractTestList<E> {
public static void main(String[] args) {
TestRunner.run(suite());
}
public static Test suite() {
return new TestSuite(TestSetUniqueList.class);
}
public TestSetUniqueList(String testName) {
super(testName);
}

View File

@ -19,9 +19,6 @@ package org.apache.commons.collections.list;
import java.util.ArrayList;
import java.util.List;
import junit.framework.Test;
import junit.framework.TestSuite;
/**
* Extension of {@link AbstractTestList} for exercising the {@link SynchronizedList}
* implementation.
@ -37,15 +34,6 @@ public class TestSynchronizedList<E> extends AbstractTestList<E> {
super(testName);
}
public static Test suite() {
return new TestSuite(TestSynchronizedList.class);
}
public static void main(String args[]) {
String[] testCaseName = { TestSynchronizedList.class.getName()};
junit.textui.TestRunner.main(testCaseName);
}
@Override
public List<E> makeConfirmedCollection() {
return new ArrayList<E>();

View File

@ -21,9 +21,6 @@ import java.util.Arrays;
import java.util.List;
import java.util.ListIterator;
import junit.framework.Test;
import junit.framework.TestSuite;
import org.apache.commons.collections.Transformer;
import org.apache.commons.collections.collection.TestTransformedCollection;
@ -42,15 +39,6 @@ public class TestTransformedList<E> extends AbstractTestList<E> {
super(testName);
}
public static Test suite() {
return new TestSuite(TestTransformedList.class);
}
public static void main(String args[]) {
String[] testCaseName = { TestTransformedList.class.getName()};
junit.textui.TestRunner.main(testCaseName);
}
@Override
public List<E> makeConfirmedCollection() {
return new ArrayList<E>();

View File

@ -21,9 +21,6 @@ import java.util.Arrays;
import java.util.Iterator;
import java.util.List;
import junit.framework.Test;
import junit.framework.TestSuite;
/**
* Extension of {@link AbstractTestList} for exercising the
* {@link UnmodifiableList} implementation.
@ -39,15 +36,6 @@ public class TestUnmodifiableList<E> extends AbstractTestList<E> {
super(testName);
}
public static Test suite() {
return new TestSuite(TestUnmodifiableList.class);
}
public static void main(String args[]) {
String[] testCaseName = { TestUnmodifiableList.class.getName()};
junit.textui.TestRunner.main(testCaseName);
}
//-----------------------------------------------------------------------
@Override
public UnmodifiableList<E> makeObject() {

View File

@ -22,8 +22,6 @@ import java.util.Map;
import java.util.Set;
import junit.framework.Test;
import junit.textui.TestRunner;
import org.apache.commons.collections.BulkTest;
/**
@ -39,10 +37,6 @@ public class TestCaseInsensitiveMap<K, V> extends AbstractTestIterableMap<K, V>
super(testName);
}
public static void main(String[] args) {
TestRunner.run(suite());
}
public static Test suite() {
return BulkTest.makeSuite(TestCaseInsensitiveMap.class);
}

View File

@ -16,8 +16,6 @@
*/
package org.apache.commons.collections.map;
import junit.framework.Test;
import junit.framework.TestSuite;
import junit.framework.Assert;
import java.util.Map;
@ -41,21 +39,12 @@ public class TestCompositeMap<K, V> extends AbstractTestIterableMap<K, V> {
super(testName);
}
public static Test suite() {
return new TestSuite(TestCompositeMap.class);
}
@Override
public void setUp() throws Exception {
super.setUp();
this.pass = false;
}
public static void main(String args[]) {
String[] testCaseName = {TestCompositeMap.class.getName()};
junit.textui.TestRunner.main(testCaseName);
}
@Override
public CompositeMap<K, V> makeObject() {
CompositeMap<K, V> map = new CompositeMap<K, V>();

View File

@ -19,9 +19,6 @@ package org.apache.commons.collections.map;
import java.util.HashMap;
import java.util.Map;
import junit.framework.Test;
import junit.framework.TestSuite;
import org.apache.commons.collections.Factory;
import org.apache.commons.collections.FactoryUtils;
import org.apache.commons.collections.IterableMap;
@ -45,15 +42,6 @@ public class TestDefaultedMap<K, V> extends AbstractTestIterableMap<K, V> {
super(testName);
}
public static Test suite() {
return new TestSuite(TestDefaultedMap.class);
}
public static void main(String args[]) {
String[] testCaseName = { TestDefaultedMap.class.getName()};
junit.textui.TestRunner.main(testCaseName);
}
//-----------------------------------------------------------------------
@Override
public IterableMap<K, V> makeObject() {

View File

@ -21,9 +21,6 @@ import java.util.Map;
import org.apache.commons.collections.IterableMap;
import junit.framework.Test;
import junit.framework.TestSuite;
/**
* Extension of {@link AbstractTestMap} for exercising the {@link FixedSizeMap}
* implementation.
@ -39,15 +36,6 @@ public class TestFixedSizeMap<K, V> extends AbstractTestIterableMap<K, V> {
super(testName);
}
public static Test suite() {
return new TestSuite(TestFixedSizeMap.class);
}
public static void main(String args[]) {
String[] testCaseName = { TestFixedSizeMap.class.getName()};
junit.textui.TestRunner.main(testCaseName);
}
@Override
public IterableMap<K, V> makeObject() {
return FixedSizeMap.decorate(new HashMap<K, V>());

View File

@ -42,11 +42,6 @@ public class TestFixedSizeSortedMap<K, V> extends AbstractTestSortedMap<K, V> {
return BulkTest.makeSuite(TestFixedSizeSortedMap.class);
}
public static void main(String args[]) {
String[] testCaseName = { TestFixedSizeSortedMap.class.getName()};
junit.textui.TestRunner.main(testCaseName);
}
//-----------------------------------------------------------------------
@Override
public SortedMap<K, V> makeObject() {

View File

@ -24,8 +24,6 @@ import java.util.Iterator;
import java.util.Map;
import junit.framework.Test;
import junit.textui.TestRunner;
import org.apache.commons.collections.BulkTest;
import org.apache.commons.collections.IterableMap;
import org.apache.commons.collections.MapIterator;
@ -51,10 +49,6 @@ public class TestFlat3Map<K, V> extends AbstractTestIterableMap<K, V> {
super(testName);
}
public static void main(String[] args) {
TestRunner.run(suite());
}
public static Test suite() {
return BulkTest.makeSuite(TestFlat3Map.class);
}

View File

@ -17,8 +17,6 @@
package org.apache.commons.collections.map;
import junit.framework.Test;
import junit.textui.TestRunner;
import org.apache.commons.collections.BulkTest;
/**
@ -34,10 +32,6 @@ public class TestHashedMap<K, V> extends AbstractTestIterableMap<K, V> {
super(testName);
}
public static void main(String[] args) {
TestRunner.run(suite());
}
public static Test suite() {
return BulkTest.makeSuite(TestHashedMap.class);
}

View File

@ -23,8 +23,6 @@ import java.util.Map;
import junit.framework.Test;
import junit.framework.TestSuite;
import junit.textui.TestRunner;
import org.apache.commons.collections.AbstractTestObject;
import org.apache.commons.collections.IterableMap;
@ -46,10 +44,6 @@ public class TestIdentityMap<K, V> extends AbstractTestObject {
super(testName);
}
public static void main(String[] args) {
TestRunner.run(suite());
}
public static Test suite() {
return new TestSuite(TestIdentityMap.class);
// return BulkTest.makeSuite(TestIdentityMap.class); // causes race condition!

View File

@ -23,8 +23,6 @@ import java.util.List;
import java.util.Map;
import junit.framework.Test;
import junit.textui.TestRunner;
import org.apache.commons.collections.BulkTest;
import org.apache.commons.collections.MapIterator;
import org.apache.commons.collections.OrderedMap;
@ -43,10 +41,6 @@ public class TestLRUMap<K, V> extends AbstractTestOrderedMap<K, V> {
super(testName);
}
public static void main(String[] args) {
TestRunner.run(suite());
}
public static Test suite() {
return BulkTest.makeSuite(TestLRUMap.class);
}

View File

@ -43,11 +43,6 @@ public class TestLazyMap<K, V> extends AbstractTestIterableMap<K, V> {
super(testName);
}
public static void main(String args[]) {
String[] testCaseName = { TestLazyMap.class.getName()};
junit.textui.TestRunner.main(testCaseName);
}
@Override
public LazyMap<K,V> makeObject() {
return getLazyMap(new HashMap<K,V>(), FactoryUtils.<V>nullFactory());

View File

@ -46,11 +46,6 @@ public class TestLazySortedMap<K, V> extends AbstractTestSortedMap<K, V> {
super(testName);
}
public static void main(String args[]) {
String[] testCaseName = { TestLazySortedMap.class.getName()};
junit.textui.TestRunner.main(testCaseName);
}
@Override
public SortedMap<K,V> makeObject() {
return getLazySortedMap(new TreeMap<K,V>(), FactoryUtils.<V>nullFactory());

View File

@ -22,8 +22,6 @@ import java.util.List;
import java.util.Map;
import junit.framework.Test;
import junit.textui.TestRunner;
import org.apache.commons.collections.BulkTest;
import org.apache.commons.collections.MapIterator;
import org.apache.commons.collections.OrderedMap;
@ -43,10 +41,6 @@ public class TestLinkedMap<K, V> extends AbstractTestOrderedMap<K, V> {
super(testName);
}
public static void main(String[] args) {
TestRunner.run(suite());
}
public static Test suite() {
return BulkTest.makeSuite(TestLinkedMap.class);
}

View File

@ -47,11 +47,6 @@ public class TestListOrderedMap<K, V> extends AbstractTestOrderedMap<K, V> {
return BulkTest.makeSuite(TestListOrderedMap.class);
}
public static void main(String args[]) {
String[] testCaseName = { TestListOrderedMap.class.getName()};
junit.textui.TestRunner.main(testCaseName);
}
@Override
public ListOrderedMap<K, V> makeObject() {
return (ListOrderedMap<K, V>) ListOrderedMap.decorate(new HashMap<K, V>());

View File

@ -44,11 +44,6 @@ public class TestListOrderedMap2<K, V> extends AbstractTestOrderedMap<K, V> {
return BulkTest.makeSuite(TestListOrderedMap2.class);
}
public static void main(String args[]) {
String[] testCaseName = { TestListOrderedMap2.class.getName()};
junit.textui.TestRunner.main(testCaseName);
}
@Override
public ListOrderedMap<K, V> makeObject() {
return new ListOrderedMap<K, V>();

View File

@ -19,8 +19,6 @@ package org.apache.commons.collections.map;
import java.util.Map;
import junit.framework.Test;
import junit.textui.TestRunner;
import org.apache.commons.collections.BulkTest;
import org.apache.commons.collections.MapIterator;
import org.apache.commons.collections.keyvalue.MultiKey;
@ -47,10 +45,6 @@ public class TestMultiKeyMap<K, V> extends AbstractTestIterableMap<MultiKey<? ex
super(testName);
}
public static void main(String[] args) {
TestRunner.run(suite());
}
public static Test suite() {
return BulkTest.makeSuite(TestMultiKeyMap.class);
}

View File

@ -25,9 +25,6 @@ import java.util.Iterator;
import java.util.LinkedList;
import java.util.Map;
import junit.framework.Test;
import junit.framework.TestSuite;
import org.apache.commons.collections.IteratorUtils;
import org.apache.commons.collections.MultiMap;
@ -46,15 +43,6 @@ public class TestMultiValueMap<K, V> extends AbstractTestObject {
super(testName);
}
public static Test suite() {
return new TestSuite(TestMultiValueMap.class);
}
public static void main(String args[]) {
String[] testCaseName = { TestMultiValueMap.class.getName()};
junit.textui.TestRunner.main(testCaseName);
}
public void testNoMappingReturnsNull() {
final MultiValueMap<K, V> map = createTestMap();
assertNull(map.get("whatever"));

View File

@ -20,9 +20,6 @@ import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
import junit.framework.Test;
import junit.framework.TestSuite;
import org.apache.commons.collections.IterableMap;
import org.apache.commons.collections.Predicate;
import org.apache.commons.collections.functors.TruePredicate;
@ -50,15 +47,6 @@ public class TestPredicatedMap<K, V> extends AbstractTestIterableMap<K, V> {
super(testName);
}
public static Test suite() {
return new TestSuite(TestPredicatedMap.class);
}
public static void main(String args[]) {
String[] testCaseName = { TestPredicatedMap.class.getName()};
junit.textui.TestRunner.main(testCaseName);
}
//-----------------------------------------------------------------------
protected IterableMap<K, V> decorateMap(Map<K, V> map, Predicate<? super K> keyPredicate,
Predicate<? super V> valuePredicate) {

View File

@ -23,9 +23,6 @@ import java.util.Map;
import java.util.SortedMap;
import java.util.TreeMap;
import junit.framework.Test;
import junit.framework.TestSuite;
import org.apache.commons.collections.Predicate;
import org.apache.commons.collections.functors.TruePredicate;
@ -52,15 +49,6 @@ public class TestPredicatedSortedMap<K, V> extends AbstractTestSortedMap<K, V> {
super(testName);
}
public static Test suite() {
return new TestSuite(TestPredicatedSortedMap.class);
}
public static void main(String args[]) {
String[] testCaseName = { TestPredicatedSortedMap.class.getName()};
junit.textui.TestRunner.main(testCaseName);
}
//-----------------------------------------------------------------------
protected SortedMap<K, V> decorateMap(SortedMap<K, V> map, Predicate<? super K> keyPredicate,
Predicate<? super V> valuePredicate) {

View File

@ -50,11 +50,6 @@ public class TestReferenceIdentityMap<K, V> extends AbstractTestIterableMap<K, V
return BulkTest.makeSuite(TestReferenceIdentityMap.class);
}
public static void main(String args[]) {
String[] testCaseName = { TestReferenceIdentityMap.class.getName() };
junit.textui.TestRunner.main(testCaseName);
}
@Override
public ReferenceIdentityMap<K, V> makeObject() {
return new ReferenceIdentityMap<K, V>(ReferenceStrength.WEAK, ReferenceStrength.WEAK);

View File

@ -42,11 +42,6 @@ public class TestReferenceMap<K, V> extends AbstractTestIterableMap<K, V> {
return BulkTest.makeSuite(TestReferenceMap.class);
}
public static void main(String args[]) {
String[] testCaseName = { TestReferenceMap.class.getName() };
junit.textui.TestRunner.main(testCaseName);
}
@Override
public ReferenceMap<K, V> makeObject() {
return new ReferenceMap<K, V>(ReferenceStrength.WEAK, ReferenceStrength.WEAK);

View File

@ -19,8 +19,6 @@ package org.apache.commons.collections.map;
import java.util.HashMap;
import junit.framework.Test;
import junit.textui.TestRunner;
import org.apache.commons.collections.BoundedMap;
import org.apache.commons.collections.BulkTest;
import org.apache.commons.collections.KeyValue;
@ -43,10 +41,6 @@ public class TestSingletonMap<K, V> extends AbstractTestOrderedMap<K, V> {
super(testName);
}
public static void main(String[] args) {
TestRunner.run(suite());
}
public static Test suite() {
return BulkTest.makeSuite(TestSingletonMap.class);
}

Some files were not shown because too many files have changed in this diff Show More