Renamed unit tests for iterators package.

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/collections/trunk@1377502 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Thomas Neidhart 2012-08-26 19:52:16 +00:00
parent 73d8eab106
commit 7349963217
30 changed files with 96 additions and 166 deletions

View File

@ -29,20 +29,17 @@ import org.apache.commons.collections.AbstractObjectTest;
* They must also specify certain details of how the iterator operates by
* overriding the supportsXxx() methods if necessary.
*
* @since Commons Collections 3.0
* @version $Revision$
*
* @author Morgan Delagrange
* @author Stephen Colebourne
* @since 3.0
* @version $Id$
*/
public abstract class AbstractTestIterator<E> extends AbstractObjectTest {
public abstract class AbstractIteratorTest<E> extends AbstractObjectTest {
/**
* JUnit constructor.
*
* @param testName the test class name
*/
public AbstractTestIterator(String testName) {
public AbstractIteratorTest(String testName) {
super(testName);
}

View File

@ -28,20 +28,17 @@ import java.util.NoSuchElementException;
* They must also specify certain details of how the list iterator operates by
* overriding the supportsXxx() methods if necessary.
*
* @since Commons Collections 3.0
* @version $Revision$
*
* @author Rodney Waldhoff
* @author Stephen Colebourne
* @since 3.0
* @version $Id$
*/
public abstract class AbstractTestListIterator<E> extends AbstractTestIterator<E> {
public abstract class AbstractListIteratorTest<E> extends AbstractIteratorTest<E> {
/**
* JUnit constructor.
*
* @param testName the test class name
*/
public AbstractTestListIterator(String testName) {
public AbstractListIteratorTest(String testName) {
super(testName);
}

View File

@ -31,19 +31,17 @@ import org.apache.commons.collections.MapIterator;
* They must also specify certain details of how the list iterator operates by
* overriding the supportsXxx() methods if necessary.
*
* @since Commons Collections 3.0
* @version $Revision$
*
* @author Stephen Colebourne
* @since 3.0
* @version $Id$
*/
public abstract class AbstractTestMapIterator<K, V> extends AbstractTestIterator<K> {
public abstract class AbstractMapIteratorTest<K, V> extends AbstractIteratorTest<K> {
/**
* JUnit constructor.
*
* @param testName the test class name
*/
public AbstractTestMapIterator(String testName) {
public AbstractMapIteratorTest(String testName) {
super(testName);
}

View File

@ -34,19 +34,17 @@ import org.apache.commons.collections.OrderedMapIterator;
* They must also specify certain details of how the list iterator operates by
* overriding the supportsXxx() methods if necessary.
*
* @since Commons Collections 3.0
* @version $Revision$
*
* @author Stephen Colebourne
* @since 3.0
* @version $Id$
*/
public abstract class AbstractTestOrderedMapIterator<K, V> extends AbstractTestMapIterator<K, V> {
public abstract class AbstractOrderedMapIteratorTest<K, V> extends AbstractMapIteratorTest<K, V> {
/**
* JUnit constructor.
*
* @param testName the test class name
*/
public AbstractTestOrderedMapIterator(String testName) {
public AbstractOrderedMapIteratorTest(String testName) {
super(testName);
}

View File

@ -22,16 +22,13 @@ import java.util.NoSuchElementException;
/**
* Tests the ArrayIterator with primitive type arrays.
*
* @version $Revision$
*
* @author Morgan Delagrange
* @author James Strachan
* @version $Id$
*/
public class TestArrayIterator2<E> extends AbstractTestIterator<E> {
public class ArrayIterator2Test<E> extends AbstractIteratorTest<E> {
protected int[] testArray = { 2, 4, 6, 8 };
public TestArrayIterator2(String testName) {
public ArrayIterator2Test(String testName) {
super(testName);
}

View File

@ -24,18 +24,13 @@ import java.util.NoSuchElementException;
* perform the iteration rather than the hasNext() method.
* The code of this test was supplied by Mauricio S. Moura.
*
* @version $Revision$
*
* @author James Strachan
* @author Mauricio S. Moura
* @author Morgan Delagrange
* @author Stephen Colebourne
* @version $Id$
*/
public class TestArrayIterator<E> extends AbstractTestIterator<E> {
public class ArrayIteratorTest<E> extends AbstractIteratorTest<E> {
protected String[] testArray = { "One", "Two", "Three" };
public TestArrayIterator(String testName) {
public ArrayIteratorTest(String testName) {
super(testName);
}

View File

@ -19,12 +19,11 @@ package org.apache.commons.collections.iterators;
/**
* Test the ArrayListIterator class with primitives.
*
* @version $Revision$
* @author Neil O'Toole
* @version $Id$
*/
public class TestArrayListIterator2<E> extends TestArrayIterator2<E> {
public class ArrayListIterator2Test<E> extends ArrayIterator2Test<E> {
public TestArrayListIterator2(String testName) {
public ArrayListIterator2Test(String testName) {
super(testName);
}

View File

@ -23,12 +23,11 @@ import java.util.NoSuchElementException;
/**
* Test the ArrayListIterator class.
*
* @version $Revision$
* @author Neil O'Toole
* @version $Id$
*/
public class TestArrayListIterator<E> extends TestArrayIterator<E> {
public class ArrayListIteratorTest<E> extends ArrayIteratorTest<E> {
public TestArrayListIterator(String testName) {
public ArrayListIteratorTest(String testName) {
super(testName);
}

View File

@ -26,15 +26,14 @@ import org.apache.commons.collections.comparators.ComparableComparator;
/**
* Unit test suite for {@link CollatingIterator}.
*
* @version $Revision$
* @author Rodney Waldhoff
* @version $Id$
*/
@SuppressWarnings("boxing")
public class TestCollatingIterator extends AbstractTestIterator<Integer> {
public class CollatingIteratorTest extends AbstractIteratorTest<Integer> {
//------------------------------------------------------------ Conventional
public TestCollatingIterator(String testName) {
public CollatingIteratorTest(String testName) {
super(testName);
}

View File

@ -31,16 +31,12 @@ import org.apache.commons.collections.functors.NotNullPredicate;
/**
* Test the filter iterator.
*
* @version $Revision$
*
* @author Jan Sorensen
* @author Ralph Wagner
* @author Huw Roberts
* @version $Id$
*/
public class TestFilterIterator<E> extends AbstractTestIterator<E> {
public class FilterIteratorTest<E> extends AbstractIteratorTest<E> {
/** Creates new TestFilterIterator */
public TestFilterIterator(String name) {
public FilterIteratorTest(String name) {
super(name);
}

View File

@ -31,13 +31,11 @@ import org.junit.Assert;
/**
* Tests the FilterListIterator class.
*
* @version $Revision$
*
* @author Rodney Waldhoff
* @version $Id$
*/
@SuppressWarnings("boxing")
public class TestFilterListIterator extends TestCase {
public TestFilterListIterator(String testName) {
public class FilterListIteratorTest extends TestCase {
public FilterListIteratorTest(String testName) {
super(testName);
}

View File

@ -27,13 +27,9 @@ import org.apache.commons.collections.Predicate;
/**
* Tests the IteratorChain class.
*
* @version $Revision$
*
* @author James Strachan
* @author Mauricio S. Moura
* @author Morgan Delagrange
* @version $Id$
*/
public class TestIteratorChain extends AbstractTestIterator<String> {
public class IteratorChainTest extends AbstractIteratorTest<String> {
protected String[] testArray = {
"One", "Two", "Three", "Four", "Five", "Six"
@ -43,7 +39,7 @@ public class TestIteratorChain extends AbstractTestIterator<String> {
protected List<String> list2 = null;
protected List<String> list3 = null;
public TestIteratorChain(String testName) {
public IteratorChainTest(String testName) {
super(testName);
}

View File

@ -24,15 +24,15 @@ import org.apache.commons.collections.BulkTest;
/**
* Tests for IteratorIterable.
*
* @version $Revision$
* @version $Id$
*/
public class TestIteratorIterable extends BulkTest {
public class IteratorIterableTest extends BulkTest {
public static Test suite() {
return BulkTest.makeSuite(TestIteratorIterable.class);
return BulkTest.makeSuite(IteratorIterableTest.class);
}
public TestIteratorIterable(String name) {
public IteratorIterableTest(String name) {
super(name);
}
@ -53,7 +53,7 @@ public class TestIteratorIterable extends BulkTest {
verifyIteration(iterable);
// second use
for (Number actual : iterable) {
for (@SuppressWarnings("unused") Number actual : iterable) {
fail("should not be able to iterate twice");
}
}

View File

@ -26,11 +26,9 @@ import org.apache.commons.collections.ResettableListIterator;
/**
* Tests the ListIteratorWrapper to insure that it behaves as expected when wrapping a ListIterator.
*
* @version $Revision$
*
* @author Morgan Delagrange
* @version $Id$
*/
public class TestListIteratorWrapper2<E> extends AbstractTestIterator<E> {
public class ListIteratorWrapper2Test<E> extends AbstractIteratorTest<E> {
protected String[] testArray = {
"One", "Two", "Three", "Four", "Five", "Six"
@ -38,7 +36,7 @@ public class TestListIteratorWrapper2<E> extends AbstractTestIterator<E> {
protected List<E> list1 = null;
public TestListIteratorWrapper2(String testName) {
public ListIteratorWrapper2Test(String testName) {
super(testName);
}

View File

@ -27,11 +27,9 @@ import org.apache.commons.collections.ResettableListIterator;
* Tests the ListIteratorWrapper to insure that it simulates
* a ListIterator correctly.
*
* @version $Revision$
*
* @author Morgan Delagrange
* @version $Id$
*/
public class TestListIteratorWrapper<E> extends AbstractTestIterator<E> {
public class ListIteratorWrapperTest<E> extends AbstractIteratorTest<E> {
protected String[] testArray = {
"One", "Two", "Three", "Four", "Five", "Six"
@ -39,7 +37,7 @@ public class TestListIteratorWrapper<E> extends AbstractTestIterator<E> {
protected List<E> list1 = null;
public TestListIteratorWrapper(String testName) {
public ListIteratorWrapperTest(String testName) {
super(testName);
}

View File

@ -26,14 +26,11 @@ import junit.framework.TestCase;
/**
* Tests the LoopingIterator class.
*
* @version $Revision$
*
* @author Jonathan Carlson
* @author Stephen Colebourne
* @version $Id$
*/
public class TestLoopingIterator extends TestCase {
public class LoopingIteratorTest extends TestCase {
public TestLoopingIterator(String testName) {
public LoopingIteratorTest(String testName) {
super(testName);
}

View File

@ -26,13 +26,11 @@ import junit.framework.TestCase;
/**
* Tests the LoopingListIterator class.
*
* @version $Revision$
*
* @author Eric Crampton <ccesc@eonomine.com>
* @version $Id$
*/
public class TestLoopingListIterator extends TestCase {
public class LoopingListIteratorTest extends TestCase {
public TestLoopingListIterator(String testName) {
public LoopingListIteratorTest(String testName) {
super(testName);
}

View File

@ -22,18 +22,13 @@ import java.util.NoSuchElementException;
/**
* Tests the ObjectArrayIterator.
*
* @version $Revision$
*
* @author James Strachan
* @author Mauricio S. Moura
* @author Morgan Delagrange
* @author Stephen Colebourne
* @version $Id$
*/
public class TestObjectArrayIterator<E> extends AbstractTestIterator<E> {
public class ObjectArrayIteratorTest<E> extends AbstractIteratorTest<E> {
protected String[] testArray = { "One", "Two", "Three" };
public TestObjectArrayIterator(String testName) {
public ObjectArrayIteratorTest(String testName) {
super(testName);
}

View File

@ -19,15 +19,13 @@ package org.apache.commons.collections.iterators;
/**
* Tests the ObjectArrayListIterator class.
*
* @version $Revision$
*
* @author Stephen Colebourne
* @version $Id$
*/
public class TestObjectArrayListIterator2<E> extends AbstractTestListIterator<E> {
public class ObjectArrayListIterator2Test<E> extends AbstractListIteratorTest<E> {
protected String[] testArray = { "One", "Two", "Three" };
public TestObjectArrayListIterator2(String testName) {
public ObjectArrayListIterator2Test(String testName) {
super(testName);
}

View File

@ -23,13 +23,11 @@ import java.util.NoSuchElementException;
/**
* Tests the ObjectArrayListIterator class.
*
* @version $Revision$
*
* @author Neil O'Toole
* @version $Id$
*/
public class TestObjectArrayListIterator<E> extends TestObjectArrayIterator<E> {
public class ObjectArrayListIteratorTest<E> extends ObjectArrayIteratorTest<E> {
public TestObjectArrayListIterator(String testName) {
public ObjectArrayListIteratorTest(String testName) {
super(testName);
}

View File

@ -27,11 +27,9 @@ import org.apache.commons.collections.Transformer;
/**
* Testcase.
*
* @version $Revision$
*
* @author Stephen Colebourne
* @version $Id$
*/
public class TestObjectGraphIterator extends AbstractTestIterator<Object> {
public class ObjectGraphIteratorTest extends AbstractIteratorTest<Object> {
protected String[] testArray = { "One", "Two", "Three", "Four", "Five", "Six" };
@ -40,7 +38,7 @@ public class TestObjectGraphIterator extends AbstractTestIterator<Object> {
protected List<String> list3 = null;
protected List<Iterator<String>> iteratorList = null;
public TestObjectGraphIterator(String testName) {
public ObjectGraphIteratorTest(String testName) {
super(testName);
}

View File

@ -27,13 +27,13 @@ import org.apache.commons.collections.ResettableListIterator;
/**
* Tests the ReverseListIterator.
*
* @version $Revision$
* @version $Id$
*/
public class TestReverseListIterator<E> extends AbstractTestListIterator<E> {
public class ReverseListIteratorTest<E> extends AbstractListIteratorTest<E> {
protected String[] testArray = { "One", "Two", "Three", "Four" };
public TestReverseListIterator(String testName) {
public ReverseListIteratorTest(String testName) {
super(testName);
}

View File

@ -25,15 +25,13 @@ import org.apache.commons.collections.ResettableIterator;
* Tests the SingletonIterator to ensure that the next() method will actually
* perform the iteration rather than the hasNext() method.
*
* @version $Revision$
*
* @author James Strachan
* @version $Id$
*/
public class TestSingletonIterator2<E> extends AbstractTestIterator<E> {
public class SingletonIterator2Test<E> extends AbstractIteratorTest<E> {
private static final Object testValue = "foo";
public TestSingletonIterator2(String testName) {
public SingletonIterator2Test(String testName) {
super(testName);
}

View File

@ -25,15 +25,13 @@ import org.apache.commons.collections.ResettableIterator;
* Tests the SingletonIterator to ensure that the next() method will actually
* perform the iteration rather than the hasNext() method.
*
* @version $Revision$
*
* @author James Strachan
* @version $Id$
*/
public class TestSingletonIterator<E> extends AbstractTestIterator<E> {
public class SingletonIteratorTest<E> extends AbstractIteratorTest<E> {
private static final Object testValue = "foo";
public TestSingletonIterator(String testName) {
public SingletonIteratorTest(String testName) {
super(testName);
}

View File

@ -24,15 +24,13 @@ import org.apache.commons.collections.ResettableListIterator;
/**
* Tests the SingletonListIterator.
*
* @version $Revision$
*
* @author Stephen Colebourne
* @version $Id$
*/
public class TestSingletonListIterator<E> extends AbstractTestListIterator<E> {
public class SingletonListIteratorTest<E> extends AbstractListIteratorTest<E> {
private static final Object testValue = "foo";
public TestSingletonListIterator(String testName) {
public SingletonListIteratorTest(String testName) {
super(testName);
}

View File

@ -24,14 +24,9 @@ import java.util.NoSuchElementException;
/**
* Tests the UniqueFilterIterator class.
*
* @version $Revision$
*
* @author James Strachan
* @author Mauricio S. Moura
* @author Morgan Delagrange
* @author Stephen Colebourne
* @version $Id$
*/
public class TestUniqueFilterIterator<E> extends AbstractTestIterator<E> {
public class UniqueFilterIteratorTest<E> extends AbstractIteratorTest<E> {
protected String[] testArray = {
"One", "Two", "Three", "Four", "Five", "Six"
@ -39,7 +34,7 @@ public class TestUniqueFilterIterator<E> extends AbstractTestIterator<E> {
protected List<E> list1 = null;
public TestUniqueFilterIterator(String testName) {
public UniqueFilterIteratorTest(String testName) {
super(testName);
}

View File

@ -27,16 +27,14 @@ import org.apache.commons.collections.Unmodifiable;
/**
* Tests the UnmodifiableIterator.
*
* @version $Revision$
*
* @author Stephen Colebourne
* @version $Id$
*/
public class TestUnmodifiableIterator<E> extends AbstractTestIterator<E> {
public class UnmodifiableIteratorTest<E> extends AbstractIteratorTest<E> {
protected String[] testArray = { "One", "Two", "Three" };
protected List<E> testList;
public TestUnmodifiableIterator(String testName) {
public UnmodifiableIteratorTest(String testName) {
super(testName);
}

View File

@ -27,16 +27,14 @@ import org.apache.commons.collections.Unmodifiable;
/**
* Tests the UnmodifiableListIterator.
*
* @version $Revision$
*
* @author Stephen Colebourne
* @version $Id$
*/
public class TestUnmodifiableListIterator<E> extends AbstractTestListIterator<E> {
public class UnmodifiableListIteratorTest<E> extends AbstractListIteratorTest<E> {
protected String[] testArray = { "One", "Two", "Three" };
protected List<E> testList;
public TestUnmodifiableListIterator(String testName) {
public UnmodifiableListIteratorTest(String testName) {
super(testName);
}

View File

@ -27,13 +27,11 @@ import org.apache.commons.collections.bidimap.DualHashBidiMap;
/**
* Tests the UnmodifiableMapIterator.
*
* @version $Revision$
*
* @author Stephen Colebourne
* @version $Id$
*/
public class TestUnmodifiableMapIterator<K, V> extends AbstractTestMapIterator<K, V> {
public class UnmodifiableMapIteratorTest<K, V> extends AbstractMapIteratorTest<K, V> {
public TestUnmodifiableMapIterator(String testName) {
public UnmodifiableMapIteratorTest(String testName) {
super(testName);
}

View File

@ -28,13 +28,11 @@ import org.apache.commons.collections.map.ListOrderedMap;
/**
* Tests the UnmodifiableOrderedMapIterator.
*
* @version $Revision$
*
* @author Stephen Colebourne
* @version $Id$
*/
public class TestUnmodifiableOrderedMapIterator<K, V> extends AbstractTestOrderedMapIterator<K, V> {
public class UnmodifiableOrderedMapIteratorTest<K, V> extends AbstractOrderedMapIteratorTest<K, V> {
public TestUnmodifiableOrderedMapIterator(String testName) {
public UnmodifiableOrderedMapIteratorTest(String testName) {
super(testName);
}