Rename test classes for map package.

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/collections/trunk@1409169 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Thomas Neidhart 2012-11-14 11:36:54 +00:00
parent 23e3b0f0fc
commit 806c1d78d5
38 changed files with 198 additions and 199 deletions

View File

@ -447,7 +447,6 @@
<artifactId>maven-surefire-plugin</artifactId> <artifactId>maven-surefire-plugin</artifactId>
<configuration> <configuration>
<includes> <includes>
<include>**/Test*.java</include>
<include>**/*Test.java</include> <include>**/*Test.java</include>
</includes> </includes>
<excludes> <excludes>

View File

@ -18,7 +18,7 @@ package org.apache.commons.collections;
import java.util.TreeMap; import java.util.TreeMap;
import org.apache.commons.collections.map.AbstractTestMap; import org.apache.commons.collections.map.AbstractMapTest;
/** /**
* Tests TreeMap. * Tests TreeMap.
@ -27,7 +27,7 @@ import org.apache.commons.collections.map.AbstractTestMap;
* *
* @author Jason van Zyl * @author Jason van Zyl
*/ */
public abstract class AbstractTreeMapTest<K, V> extends AbstractTestMap<K, V> { public abstract class AbstractTreeMapTest<K, V> extends AbstractMapTest<K, V> {
public AbstractTreeMapTest(String testName) { public AbstractTreeMapTest(String testName) {
super(testName); super(testName);

View File

@ -26,14 +26,14 @@ import org.apache.commons.collections.BidiMap;
import org.apache.commons.collections.BulkTest; import org.apache.commons.collections.BulkTest;
import org.apache.commons.collections.MapIterator; import org.apache.commons.collections.MapIterator;
import org.apache.commons.collections.iterators.AbstractMapIteratorTest; import org.apache.commons.collections.iterators.AbstractMapIteratorTest;
import org.apache.commons.collections.map.AbstractTestIterableMap; import org.apache.commons.collections.map.AbstractIterableMapTest;
/** /**
* Abstract test class for {@link BidiMap} methods and contracts. * Abstract test class for {@link BidiMap} methods and contracts.
* *
* @version $Id$ * @version $Id$
*/ */
public abstract class AbstractBidiMapTest<K, V> extends AbstractTestIterableMap<K, V> { public abstract class AbstractBidiMapTest<K, V> extends AbstractIterableMapTest<K, V> {
public AbstractBidiMapTest(String testName) { public AbstractBidiMapTest(String testName) {
super(testName); super(testName);

View File

@ -29,7 +29,7 @@ import java.util.TreeSet;
import org.apache.commons.collections.BulkTest; import org.apache.commons.collections.BulkTest;
import org.apache.commons.collections.SortedBidiMap; import org.apache.commons.collections.SortedBidiMap;
import org.apache.commons.collections.map.AbstractTestSortedMap; import org.apache.commons.collections.map.AbstractSortedMapTest;
/** /**
* Abstract test class for {@link SortedBidiMap} methods and contracts. * Abstract test class for {@link SortedBidiMap} methods and contracts.
@ -628,15 +628,15 @@ public abstract class AbstractSortedBidiMapTest<K extends Comparable<K>, V exten
//----------------------------------------------------------------------- //-----------------------------------------------------------------------
public BulkTest bulkTestHeadMap() { public BulkTest bulkTestHeadMap() {
return new AbstractTestSortedMap.TestHeadMap<K, V>(this); return new AbstractSortedMapTest.TestHeadMap<K, V>(this);
} }
public BulkTest bulkTestTailMap() { public BulkTest bulkTestTailMap() {
return new AbstractTestSortedMap.TestTailMap<K, V>(this); return new AbstractSortedMapTest.TestTailMap<K, V>(this);
} }
public BulkTest bulkTestSubMap() { public BulkTest bulkTestSubMap() {
return new AbstractTestSortedMap.TestSubMap<K, V>(this); return new AbstractSortedMapTest.TestSubMap<K, V>(this);
} }
} }

View File

@ -90,7 +90,7 @@ import org.apache.commons.collections.AbstractObjectTest;
* {@link #confirmed}, the {@link #verify()} method is invoked to compare * {@link #confirmed}, the {@link #verify()} method is invoked to compare
* the results. You may want to override {@link #verify()} to perform * the results. You may want to override {@link #verify()} to perform
* additional verifications. For instance, when testing the collection * additional verifications. For instance, when testing the collection
* views of a map, {@link org.apache.commons.collections.map.AbstractTestMap AbstractTestMap} * views of a map, {@link org.apache.commons.collections.map.AbstractMapTest AbstractTestMap}
* would override {@link #verify()} to make * would override {@link #verify()} to make
* sure the map is changed after the collection view is changed. * sure the map is changed after the collection view is changed.
* <p> * <p>

View File

@ -1504,7 +1504,7 @@ public class CursorableLinkedListTest<E> extends AbstractLinkedListTest<E> {
@Override @Override
public String[] ignoredTests() { public String[] ignoredTests() {
ArrayList<String> list = new ArrayList<String>(); ArrayList<String> list = new ArrayList<String>();
String prefix = "TestCursorableLinkedList"; String prefix = "CursorableLinkedListTest";
String bulk = ".bulkTestSubList"; String bulk = ".bulkTestSubList";
String[] ignored = new String[] { String[] ignored = new String[] {
".testEmptyListSerialization", ".testEmptyListSerialization",

View File

@ -32,14 +32,14 @@ import org.apache.commons.collections.iterators.AbstractMapIteratorTest;
* *
* @author Stephen Colebourne * @author Stephen Colebourne
*/ */
public abstract class AbstractTestIterableMap<K, V> extends AbstractTestMap<K, V> { public abstract class AbstractIterableMapTest<K, V> extends AbstractMapTest<K, V> {
/** /**
* JUnit constructor. * JUnit constructor.
* *
* @param testName the test name * @param testName the test name
*/ */
public AbstractTestIterableMap(String testName) { public AbstractIterableMapTest(String testName) {
super(testName); super(testName);
} }
@ -136,52 +136,52 @@ public abstract class AbstractTestIterableMap<K, V> extends AbstractTestMap<K, V
@Override @Override
public V[] addSetValues() { public V[] addSetValues() {
return AbstractTestIterableMap.this.getNewSampleValues(); return AbstractIterableMapTest.this.getNewSampleValues();
} }
@Override @Override
public boolean supportsRemove() { public boolean supportsRemove() {
return AbstractTestIterableMap.this.isRemoveSupported(); return AbstractIterableMapTest.this.isRemoveSupported();
} }
@Override @Override
public boolean isGetStructuralModify() { public boolean isGetStructuralModify() {
return AbstractTestIterableMap.this.isGetStructuralModify(); return AbstractIterableMapTest.this.isGetStructuralModify();
} }
@Override @Override
public boolean supportsSetValue() { public boolean supportsSetValue() {
return AbstractTestIterableMap.this.isSetValueSupported(); return AbstractIterableMapTest.this.isSetValueSupported();
} }
@Override @Override
public MapIterator<K, V> makeEmptyIterator() { public MapIterator<K, V> makeEmptyIterator() {
resetEmpty(); resetEmpty();
return AbstractTestIterableMap.this.getMap().mapIterator(); return AbstractIterableMapTest.this.getMap().mapIterator();
} }
@Override @Override
public MapIterator<K, V> makeObject() { public MapIterator<K, V> makeObject() {
resetFull(); resetFull();
return AbstractTestIterableMap.this.getMap().mapIterator(); return AbstractIterableMapTest.this.getMap().mapIterator();
} }
@Override @Override
public Map<K, V> getMap() { public Map<K, V> getMap() {
// assumes makeFullMapIterator() called first // assumes makeFullMapIterator() called first
return AbstractTestIterableMap.this.getMap(); return AbstractIterableMapTest.this.getMap();
} }
@Override @Override
public Map<K, V> getConfirmedMap() { public Map<K, V> getConfirmedMap() {
// assumes makeFullMapIterator() called first // assumes makeFullMapIterator() called first
return AbstractTestIterableMap.this.getConfirmed(); return AbstractIterableMapTest.this.getConfirmed();
} }
@Override @Override
public void verify() { public void verify() {
super.verify(); super.verify();
AbstractTestIterableMap.this.verify(); AbstractIterableMapTest.this.verify();
} }
} }

View File

@ -125,7 +125,7 @@ import org.apache.commons.collections.set.AbstractSetTest;
* @author Stephen Colebourne * @author Stephen Colebourne
* @version $Revision$ * @version $Revision$
*/ */
public abstract class AbstractTestMap<K, V> extends AbstractObjectTest { public abstract class AbstractMapTest<K, V> extends AbstractObjectTest {
/** /**
* JDK1.2 has bugs in null handling of Maps, especially HashMap.Entry.toString * JDK1.2 has bugs in null handling of Maps, especially HashMap.Entry.toString
@ -165,7 +165,7 @@ public abstract class AbstractTestMap<K, V> extends AbstractObjectTest {
* *
* @param testName the test name * @param testName the test name
*/ */
public AbstractTestMap(String testName) { public AbstractMapTest(String testName) {
super(testName); super(testName);
} }
@ -1554,7 +1554,7 @@ public abstract class AbstractTestMap<K, V> extends AbstractObjectTest {
@Override @Override
public Set<Map.Entry<K, V>> makeObject() { public Set<Map.Entry<K, V>> makeObject() {
return AbstractTestMap.this.makeObject().entrySet(); return AbstractMapTest.this.makeObject().entrySet();
} }
@Override @Override
@ -1571,11 +1571,11 @@ public abstract class AbstractTestMap<K, V> extends AbstractObjectTest {
@Override @Override
public boolean isRemoveSupported() { public boolean isRemoveSupported() {
// Entry set should only support remove if map does // Entry set should only support remove if map does
return AbstractTestMap.this.isRemoveSupported(); return AbstractMapTest.this.isRemoveSupported();
} }
public boolean isGetStructuralModify() { public boolean isGetStructuralModify() {
return AbstractTestMap.this.isGetStructuralModify(); return AbstractMapTest.this.isGetStructuralModify();
} }
@Override @Override
@ -1585,16 +1585,16 @@ public abstract class AbstractTestMap<K, V> extends AbstractObjectTest {
@Override @Override
public void resetFull() { public void resetFull() {
AbstractTestMap.this.resetFull(); AbstractMapTest.this.resetFull();
setCollection(AbstractTestMap.this.getMap().entrySet()); setCollection(AbstractMapTest.this.getMap().entrySet());
TestMapEntrySet.this.setConfirmed(AbstractTestMap.this.getConfirmed().entrySet()); TestMapEntrySet.this.setConfirmed(AbstractMapTest.this.getConfirmed().entrySet());
} }
@Override @Override
public void resetEmpty() { public void resetEmpty() {
AbstractTestMap.this.resetEmpty(); AbstractMapTest.this.resetEmpty();
setCollection(AbstractTestMap.this.getMap().entrySet()); setCollection(AbstractMapTest.this.getMap().entrySet());
TestMapEntrySet.this.setConfirmed(AbstractTestMap.this.getConfirmed().entrySet()); TestMapEntrySet.this.setConfirmed(AbstractMapTest.this.getConfirmed().entrySet());
} }
public void testMapEntrySetIteratorEntry() { public void testMapEntrySetIteratorEntry() {
@ -1603,10 +1603,10 @@ public abstract class AbstractTestMap<K, V> extends AbstractObjectTest {
int count = 0; int count = 0;
while (it.hasNext()) { while (it.hasNext()) {
Map.Entry<K, V> entry = it.next(); Map.Entry<K, V> entry = it.next();
assertEquals(true, AbstractTestMap.this.getMap().containsKey(entry.getKey())); assertEquals(true, AbstractMapTest.this.getMap().containsKey(entry.getKey()));
assertEquals(true, AbstractTestMap.this.getMap().containsValue(entry.getValue())); assertEquals(true, AbstractMapTest.this.getMap().containsValue(entry.getValue()));
if (isGetStructuralModify() == false) { if (isGetStructuralModify() == false) {
assertEquals(AbstractTestMap.this.getMap().get(entry.getKey()), entry.getValue()); assertEquals(AbstractMapTest.this.getMap().get(entry.getKey()), entry.getValue());
} }
count++; count++;
} }
@ -1643,25 +1643,25 @@ public abstract class AbstractTestMap<K, V> extends AbstractObjectTest {
entry1.setValue(newValue1); entry1.setValue(newValue1);
entryConfirmed1.setValue(newValue1); entryConfirmed1.setValue(newValue1);
assertEquals(newValue1, entry1.getValue()); assertEquals(newValue1, entry1.getValue());
assertEquals(true, AbstractTestMap.this.getMap().containsKey(entry1.getKey())); assertEquals(true, AbstractMapTest.this.getMap().containsKey(entry1.getKey()));
assertEquals(true, AbstractTestMap.this.getMap().containsValue(newValue1)); assertEquals(true, AbstractMapTest.this.getMap().containsValue(newValue1));
assertEquals(newValue1, AbstractTestMap.this.getMap().get(entry1.getKey())); assertEquals(newValue1, AbstractMapTest.this.getMap().get(entry1.getKey()));
verify(); verify();
entry1.setValue(newValue1); entry1.setValue(newValue1);
entryConfirmed1.setValue(newValue1); entryConfirmed1.setValue(newValue1);
assertEquals(newValue1, entry1.getValue()); assertEquals(newValue1, entry1.getValue());
assertEquals(true, AbstractTestMap.this.getMap().containsKey(entry1.getKey())); assertEquals(true, AbstractMapTest.this.getMap().containsKey(entry1.getKey()));
assertEquals(true, AbstractTestMap.this.getMap().containsValue(newValue1)); assertEquals(true, AbstractMapTest.this.getMap().containsValue(newValue1));
assertEquals(newValue1, AbstractTestMap.this.getMap().get(entry1.getKey())); assertEquals(newValue1, AbstractMapTest.this.getMap().get(entry1.getKey()));
verify(); verify();
entry2.setValue(newValue2); entry2.setValue(newValue2);
entryConfirmed2.setValue(newValue2); entryConfirmed2.setValue(newValue2);
assertEquals(newValue2, entry2.getValue()); assertEquals(newValue2, entry2.getValue());
assertEquals(true, AbstractTestMap.this.getMap().containsKey(entry2.getKey())); assertEquals(true, AbstractMapTest.this.getMap().containsKey(entry2.getKey()));
assertEquals(true, AbstractTestMap.this.getMap().containsValue(newValue2)); assertEquals(true, AbstractMapTest.this.getMap().containsValue(newValue2));
assertEquals(newValue2, AbstractTestMap.this.getMap().get(entry2.getKey())); assertEquals(newValue2, AbstractMapTest.this.getMap().get(entry2.getKey()));
verify(); verify();
} }
@ -1693,7 +1693,7 @@ public abstract class AbstractTestMap<K, V> extends AbstractObjectTest {
@Override @Override
public void verify() { public void verify() {
super.verify(); super.verify();
AbstractTestMap.this.verify(); AbstractMapTest.this.verify();
} }
} }
@ -1727,17 +1727,17 @@ public abstract class AbstractTestMap<K, V> extends AbstractObjectTest {
@Override @Override
public Set<K> makeObject() { public Set<K> makeObject() {
return AbstractTestMap.this.makeObject().keySet(); return AbstractMapTest.this.makeObject().keySet();
} }
@Override @Override
public Set<K> makeFullCollection() { public Set<K> makeFullCollection() {
return AbstractTestMap.this.makeFullMap().keySet(); return AbstractMapTest.this.makeFullMap().keySet();
} }
@Override @Override
public boolean isNullSupported() { public boolean isNullSupported() {
return AbstractTestMap.this.isAllowNullKey(); return AbstractMapTest.this.isAllowNullKey();
} }
@Override @Override
@ -1747,7 +1747,7 @@ public abstract class AbstractTestMap<K, V> extends AbstractObjectTest {
@Override @Override
public boolean isRemoveSupported() { public boolean isRemoveSupported() {
return AbstractTestMap.this.isRemoveSupported(); return AbstractMapTest.this.isRemoveSupported();
} }
@Override @Override
@ -1757,22 +1757,22 @@ public abstract class AbstractTestMap<K, V> extends AbstractObjectTest {
@Override @Override
public void resetEmpty() { public void resetEmpty() {
AbstractTestMap.this.resetEmpty(); AbstractMapTest.this.resetEmpty();
setCollection(AbstractTestMap.this.getMap().keySet()); setCollection(AbstractMapTest.this.getMap().keySet());
TestMapKeySet.this.setConfirmed(AbstractTestMap.this.getConfirmed().keySet()); TestMapKeySet.this.setConfirmed(AbstractMapTest.this.getConfirmed().keySet());
} }
@Override @Override
public void resetFull() { public void resetFull() {
AbstractTestMap.this.resetFull(); AbstractMapTest.this.resetFull();
setCollection(AbstractTestMap.this.getMap().keySet()); setCollection(AbstractMapTest.this.getMap().keySet());
TestMapKeySet.this.setConfirmed(AbstractTestMap.this.getConfirmed().keySet()); TestMapKeySet.this.setConfirmed(AbstractMapTest.this.getConfirmed().keySet());
} }
@Override @Override
public void verify() { public void verify() {
super.verify(); super.verify();
AbstractTestMap.this.verify(); AbstractMapTest.this.verify();
} }
} }
@ -1806,17 +1806,17 @@ public abstract class AbstractTestMap<K, V> extends AbstractObjectTest {
@Override @Override
public Collection<V> makeObject() { public Collection<V> makeObject() {
return AbstractTestMap.this.makeObject().values(); return AbstractMapTest.this.makeObject().values();
} }
@Override @Override
public Collection<V> makeFullCollection() { public Collection<V> makeFullCollection() {
return AbstractTestMap.this.makeFullMap().values(); return AbstractMapTest.this.makeFullMap().values();
} }
@Override @Override
public boolean isNullSupported() { public boolean isNullSupported() {
return AbstractTestMap.this.isAllowNullKey(); return AbstractMapTest.this.isAllowNullKey();
} }
@Override @Override
@ -1826,7 +1826,7 @@ public abstract class AbstractTestMap<K, V> extends AbstractObjectTest {
@Override @Override
public boolean isRemoveSupported() { public boolean isRemoveSupported() {
return AbstractTestMap.this.isRemoveSupported(); return AbstractMapTest.this.isRemoveSupported();
} }
@Override @Override
@ -1855,22 +1855,22 @@ public abstract class AbstractTestMap<K, V> extends AbstractObjectTest {
@Override @Override
public void resetFull() { public void resetFull() {
AbstractTestMap.this.resetFull(); AbstractMapTest.this.resetFull();
setCollection(map.values()); setCollection(map.values());
TestMapValues.this.setConfirmed(AbstractTestMap.this.getConfirmed().values()); TestMapValues.this.setConfirmed(AbstractMapTest.this.getConfirmed().values());
} }
@Override @Override
public void resetEmpty() { public void resetEmpty() {
AbstractTestMap.this.resetEmpty(); AbstractMapTest.this.resetEmpty();
setCollection(map.values()); setCollection(map.values());
TestMapValues.this.setConfirmed(AbstractTestMap.this.getConfirmed().values()); TestMapValues.this.setConfirmed(AbstractMapTest.this.getConfirmed().values());
} }
@Override @Override
public void verify() { public void verify() {
super.verify(); super.verify();
AbstractTestMap.this.verify(); AbstractMapTest.this.verify();
} }
// TODO: should test that a remove on the values collection view // TODO: should test that a remove on the values collection view

View File

@ -38,14 +38,14 @@ import org.apache.commons.collections.iterators.AbstractOrderedMapIteratorTest;
* *
* @author Stephen Colebourne * @author Stephen Colebourne
*/ */
public abstract class AbstractTestOrderedMap<K, V> extends AbstractTestIterableMap<K, V> { public abstract class AbstractOrderedMapTest<K, V> extends AbstractIterableMapTest<K, V> {
/** /**
* JUnit constructor. * JUnit constructor.
* *
* @param testName the test name * @param testName the test name
*/ */
public AbstractTestOrderedMap(String testName) { public AbstractOrderedMapTest(String testName) {
super(testName); super(testName);
} }
@ -201,47 +201,47 @@ public abstract class AbstractTestOrderedMap<K, V> extends AbstractTestIterableM
@Override @Override
public boolean supportsRemove() { public boolean supportsRemove() {
return AbstractTestOrderedMap.this.isRemoveSupported(); return AbstractOrderedMapTest.this.isRemoveSupported();
} }
@Override @Override
public boolean isGetStructuralModify() { public boolean isGetStructuralModify() {
return AbstractTestOrderedMap.this.isGetStructuralModify(); return AbstractOrderedMapTest.this.isGetStructuralModify();
} }
@Override @Override
public boolean supportsSetValue() { public boolean supportsSetValue() {
return AbstractTestOrderedMap.this.isSetValueSupported(); return AbstractOrderedMapTest.this.isSetValueSupported();
} }
@Override @Override
public OrderedMapIterator<K, V> makeEmptyIterator() { public OrderedMapIterator<K, V> makeEmptyIterator() {
resetEmpty(); resetEmpty();
return AbstractTestOrderedMap.this.getMap().mapIterator(); return AbstractOrderedMapTest.this.getMap().mapIterator();
} }
@Override @Override
public OrderedMapIterator<K, V> makeObject() { public OrderedMapIterator<K, V> makeObject() {
resetFull(); resetFull();
return AbstractTestOrderedMap.this.getMap().mapIterator(); return AbstractOrderedMapTest.this.getMap().mapIterator();
} }
@Override @Override
public OrderedMap<K, V> getMap() { public OrderedMap<K, V> getMap() {
// assumes makeFullMapIterator() called first // assumes makeFullMapIterator() called first
return AbstractTestOrderedMap.this.getMap(); return AbstractOrderedMapTest.this.getMap();
} }
@Override @Override
public Map<K, V> getConfirmedMap() { public Map<K, V> getConfirmedMap() {
// assumes makeFullMapIterator() called first // assumes makeFullMapIterator() called first
return AbstractTestOrderedMap.this.getConfirmed(); return AbstractOrderedMapTest.this.getConfirmed();
} }
@Override @Override
public void verify() { public void verify() {
super.verify(); super.verify();
AbstractTestOrderedMap.this.verify(); AbstractOrderedMapTest.this.verify();
} }
} }

View File

@ -33,14 +33,14 @@ import org.apache.commons.collections.BulkTest;
* *
* @author Stephen Colebourne * @author Stephen Colebourne
*/ */
public abstract class AbstractTestSortedMap<K, V> extends AbstractTestMap<K, V> { public abstract class AbstractSortedMapTest<K, V> extends AbstractMapTest<K, V> {
/** /**
* JUnit constructor. * JUnit constructor.
* *
* @param testName the test name * @param testName the test name
*/ */
public AbstractTestSortedMap(String testName) { public AbstractSortedMapTest(String testName) {
super(testName); super(testName);
} }
@ -112,13 +112,13 @@ public abstract class AbstractTestSortedMap<K, V> extends AbstractTestMap<K, V>
return new TestSubMap<K, V>(this); return new TestSubMap<K, V>(this);
} }
public static abstract class TestViewMap <K, V> extends AbstractTestSortedMap<K, V> { public static abstract class TestViewMap <K, V> extends AbstractSortedMapTest<K, V> {
protected final AbstractTestMap<K, V> main; protected final AbstractMapTest<K, V> main;
protected final List<K> subSortedKeys = new ArrayList<K>(); protected final List<K> subSortedKeys = new ArrayList<K>();
protected final List<V> subSortedValues = new ArrayList<V>(); protected final List<V> subSortedValues = new ArrayList<V>();
protected final List<V> subSortedNewValues = new ArrayList<V>(); protected final List<V> subSortedNewValues = new ArrayList<V>();
public TestViewMap(String name, AbstractTestMap<K, V> main) { public TestViewMap(String name, AbstractMapTest<K, V> main) {
super(name); super(name);
this.main = main; this.main = main;
} }
@ -215,7 +215,7 @@ public abstract class AbstractTestSortedMap<K, V> extends AbstractTestMap<K, V>
static final int SUBSIZE = 6; static final int SUBSIZE = 6;
final K toKey; final K toKey;
public TestHeadMap(AbstractTestMap<K, V> main) { public TestHeadMap(AbstractMapTest<K, V> main) {
super("SortedMap.HeadMap", main); super("SortedMap.HeadMap", main);
Map<K, V> sm = main.makeFullMap(); Map<K, V> sm = main.makeFullMap();
for (Iterator<Map.Entry<K, V>> it = sm.entrySet().iterator(); it.hasNext();) { for (Iterator<Map.Entry<K, V>> it = sm.entrySet().iterator(); it.hasNext();) {
@ -268,7 +268,7 @@ public abstract class AbstractTestSortedMap<K, V> extends AbstractTestMap<K, V>
final K fromKey; final K fromKey;
final K invalidKey; final K invalidKey;
public TestTailMap(AbstractTestMap<K, V> main) { public TestTailMap(AbstractMapTest<K, V> main) {
super("SortedMap.TailMap", main); super("SortedMap.TailMap", main);
Map<K, V> sm = main.makeFullMap(); Map<K, V> sm = main.makeFullMap();
for (Iterator<Map.Entry<K, V>> it = sm.entrySet().iterator(); it.hasNext();) { for (Iterator<Map.Entry<K, V>> it = sm.entrySet().iterator(); it.hasNext();) {
@ -322,7 +322,7 @@ public abstract class AbstractTestSortedMap<K, V> extends AbstractTestMap<K, V>
final K fromKey; final K fromKey;
final K toKey; final K toKey;
public TestSubMap(AbstractTestMap<K, V> main) { public TestSubMap(AbstractMapTest<K, V> main) {
super("SortedMap.SubMap", main); super("SortedMap.SubMap", main);
Map<K, V> sm = main.makeFullMap(); Map<K, V> sm = main.makeFullMap();
for (Iterator<Map.Entry<K, V>> it = sm.entrySet().iterator(); it.hasNext();) { for (Iterator<Map.Entry<K, V>> it = sm.entrySet().iterator(); it.hasNext();) {

View File

@ -31,14 +31,14 @@ import org.apache.commons.collections.BulkTest;
* *
* @author Commons-Collections team * @author Commons-Collections team
*/ */
public class TestCaseInsensitiveMap<K, V> extends AbstractTestIterableMap<K, V> { public class CaseInsensitiveMapTest<K, V> extends AbstractIterableMapTest<K, V> {
public TestCaseInsensitiveMap(String testName) { public CaseInsensitiveMapTest(String testName) {
super(testName); super(testName);
} }
public static Test suite() { public static Test suite() {
return BulkTest.makeSuite(TestCaseInsensitiveMap.class); return BulkTest.makeSuite(CaseInsensitiveMapTest.class);
} }
@Override @Override

View File

@ -23,7 +23,7 @@ import java.util.HashMap;
import java.util.Collection; import java.util.Collection;
/** /**
* Extension of {@link AbstractTestMap} for exercising the * Extension of {@link AbstractMapTest} for exercising the
* {@link CompositeMap} implementation. * {@link CompositeMap} implementation.
* *
* @since Commons Collections 3.0 * @since Commons Collections 3.0
@ -31,11 +31,11 @@ import java.util.Collection;
* *
* @author Brian McCallister * @author Brian McCallister
*/ */
public class TestCompositeMap<K, V> extends AbstractTestIterableMap<K, V> { public class CompositeMapTest<K, V> extends AbstractIterableMapTest<K, V> {
/** used as a flag in MapMutator tests */ /** used as a flag in MapMutator tests */
private boolean pass = false; private boolean pass = false;
public TestCompositeMap(String testName) { public CompositeMapTest(String testName) {
super(testName); super(testName);
} }

View File

@ -26,7 +26,7 @@ import org.apache.commons.collections.Transformer;
import org.apache.commons.collections.functors.ConstantFactory; import org.apache.commons.collections.functors.ConstantFactory;
/** /**
* Extension of {@link AbstractTestMap} for exercising the * Extension of {@link AbstractMapTest} for exercising the
* {@link DefaultedMap} implementation. * {@link DefaultedMap} implementation.
* *
* @since Commons Collections 3.2 * @since Commons Collections 3.2
@ -34,11 +34,11 @@ import org.apache.commons.collections.functors.ConstantFactory;
* *
* @author Stephen Colebourne * @author Stephen Colebourne
*/ */
public class TestDefaultedMap<K, V> extends AbstractTestIterableMap<K, V> { public class DefaultedMapTest<K, V> extends AbstractIterableMapTest<K, V> {
protected final Factory<V> nullFactory = FactoryUtils.<V>nullFactory(); protected final Factory<V> nullFactory = FactoryUtils.<V>nullFactory();
public TestDefaultedMap(String testName) { public DefaultedMapTest(String testName) {
super(testName); super(testName);
} }

View File

@ -22,7 +22,7 @@ import java.util.Map;
import org.apache.commons.collections.IterableMap; import org.apache.commons.collections.IterableMap;
/** /**
* Extension of {@link AbstractTestMap} for exercising the {@link FixedSizeMap} * Extension of {@link AbstractMapTest} for exercising the {@link FixedSizeMap}
* implementation. * implementation.
* *
* @since Commons Collections 3.0 * @since Commons Collections 3.0
@ -30,9 +30,9 @@ import org.apache.commons.collections.IterableMap;
* *
* @author Stephen Colebourne * @author Stephen Colebourne
*/ */
public class TestFixedSizeMap<K, V> extends AbstractTestIterableMap<K, V> { public class FixedSizeMapTest<K, V> extends AbstractIterableMapTest<K, V> {
public TestFixedSizeMap(String testName) { public FixedSizeMapTest(String testName) {
super(testName); super(testName);
} }

View File

@ -24,7 +24,7 @@ import junit.framework.Test;
import org.apache.commons.collections.BulkTest; import org.apache.commons.collections.BulkTest;
/** /**
* Extension of {@link AbstractTestSortedMap} for exercising the {@link FixedSizeSortedMap} * Extension of {@link AbstractSortedMapTest} for exercising the {@link FixedSizeSortedMap}
* implementation. * implementation.
* *
* @since Commons Collections 3.0 * @since Commons Collections 3.0
@ -32,14 +32,14 @@ import org.apache.commons.collections.BulkTest;
* *
* @author Stephen Colebourne * @author Stephen Colebourne
*/ */
public class TestFixedSizeSortedMap<K, V> extends AbstractTestSortedMap<K, V> { public class FixedSizeSortedMapTest<K, V> extends AbstractSortedMapTest<K, V> {
public TestFixedSizeSortedMap(String testName) { public FixedSizeSortedMapTest(String testName) {
super(testName); super(testName);
} }
public static Test suite() { public static Test suite() {
return BulkTest.makeSuite(TestFixedSizeSortedMap.class); return BulkTest.makeSuite(FixedSizeSortedMapTest.class);
} }
//----------------------------------------------------------------------- //-----------------------------------------------------------------------

View File

@ -36,7 +36,7 @@ import org.apache.commons.collections.iterators.AbstractMapIteratorTest;
* *
* @author Stephen Colebourne * @author Stephen Colebourne
*/ */
public class TestFlat3Map<K, V> extends AbstractTestIterableMap<K, V> { public class Flat3MapTest<K, V> extends AbstractIterableMapTest<K, V> {
private static final Integer ONE = new Integer(1); private static final Integer ONE = new Integer(1);
private static final Integer TWO = new Integer(2); private static final Integer TWO = new Integer(2);
@ -45,12 +45,12 @@ public class TestFlat3Map<K, V> extends AbstractTestIterableMap<K, V> {
private static final String TWENTY = "20"; private static final String TWENTY = "20";
private static final String THIRTY = "30"; private static final String THIRTY = "30";
public TestFlat3Map(String testName) { public Flat3MapTest(String testName) {
super(testName); super(testName);
} }
public static Test suite() { public static Test suite() {
return BulkTest.makeSuite(TestFlat3Map.class); return BulkTest.makeSuite(Flat3MapTest.class);
} }
@Override @Override
@ -350,47 +350,47 @@ public class TestFlat3Map<K, V> extends AbstractTestIterableMap<K, V> {
@Override @Override
public V[] addSetValues() { public V[] addSetValues() {
return TestFlat3Map.this.getNewSampleValues(); return Flat3MapTest.this.getNewSampleValues();
} }
@Override @Override
public boolean supportsRemove() { public boolean supportsRemove() {
return TestFlat3Map.this.isRemoveSupported(); return Flat3MapTest.this.isRemoveSupported();
} }
@Override @Override
public boolean supportsSetValue() { public boolean supportsSetValue() {
return TestFlat3Map.this.isSetValueSupported(); return Flat3MapTest.this.isSetValueSupported();
} }
@Override @Override
public MapIterator<K, V> makeEmptyIterator() { public MapIterator<K, V> makeEmptyIterator() {
resetEmpty(); resetEmpty();
return TestFlat3Map.this.getMap().mapIterator(); return Flat3MapTest.this.getMap().mapIterator();
} }
@Override @Override
public MapIterator<K, V> makeObject() { public MapIterator<K, V> makeObject() {
resetFull(); resetFull();
return TestFlat3Map.this.getMap().mapIterator(); return Flat3MapTest.this.getMap().mapIterator();
} }
@Override @Override
public IterableMap<K, V> getMap() { public IterableMap<K, V> getMap() {
// assumes makeFullMapIterator() called first // assumes makeFullMapIterator() called first
return TestFlat3Map.this.getMap(); return Flat3MapTest.this.getMap();
} }
@Override @Override
public Map<K, V> getConfirmedMap() { public Map<K, V> getConfirmedMap() {
// assumes makeFullMapIterator() called first // assumes makeFullMapIterator() called first
return TestFlat3Map.this.getConfirmed(); return Flat3MapTest.this.getConfirmed();
} }
@Override @Override
public void verify() { public void verify() {
super.verify(); super.verify();
TestFlat3Map.this.verify(); Flat3MapTest.this.verify();
} }
} }

View File

@ -26,14 +26,14 @@ import org.apache.commons.collections.BulkTest;
* *
* @author Stephen Colebourne * @author Stephen Colebourne
*/ */
public class TestHashedMap<K, V> extends AbstractTestIterableMap<K, V> { public class HashedMapTest<K, V> extends AbstractIterableMapTest<K, V> {
public TestHashedMap(String testName) { public HashedMapTest(String testName) {
super(testName); super(testName);
} }
public static Test suite() { public static Test suite() {
return BulkTest.makeSuite(TestHashedMap.class); return BulkTest.makeSuite(HashedMapTest.class);
} }
@Override @Override

View File

@ -33,19 +33,19 @@ import org.apache.commons.collections.IterableMap;
* *
* @author Stephen Colebourne * @author Stephen Colebourne
*/ */
public class TestIdentityMap<K, V> extends AbstractObjectTest { public class IdentityMapTest<K, V> extends AbstractObjectTest {
private static final Integer I1A = new Integer(1); private static final Integer I1A = new Integer(1);
private static final Integer I1B = new Integer(1); private static final Integer I1B = new Integer(1);
private static final Integer I2A = new Integer(2); private static final Integer I2A = new Integer(2);
private static final Integer I2B = new Integer(2); private static final Integer I2B = new Integer(2);
public TestIdentityMap(String testName) { public IdentityMapTest(String testName) {
super(testName); super(testName);
} }
public static Test suite() { public static Test suite() {
return new TestSuite(TestIdentityMap.class); return new TestSuite(IdentityMapTest.class);
// return BulkTest.makeSuite(TestIdentityMap.class); // causes race condition! // return BulkTest.makeSuite(TestIdentityMap.class); // causes race condition!
} }

View File

@ -35,14 +35,14 @@ import org.apache.commons.collections.ResettableIterator;
* *
* @author Stephen Colebourne * @author Stephen Colebourne
*/ */
public class TestLRUMap<K, V> extends AbstractTestOrderedMap<K, V> { public class LRUMapTest<K, V> extends AbstractOrderedMapTest<K, V> {
public TestLRUMap(String testName) { public LRUMapTest(String testName) {
super(testName); super(testName);
} }
public static Test suite() { public static Test suite() {
return BulkTest.makeSuite(TestLRUMap.class); return BulkTest.makeSuite(LRUMapTest.class);
} }
@Override @Override

View File

@ -27,7 +27,7 @@ import org.apache.commons.collections.Transformer;
import org.junit.Test; import org.junit.Test;
/** /**
* Extension of {@link AbstractTestMap} for exercising the * Extension of {@link AbstractMapTest} for exercising the
* {@link LazyMap} implementation. * {@link LazyMap} implementation.
* *
* @since Commons Collections 3.0 * @since Commons Collections 3.0
@ -36,11 +36,11 @@ import org.junit.Test;
* @author Phil Steitz * @author Phil Steitz
*/ */
@SuppressWarnings("boxing") @SuppressWarnings("boxing")
public class TestLazyMap<K, V> extends AbstractTestIterableMap<K, V> { public class LazyMapTest<K, V> extends AbstractIterableMapTest<K, V> {
private static final Factory<Integer> oneFactory = FactoryUtils.constantFactory(1); private static final Factory<Integer> oneFactory = FactoryUtils.constantFactory(1);
public TestLazyMap(String testName) { public LazyMapTest(String testName) {
super(testName); super(testName);
} }

View File

@ -30,7 +30,7 @@ import org.apache.commons.collections.TransformerUtils;
import org.junit.Test; import org.junit.Test;
/** /**
* Extension of {@link TestLazyMap} for exercising the * Extension of {@link LazyMapTest} for exercising the
* {@link LazySortedMap} implementation. * {@link LazySortedMap} implementation.
* *
* @since Commons Collections 3.0 * @since Commons Collections 3.0
@ -39,11 +39,11 @@ import org.junit.Test;
* @author Phil Steitz * @author Phil Steitz
*/ */
@SuppressWarnings("boxing") @SuppressWarnings("boxing")
public class TestLazySortedMap<K, V> extends AbstractTestSortedMap<K, V> { public class LazySortedMapTest<K, V> extends AbstractSortedMapTest<K, V> {
private static final Factory<Integer> oneFactory = FactoryUtils.constantFactory(1); private static final Factory<Integer> oneFactory = FactoryUtils.constantFactory(1);
public TestLazySortedMap(String testName) { public LazySortedMapTest(String testName) {
super(testName); super(testName);
} }

View File

@ -35,14 +35,14 @@ import org.apache.commons.collections.list.AbstractListTest;
* *
* @author Stephen Colebourne * @author Stephen Colebourne
*/ */
public class TestLinkedMap<K, V> extends AbstractTestOrderedMap<K, V> { public class LinkedMapTest<K, V> extends AbstractOrderedMapTest<K, V> {
public TestLinkedMap(String testName) { public LinkedMapTest(String testName) {
super(testName); super(testName);
} }
public static Test suite() { public static Test suite() {
return BulkTest.makeSuite(TestLinkedMap.class); return BulkTest.makeSuite(LinkedMapTest.class);
} }
@Override @Override
@ -238,17 +238,17 @@ public class TestLinkedMap<K, V> extends AbstractTestOrderedMap<K, V> {
@Override @Override
public List<K> makeObject() { public List<K> makeObject() {
return TestLinkedMap.this.makeObject().asList(); return LinkedMapTest.this.makeObject().asList();
} }
@Override @Override
public List<K> makeFullCollection() { public List<K> makeFullCollection() {
return TestLinkedMap.this.makeFullMap().asList(); return LinkedMapTest.this.makeFullMap().asList();
} }
@Override @Override
public K[] getFullElements() { public K[] getFullElements() {
return TestLinkedMap.this.getSampleKeys(); return LinkedMapTest.this.getSampleKeys();
} }
@Override @Override
public boolean isAddSupported() { public boolean isAddSupported() {
@ -264,7 +264,7 @@ public class TestLinkedMap<K, V> extends AbstractTestOrderedMap<K, V> {
} }
@Override @Override
public boolean isNullSupported() { public boolean isNullSupported() {
return TestLinkedMap.this.isAllowNullKey(); return LinkedMapTest.this.isAllowNullKey();
} }
@Override @Override
public boolean isTestSerialization() { public boolean isTestSerialization() {

View File

@ -26,7 +26,7 @@ import org.apache.commons.collections.MapIterator;
import org.apache.commons.collections.list.AbstractListTest; import org.apache.commons.collections.list.AbstractListTest;
/** /**
* Extension of {@link AbstractTestOrderedMap} for exercising the {@link ListOrderedMap} * Extension of {@link AbstractOrderedMapTest} for exercising the {@link ListOrderedMap}
* implementation. * implementation.
* *
* @since Commons Collections 3.1 * @since Commons Collections 3.1
@ -34,14 +34,14 @@ import org.apache.commons.collections.list.AbstractListTest;
* *
* @author Stephen Colebourne * @author Stephen Colebourne
*/ */
public class TestListOrderedMap2<K, V> extends AbstractTestOrderedMap<K, V> { public class ListOrderedMap2Test<K, V> extends AbstractOrderedMapTest<K, V> {
public TestListOrderedMap2(String testName) { public ListOrderedMap2Test(String testName) {
super(testName); super(testName);
} }
public static Test suite() { public static Test suite() {
return BulkTest.makeSuite(TestListOrderedMap2.class); return BulkTest.makeSuite(ListOrderedMap2Test.class);
} }
@Override @Override
@ -169,17 +169,17 @@ public class TestListOrderedMap2<K, V> extends AbstractTestOrderedMap<K, V> {
@Override @Override
public List<K> makeObject() { public List<K> makeObject() {
return TestListOrderedMap2.this.makeObject().asList(); return ListOrderedMap2Test.this.makeObject().asList();
} }
@Override @Override
public List<K> makeFullCollection() { public List<K> makeFullCollection() {
return TestListOrderedMap2.this.makeFullMap().asList(); return ListOrderedMap2Test.this.makeFullMap().asList();
} }
@Override @Override
public K[] getFullElements() { public K[] getFullElements() {
return TestListOrderedMap2.this.getSampleKeys(); return ListOrderedMap2Test.this.getSampleKeys();
} }
@Override @Override
public boolean isAddSupported() { public boolean isAddSupported() {
@ -195,7 +195,7 @@ public class TestListOrderedMap2<K, V> extends AbstractTestOrderedMap<K, V> {
} }
@Override @Override
public boolean isNullSupported() { public boolean isNullSupported() {
return TestListOrderedMap2.this.isAllowNullKey(); return ListOrderedMap2Test.this.isAllowNullKey();
} }
@Override @Override
public boolean isTestSerialization() { public boolean isTestSerialization() {

View File

@ -30,7 +30,7 @@ import org.apache.commons.collections.OrderedMapIterator;
import org.apache.commons.collections.list.AbstractListTest; import org.apache.commons.collections.list.AbstractListTest;
/** /**
* Extension of {@link AbstractTestOrderedMap} for exercising the {@link ListOrderedMap} * Extension of {@link AbstractOrderedMapTest} for exercising the {@link ListOrderedMap}
* implementation. * implementation.
* *
* @since Commons Collections 3.0 * @since Commons Collections 3.0
@ -39,14 +39,14 @@ import org.apache.commons.collections.list.AbstractListTest;
* @author Stephen Colebourne * @author Stephen Colebourne
* @author Matt Benson * @author Matt Benson
*/ */
public class TestListOrderedMap<K, V> extends AbstractTestOrderedMap<K, V> { public class ListOrderedMapTest<K, V> extends AbstractOrderedMapTest<K, V> {
public TestListOrderedMap(String testName) { public ListOrderedMapTest(String testName) {
super(testName); super(testName);
} }
public static Test suite() { public static Test suite() {
return BulkTest.makeSuite(TestListOrderedMap.class); return BulkTest.makeSuite(ListOrderedMapTest.class);
} }
@Override @Override
@ -405,16 +405,16 @@ public class TestListOrderedMap<K, V> extends AbstractTestOrderedMap<K, V> {
@Override @Override
public List<K> makeObject() { public List<K> makeObject() {
return TestListOrderedMap.this.makeObject().keyList(); return ListOrderedMapTest.this.makeObject().keyList();
} }
@Override @Override
public List<K> makeFullCollection() { public List<K> makeFullCollection() {
return TestListOrderedMap.this.makeFullMap().keyList(); return ListOrderedMapTest.this.makeFullMap().keyList();
} }
@Override @Override
public K[] getFullElements() { public K[] getFullElements() {
return TestListOrderedMap.this.getSampleKeys(); return ListOrderedMapTest.this.getSampleKeys();
} }
@Override @Override
public boolean isAddSupported() { public boolean isAddSupported() {
@ -430,7 +430,7 @@ public class TestListOrderedMap<K, V> extends AbstractTestOrderedMap<K, V> {
} }
@Override @Override
public boolean isNullSupported() { public boolean isNullSupported() {
return TestListOrderedMap.this.isAllowNullKey(); return ListOrderedMapTest.this.isAllowNullKey();
} }
@Override @Override
public boolean isTestSerialization() { public boolean isTestSerialization() {
@ -446,16 +446,16 @@ public class TestListOrderedMap<K, V> extends AbstractTestOrderedMap<K, V> {
@Override @Override
public List<V> makeObject() { public List<V> makeObject() {
return TestListOrderedMap.this.makeObject().valueList(); return ListOrderedMapTest.this.makeObject().valueList();
} }
@Override @Override
public List<V> makeFullCollection() { public List<V> makeFullCollection() {
return TestListOrderedMap.this.makeFullMap().valueList(); return ListOrderedMapTest.this.makeFullMap().valueList();
} }
@Override @Override
public V[] getFullElements() { public V[] getFullElements() {
return TestListOrderedMap.this.getSampleValues(); return ListOrderedMapTest.this.getSampleValues();
} }
@Override @Override
public boolean isAddSupported() { public boolean isAddSupported() {
@ -471,7 +471,7 @@ public class TestListOrderedMap<K, V> extends AbstractTestOrderedMap<K, V> {
} }
@Override @Override
public boolean isNullSupported() { public boolean isNullSupported() {
return TestListOrderedMap.this.isAllowNullKey(); return ListOrderedMapTest.this.isAllowNullKey();
} }
@Override @Override
public boolean isTestSerialization() { public boolean isTestSerialization() {

View File

@ -30,7 +30,7 @@ import org.apache.commons.collections.keyvalue.MultiKey;
* *
* @author Stephen Colebourne * @author Stephen Colebourne
*/ */
public class TestMultiKeyMap<K, V> extends AbstractTestIterableMap<MultiKey<? extends K>, V> { public class MultiKeyMapTest<K, V> extends AbstractIterableMapTest<MultiKey<? extends K>, V> {
static final Integer I1 = new Integer(1); static final Integer I1 = new Integer(1);
static final Integer I2 = new Integer(2); static final Integer I2 = new Integer(2);
@ -41,12 +41,12 @@ public class TestMultiKeyMap<K, V> extends AbstractTestIterableMap<MultiKey<? ex
static final Integer I7 = new Integer(7); static final Integer I7 = new Integer(7);
static final Integer I8 = new Integer(8); static final Integer I8 = new Integer(8);
public TestMultiKeyMap(String testName) { public MultiKeyMapTest(String testName) {
super(testName); super(testName);
} }
public static Test suite() { public static Test suite() {
return BulkTest.makeSuite(TestMultiKeyMap.class); return BulkTest.makeSuite(MultiKeyMapTest.class);
} }
@Override @Override

View File

@ -37,9 +37,9 @@ import org.apache.commons.collections.AbstractObjectTest;
* @author Stephen Colebourne * @author Stephen Colebourne
* @since Commons Collections 3.2 * @since Commons Collections 3.2
*/ */
public class TestMultiValueMap<K, V> extends AbstractObjectTest { public class MultiValueMapTest<K, V> extends AbstractObjectTest {
public TestMultiValueMap(String testName) { public MultiValueMapTest(String testName) {
super(testName); super(testName);
} }

View File

@ -9,8 +9,8 @@ import junit.framework.Test;
import org.apache.commons.collections.BulkTest; import org.apache.commons.collections.BulkTest;
import org.apache.commons.collections.map.PassiveExpiringMap.ExpirationPolicy; import org.apache.commons.collections.map.PassiveExpiringMap.ExpirationPolicy;
public class TestPassiveExpiringMap<K, V> public class PassiveExpiringMapTest<K, V>
extends AbstractTestMap<K, V> { extends AbstractMapTest<K, V> {
private static class TestExpirationPolicy private static class TestExpirationPolicy
implements ExpirationPolicy<Integer, String> { implements ExpirationPolicy<Integer, String> {
@ -32,10 +32,10 @@ public class TestPassiveExpiringMap<K, V>
} }
public static Test suite() { public static Test suite() {
return BulkTest.makeSuite(TestPassiveExpiringMap.class); return BulkTest.makeSuite(PassiveExpiringMapTest.class);
} }
public TestPassiveExpiringMap(String testName) { public PassiveExpiringMapTest(String testName) {
super(testName); super(testName);
} }

View File

@ -25,7 +25,7 @@ import org.apache.commons.collections.Predicate;
import org.apache.commons.collections.functors.TruePredicate; import org.apache.commons.collections.functors.TruePredicate;
/** /**
* Extension of {@link AbstractTestMap} for exercising the * Extension of {@link AbstractMapTest} for exercising the
* {@link PredicatedMap} implementation. * {@link PredicatedMap} implementation.
* *
* @since Commons Collections 3.0 * @since Commons Collections 3.0
@ -33,7 +33,7 @@ import org.apache.commons.collections.functors.TruePredicate;
* *
* @author Phil Steitz * @author Phil Steitz
*/ */
public class TestPredicatedMap<K, V> extends AbstractTestIterableMap<K, V> { public class PredicatedMapTest<K, V> extends AbstractIterableMapTest<K, V> {
protected static final Predicate<Object> truePredicate = TruePredicate.<Object>truePredicate(); protected static final Predicate<Object> truePredicate = TruePredicate.<Object>truePredicate();
@ -43,7 +43,7 @@ public class TestPredicatedMap<K, V> extends AbstractTestIterableMap<K, V> {
} }
}; };
public TestPredicatedMap(String testName) { public PredicatedMapTest(String testName) {
super(testName); super(testName);
} }

View File

@ -27,7 +27,7 @@ import org.apache.commons.collections.Predicate;
import org.apache.commons.collections.functors.TruePredicate; import org.apache.commons.collections.functors.TruePredicate;
/** /**
* Extension of {@link TestPredicatedMap} for exercising the * Extension of {@link PredicatedMapTest} for exercising the
* {@link PredicatedSortedMap} implementation. * {@link PredicatedSortedMap} implementation.
* *
* @since Commons Collections 3.0 * @since Commons Collections 3.0
@ -35,7 +35,7 @@ import org.apache.commons.collections.functors.TruePredicate;
* *
* @author Phil Steitz * @author Phil Steitz
*/ */
public class TestPredicatedSortedMap<K, V> extends AbstractTestSortedMap<K, V> { public class PredicatedSortedMapTest<K, V> extends AbstractSortedMapTest<K, V> {
protected static final Predicate<Object> truePredicate = TruePredicate.truePredicate(); protected static final Predicate<Object> truePredicate = TruePredicate.truePredicate();
@ -45,7 +45,7 @@ public class TestPredicatedSortedMap<K, V> extends AbstractTestSortedMap<K, V> {
} }
}; };
public TestPredicatedSortedMap(String testName) { public PredicatedSortedMapTest(String testName) {
super(testName); super(testName);
} }

View File

@ -35,19 +35,19 @@ import org.apache.commons.collections.map.AbstractReferenceMap.ReferenceStrength
* @author Stephen Colebourne * @author Stephen Colebourne
* @author Guilhem Lavaux * @author Guilhem Lavaux
*/ */
public class TestReferenceIdentityMap<K, V> extends AbstractTestIterableMap<K, V> { public class ReferenceIdentityMapTest<K, V> extends AbstractIterableMapTest<K, V> {
private static final Integer I1A = new Integer(1); private static final Integer I1A = new Integer(1);
private static final Integer I1B = new Integer(1); private static final Integer I1B = new Integer(1);
private static final Integer I2A = new Integer(2); private static final Integer I2A = new Integer(2);
private static final Integer I2B = new Integer(2); private static final Integer I2B = new Integer(2);
public TestReferenceIdentityMap(String testName) { public ReferenceIdentityMapTest(String testName) {
super(testName); super(testName);
} }
public static Test suite() { public static Test suite() {
return BulkTest.makeSuite(TestReferenceIdentityMap.class); return BulkTest.makeSuite(ReferenceIdentityMapTest.class);
} }
@Override @Override

View File

@ -32,14 +32,14 @@ import org.apache.commons.collections.map.AbstractReferenceMap.ReferenceStrength
* @author Paul Jack * @author Paul Jack
* @author Guilhem Lavaux * @author Guilhem Lavaux
*/ */
public class TestReferenceMap<K, V> extends AbstractTestIterableMap<K, V> { public class ReferenceMapTest<K, V> extends AbstractIterableMapTest<K, V> {
public TestReferenceMap(String testName) { public ReferenceMapTest(String testName) {
super(testName); super(testName);
} }
public static Test suite() { public static Test suite() {
return BulkTest.makeSuite(TestReferenceMap.class); return BulkTest.makeSuite(ReferenceMapTest.class);
} }
@Override @Override

View File

@ -31,18 +31,18 @@ import org.apache.commons.collections.OrderedMap;
* *
* @author Stephen Colebourne * @author Stephen Colebourne
*/ */
public class TestSingletonMap<K, V> extends AbstractTestOrderedMap<K, V> { public class SingletonMapTest<K, V> extends AbstractOrderedMapTest<K, V> {
private static final Integer ONE = new Integer(1); private static final Integer ONE = new Integer(1);
private static final Integer TWO = new Integer(2); private static final Integer TWO = new Integer(2);
private static final String TEN = "10"; private static final String TEN = "10";
public TestSingletonMap(String testName) { public SingletonMapTest(String testName) {
super(testName); super(testName);
} }
public static Test suite() { public static Test suite() {
return BulkTest.makeSuite(TestSingletonMap.class); return BulkTest.makeSuite(SingletonMapTest.class);
} }
//----------------------------------------------------------------------- //-----------------------------------------------------------------------
@ -58,8 +58,8 @@ public class TestSingletonMap<K, V> extends AbstractTestOrderedMap<K, V> {
// the ridiculous map above still doesn't pass these tests // the ridiculous map above still doesn't pass these tests
// but its not relevant, so we ignore them // but its not relevant, so we ignore them
return new String[] { return new String[] {
"TestSingletonMap.bulkTestMapIterator.testEmptyMapIterator", "SingletonMapTest.bulkTestMapIterator.testEmptyMapIterator",
"TestSingletonMap.bulkTestOrderedMapIterator.testEmptyMapIterator", "SingletonMapTest.bulkTestOrderedMapIterator.testEmptyMapIterator",
}; };
} }

View File

@ -28,14 +28,14 @@ import org.apache.commons.collections.BulkTest;
* *
* @author Michael A. Smith * @author Michael A. Smith
*/ */
public class TestStaticBucketMap<K, V> extends AbstractTestIterableMap<K, V> { public class StaticBucketMapTest<K, V> extends AbstractIterableMapTest<K, V> {
public TestStaticBucketMap(String name) { public StaticBucketMapTest(String name) {
super(name); super(name);
} }
public static Test suite() { public static Test suite() {
return BulkTest.makeSuite(TestStaticBucketMap.class); return BulkTest.makeSuite(StaticBucketMapTest.class);
} }
@Override @Override
@ -53,7 +53,7 @@ public class TestStaticBucketMap<K, V> extends AbstractTestIterableMap<K, V> {
@Override @Override
public String[] ignoredTests() { public String[] ignoredTests() {
String pre = "TestStaticBucketMap.bulkTestMap"; String pre = "StaticBucketMapTest.bulkTestMap";
String post = ".testCollectionIteratorFailFast"; String post = ".testCollectionIteratorFailFast";
return new String[] { return new String[] {
pre + "EntrySet" + post, pre + "EntrySet" + post,

View File

@ -26,7 +26,7 @@ import org.apache.commons.collections.TransformerUtils;
import org.apache.commons.collections.collection.TransformedCollectionTest; import org.apache.commons.collections.collection.TransformedCollectionTest;
/** /**
* Extension of {@link AbstractTestMap} for exercising the {@link TransformedMap} * Extension of {@link AbstractMapTest} for exercising the {@link TransformedMap}
* implementation. * implementation.
* *
* @since Commons Collections 3.0 * @since Commons Collections 3.0
@ -34,9 +34,9 @@ import org.apache.commons.collections.collection.TransformedCollectionTest;
* *
* @author Stephen Colebourne * @author Stephen Colebourne
*/ */
public class TestTransformedMap<K, V> extends AbstractTestIterableMap<K, V> { public class TransformedMapTest<K, V> extends AbstractIterableMapTest<K, V> {
public TestTransformedMap(String testName) { public TransformedMapTest(String testName) {
super(testName); super(testName);
} }

View File

@ -29,7 +29,7 @@ import org.apache.commons.collections.TransformerUtils;
import org.apache.commons.collections.collection.TransformedCollectionTest; import org.apache.commons.collections.collection.TransformedCollectionTest;
/** /**
* Extension of {@link AbstractTestSortedMap} for exercising the {@link TransformedSortedMap} * Extension of {@link AbstractSortedMapTest} for exercising the {@link TransformedSortedMap}
* implementation. * implementation.
* *
* @since Commons Collections 3.0 * @since Commons Collections 3.0
@ -37,14 +37,14 @@ import org.apache.commons.collections.collection.TransformedCollectionTest;
* *
* @author Stephen Colebourne * @author Stephen Colebourne
*/ */
public class TestTransformedSortedMap<K, V> extends AbstractTestSortedMap<K, V> { public class TransformedSortedMapTest<K, V> extends AbstractSortedMapTest<K, V> {
public TestTransformedSortedMap(String testName) { public TransformedSortedMapTest(String testName) {
super(testName); super(testName);
} }
public static Test suite() { public static Test suite() {
return BulkTest.makeSuite(TestTransformedSortedMap.class); return BulkTest.makeSuite(TransformedSortedMapTest.class);
} }
//----------------------------------------------------------------------- //-----------------------------------------------------------------------

View File

@ -23,7 +23,7 @@ import org.apache.commons.collections.IterableMap;
import org.apache.commons.collections.Unmodifiable; import org.apache.commons.collections.Unmodifiable;
/** /**
* Extension of {@link AbstractTestMap} for exercising the * Extension of {@link AbstractMapTest} for exercising the
* {@link UnmodifiableMap} implementation. * {@link UnmodifiableMap} implementation.
* *
* @since Commons Collections 3.0 * @since Commons Collections 3.0
@ -31,9 +31,9 @@ import org.apache.commons.collections.Unmodifiable;
* *
* @author Phil Steitz * @author Phil Steitz
*/ */
public class TestUnmodifiableMap<K, V> extends AbstractTestIterableMap<K, V> { public class UnmodifiableMapTest<K, V> extends AbstractIterableMapTest<K, V> {
public TestUnmodifiableMap(String testName) { public UnmodifiableMapTest(String testName) {
super(testName); super(testName);
} }

View File

@ -22,7 +22,7 @@ import org.apache.commons.collections.OrderedMap;
import org.apache.commons.collections.Unmodifiable; import org.apache.commons.collections.Unmodifiable;
/** /**
* Extension of {@link AbstractTestOrderedMap} for exercising the * Extension of {@link AbstractOrderedMapTest} for exercising the
* {@link UnmodifiableOrderedMap} implementation. * {@link UnmodifiableOrderedMap} implementation.
* *
* @since Commons Collections 3.0 * @since Commons Collections 3.0
@ -30,9 +30,9 @@ import org.apache.commons.collections.Unmodifiable;
* *
* @author Stephen Colebourne * @author Stephen Colebourne
*/ */
public class TestUnmodifiableOrderedMap<K, V> extends AbstractTestOrderedMap<K, V> { public class UnmodifiableOrderedMapTest<K, V> extends AbstractOrderedMapTest<K, V> {
public TestUnmodifiableOrderedMap(String testName) { public UnmodifiableOrderedMapTest(String testName) {
super(testName); super(testName);
} }

View File

@ -22,7 +22,7 @@ import java.util.TreeMap;
import org.apache.commons.collections.Unmodifiable; import org.apache.commons.collections.Unmodifiable;
/** /**
* Extension of {@link AbstractTestSortedMap} for exercising the * Extension of {@link AbstractSortedMapTest} for exercising the
* {@link UnmodifiableSortedMap} implementation. * {@link UnmodifiableSortedMap} implementation.
* *
* @since Commons Collections 3.0 * @since Commons Collections 3.0
@ -30,9 +30,9 @@ import org.apache.commons.collections.Unmodifiable;
* *
* @author Stephen Colebourne * @author Stephen Colebourne
*/ */
public class TestUnmodifiableSortedMap<K, V> extends AbstractTestSortedMap<K, V> { public class UnmodifiableSortedMapTest<K, V> extends AbstractSortedMapTest<K, V> {
public TestUnmodifiableSortedMap(String testName) { public UnmodifiableSortedMapTest(String testName) {
super(testName); super(testName);
} }