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:
parent
23e3b0f0fc
commit
806c1d78d5
1
pom.xml
1
pom.xml
|
@ -447,7 +447,6 @@
|
|||
<artifactId>maven-surefire-plugin</artifactId>
|
||||
<configuration>
|
||||
<includes>
|
||||
<include>**/Test*.java</include>
|
||||
<include>**/*Test.java</include>
|
||||
</includes>
|
||||
<excludes>
|
||||
|
|
|
@ -18,7 +18,7 @@ package org.apache.commons.collections;
|
|||
|
||||
import java.util.TreeMap;
|
||||
|
||||
import org.apache.commons.collections.map.AbstractTestMap;
|
||||
import org.apache.commons.collections.map.AbstractMapTest;
|
||||
|
||||
/**
|
||||
* Tests TreeMap.
|
||||
|
@ -27,7 +27,7 @@ import org.apache.commons.collections.map.AbstractTestMap;
|
|||
*
|
||||
* @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) {
|
||||
super(testName);
|
||||
|
|
|
@ -26,14 +26,14 @@ import org.apache.commons.collections.BidiMap;
|
|||
import org.apache.commons.collections.BulkTest;
|
||||
import org.apache.commons.collections.MapIterator;
|
||||
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.
|
||||
*
|
||||
* @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) {
|
||||
super(testName);
|
||||
|
|
|
@ -29,7 +29,7 @@ import java.util.TreeSet;
|
|||
|
||||
import org.apache.commons.collections.BulkTest;
|
||||
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.
|
||||
|
@ -628,15 +628,15 @@ public abstract class AbstractSortedBidiMapTest<K extends Comparable<K>, V exten
|
|||
|
||||
//-----------------------------------------------------------------------
|
||||
public BulkTest bulkTestHeadMap() {
|
||||
return new AbstractTestSortedMap.TestHeadMap<K, V>(this);
|
||||
return new AbstractSortedMapTest.TestHeadMap<K, V>(this);
|
||||
}
|
||||
|
||||
public BulkTest bulkTestTailMap() {
|
||||
return new AbstractTestSortedMap.TestTailMap<K, V>(this);
|
||||
return new AbstractSortedMapTest.TestTailMap<K, V>(this);
|
||||
}
|
||||
|
||||
public BulkTest bulkTestSubMap() {
|
||||
return new AbstractTestSortedMap.TestSubMap<K, V>(this);
|
||||
return new AbstractSortedMapTest.TestSubMap<K, V>(this);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -90,7 +90,7 @@ import org.apache.commons.collections.AbstractObjectTest;
|
|||
* {@link #confirmed}, the {@link #verify()} method is invoked to compare
|
||||
* the results. You may want to override {@link #verify()} to perform
|
||||
* 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
|
||||
* sure the map is changed after the collection view is changed.
|
||||
* <p>
|
||||
|
|
|
@ -1504,7 +1504,7 @@ public class CursorableLinkedListTest<E> extends AbstractLinkedListTest<E> {
|
|||
@Override
|
||||
public String[] ignoredTests() {
|
||||
ArrayList<String> list = new ArrayList<String>();
|
||||
String prefix = "TestCursorableLinkedList";
|
||||
String prefix = "CursorableLinkedListTest";
|
||||
String bulk = ".bulkTestSubList";
|
||||
String[] ignored = new String[] {
|
||||
".testEmptyListSerialization",
|
||||
|
|
|
@ -32,14 +32,14 @@ import org.apache.commons.collections.iterators.AbstractMapIteratorTest;
|
|||
*
|
||||
* @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.
|
||||
*
|
||||
* @param testName the test name
|
||||
*/
|
||||
public AbstractTestIterableMap(String testName) {
|
||||
public AbstractIterableMapTest(String testName) {
|
||||
super(testName);
|
||||
}
|
||||
|
||||
|
@ -136,52 +136,52 @@ public abstract class AbstractTestIterableMap<K, V> extends AbstractTestMap<K, V
|
|||
|
||||
@Override
|
||||
public V[] addSetValues() {
|
||||
return AbstractTestIterableMap.this.getNewSampleValues();
|
||||
return AbstractIterableMapTest.this.getNewSampleValues();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsRemove() {
|
||||
return AbstractTestIterableMap.this.isRemoveSupported();
|
||||
return AbstractIterableMapTest.this.isRemoveSupported();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isGetStructuralModify() {
|
||||
return AbstractTestIterableMap.this.isGetStructuralModify();
|
||||
return AbstractIterableMapTest.this.isGetStructuralModify();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsSetValue() {
|
||||
return AbstractTestIterableMap.this.isSetValueSupported();
|
||||
return AbstractIterableMapTest.this.isSetValueSupported();
|
||||
}
|
||||
|
||||
@Override
|
||||
public MapIterator<K, V> makeEmptyIterator() {
|
||||
resetEmpty();
|
||||
return AbstractTestIterableMap.this.getMap().mapIterator();
|
||||
return AbstractIterableMapTest.this.getMap().mapIterator();
|
||||
}
|
||||
|
||||
@Override
|
||||
public MapIterator<K, V> makeObject() {
|
||||
resetFull();
|
||||
return AbstractTestIterableMap.this.getMap().mapIterator();
|
||||
return AbstractIterableMapTest.this.getMap().mapIterator();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<K, V> getMap() {
|
||||
// assumes makeFullMapIterator() called first
|
||||
return AbstractTestIterableMap.this.getMap();
|
||||
return AbstractIterableMapTest.this.getMap();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<K, V> getConfirmedMap() {
|
||||
// assumes makeFullMapIterator() called first
|
||||
return AbstractTestIterableMap.this.getConfirmed();
|
||||
return AbstractIterableMapTest.this.getConfirmed();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void verify() {
|
||||
super.verify();
|
||||
AbstractTestIterableMap.this.verify();
|
||||
AbstractIterableMapTest.this.verify();
|
||||
}
|
||||
}
|
||||
|
|
@ -125,7 +125,7 @@ import org.apache.commons.collections.set.AbstractSetTest;
|
|||
* @author Stephen Colebourne
|
||||
* @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
|
||||
|
@ -165,7 +165,7 @@ public abstract class AbstractTestMap<K, V> extends AbstractObjectTest {
|
|||
*
|
||||
* @param testName the test name
|
||||
*/
|
||||
public AbstractTestMap(String testName) {
|
||||
public AbstractMapTest(String testName) {
|
||||
super(testName);
|
||||
}
|
||||
|
||||
|
@ -1554,7 +1554,7 @@ public abstract class AbstractTestMap<K, V> extends AbstractObjectTest {
|
|||
|
||||
@Override
|
||||
public Set<Map.Entry<K, V>> makeObject() {
|
||||
return AbstractTestMap.this.makeObject().entrySet();
|
||||
return AbstractMapTest.this.makeObject().entrySet();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -1571,11 +1571,11 @@ public abstract class AbstractTestMap<K, V> extends AbstractObjectTest {
|
|||
@Override
|
||||
public boolean isRemoveSupported() {
|
||||
// Entry set should only support remove if map does
|
||||
return AbstractTestMap.this.isRemoveSupported();
|
||||
return AbstractMapTest.this.isRemoveSupported();
|
||||
}
|
||||
|
||||
public boolean isGetStructuralModify() {
|
||||
return AbstractTestMap.this.isGetStructuralModify();
|
||||
return AbstractMapTest.this.isGetStructuralModify();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -1585,16 +1585,16 @@ public abstract class AbstractTestMap<K, V> extends AbstractObjectTest {
|
|||
|
||||
@Override
|
||||
public void resetFull() {
|
||||
AbstractTestMap.this.resetFull();
|
||||
setCollection(AbstractTestMap.this.getMap().entrySet());
|
||||
TestMapEntrySet.this.setConfirmed(AbstractTestMap.this.getConfirmed().entrySet());
|
||||
AbstractMapTest.this.resetFull();
|
||||
setCollection(AbstractMapTest.this.getMap().entrySet());
|
||||
TestMapEntrySet.this.setConfirmed(AbstractMapTest.this.getConfirmed().entrySet());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void resetEmpty() {
|
||||
AbstractTestMap.this.resetEmpty();
|
||||
setCollection(AbstractTestMap.this.getMap().entrySet());
|
||||
TestMapEntrySet.this.setConfirmed(AbstractTestMap.this.getConfirmed().entrySet());
|
||||
AbstractMapTest.this.resetEmpty();
|
||||
setCollection(AbstractMapTest.this.getMap().entrySet());
|
||||
TestMapEntrySet.this.setConfirmed(AbstractMapTest.this.getConfirmed().entrySet());
|
||||
}
|
||||
|
||||
public void testMapEntrySetIteratorEntry() {
|
||||
|
@ -1603,10 +1603,10 @@ public abstract class AbstractTestMap<K, V> extends AbstractObjectTest {
|
|||
int count = 0;
|
||||
while (it.hasNext()) {
|
||||
Map.Entry<K, V> entry = it.next();
|
||||
assertEquals(true, AbstractTestMap.this.getMap().containsKey(entry.getKey()));
|
||||
assertEquals(true, AbstractTestMap.this.getMap().containsValue(entry.getValue()));
|
||||
assertEquals(true, AbstractMapTest.this.getMap().containsKey(entry.getKey()));
|
||||
assertEquals(true, AbstractMapTest.this.getMap().containsValue(entry.getValue()));
|
||||
if (isGetStructuralModify() == false) {
|
||||
assertEquals(AbstractTestMap.this.getMap().get(entry.getKey()), entry.getValue());
|
||||
assertEquals(AbstractMapTest.this.getMap().get(entry.getKey()), entry.getValue());
|
||||
}
|
||||
count++;
|
||||
}
|
||||
|
@ -1643,25 +1643,25 @@ public abstract class AbstractTestMap<K, V> extends AbstractObjectTest {
|
|||
entry1.setValue(newValue1);
|
||||
entryConfirmed1.setValue(newValue1);
|
||||
assertEquals(newValue1, entry1.getValue());
|
||||
assertEquals(true, AbstractTestMap.this.getMap().containsKey(entry1.getKey()));
|
||||
assertEquals(true, AbstractTestMap.this.getMap().containsValue(newValue1));
|
||||
assertEquals(newValue1, AbstractTestMap.this.getMap().get(entry1.getKey()));
|
||||
assertEquals(true, AbstractMapTest.this.getMap().containsKey(entry1.getKey()));
|
||||
assertEquals(true, AbstractMapTest.this.getMap().containsValue(newValue1));
|
||||
assertEquals(newValue1, AbstractMapTest.this.getMap().get(entry1.getKey()));
|
||||
verify();
|
||||
|
||||
entry1.setValue(newValue1);
|
||||
entryConfirmed1.setValue(newValue1);
|
||||
assertEquals(newValue1, entry1.getValue());
|
||||
assertEquals(true, AbstractTestMap.this.getMap().containsKey(entry1.getKey()));
|
||||
assertEquals(true, AbstractTestMap.this.getMap().containsValue(newValue1));
|
||||
assertEquals(newValue1, AbstractTestMap.this.getMap().get(entry1.getKey()));
|
||||
assertEquals(true, AbstractMapTest.this.getMap().containsKey(entry1.getKey()));
|
||||
assertEquals(true, AbstractMapTest.this.getMap().containsValue(newValue1));
|
||||
assertEquals(newValue1, AbstractMapTest.this.getMap().get(entry1.getKey()));
|
||||
verify();
|
||||
|
||||
entry2.setValue(newValue2);
|
||||
entryConfirmed2.setValue(newValue2);
|
||||
assertEquals(newValue2, entry2.getValue());
|
||||
assertEquals(true, AbstractTestMap.this.getMap().containsKey(entry2.getKey()));
|
||||
assertEquals(true, AbstractTestMap.this.getMap().containsValue(newValue2));
|
||||
assertEquals(newValue2, AbstractTestMap.this.getMap().get(entry2.getKey()));
|
||||
assertEquals(true, AbstractMapTest.this.getMap().containsKey(entry2.getKey()));
|
||||
assertEquals(true, AbstractMapTest.this.getMap().containsValue(newValue2));
|
||||
assertEquals(newValue2, AbstractMapTest.this.getMap().get(entry2.getKey()));
|
||||
verify();
|
||||
}
|
||||
|
||||
|
@ -1693,7 +1693,7 @@ public abstract class AbstractTestMap<K, V> extends AbstractObjectTest {
|
|||
@Override
|
||||
public void verify() {
|
||||
super.verify();
|
||||
AbstractTestMap.this.verify();
|
||||
AbstractMapTest.this.verify();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1727,17 +1727,17 @@ public abstract class AbstractTestMap<K, V> extends AbstractObjectTest {
|
|||
|
||||
@Override
|
||||
public Set<K> makeObject() {
|
||||
return AbstractTestMap.this.makeObject().keySet();
|
||||
return AbstractMapTest.this.makeObject().keySet();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Set<K> makeFullCollection() {
|
||||
return AbstractTestMap.this.makeFullMap().keySet();
|
||||
return AbstractMapTest.this.makeFullMap().keySet();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isNullSupported() {
|
||||
return AbstractTestMap.this.isAllowNullKey();
|
||||
return AbstractMapTest.this.isAllowNullKey();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -1747,7 +1747,7 @@ public abstract class AbstractTestMap<K, V> extends AbstractObjectTest {
|
|||
|
||||
@Override
|
||||
public boolean isRemoveSupported() {
|
||||
return AbstractTestMap.this.isRemoveSupported();
|
||||
return AbstractMapTest.this.isRemoveSupported();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -1757,22 +1757,22 @@ public abstract class AbstractTestMap<K, V> extends AbstractObjectTest {
|
|||
|
||||
@Override
|
||||
public void resetEmpty() {
|
||||
AbstractTestMap.this.resetEmpty();
|
||||
setCollection(AbstractTestMap.this.getMap().keySet());
|
||||
TestMapKeySet.this.setConfirmed(AbstractTestMap.this.getConfirmed().keySet());
|
||||
AbstractMapTest.this.resetEmpty();
|
||||
setCollection(AbstractMapTest.this.getMap().keySet());
|
||||
TestMapKeySet.this.setConfirmed(AbstractMapTest.this.getConfirmed().keySet());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void resetFull() {
|
||||
AbstractTestMap.this.resetFull();
|
||||
setCollection(AbstractTestMap.this.getMap().keySet());
|
||||
TestMapKeySet.this.setConfirmed(AbstractTestMap.this.getConfirmed().keySet());
|
||||
AbstractMapTest.this.resetFull();
|
||||
setCollection(AbstractMapTest.this.getMap().keySet());
|
||||
TestMapKeySet.this.setConfirmed(AbstractMapTest.this.getConfirmed().keySet());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void verify() {
|
||||
super.verify();
|
||||
AbstractTestMap.this.verify();
|
||||
AbstractMapTest.this.verify();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1806,17 +1806,17 @@ public abstract class AbstractTestMap<K, V> extends AbstractObjectTest {
|
|||
|
||||
@Override
|
||||
public Collection<V> makeObject() {
|
||||
return AbstractTestMap.this.makeObject().values();
|
||||
return AbstractMapTest.this.makeObject().values();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Collection<V> makeFullCollection() {
|
||||
return AbstractTestMap.this.makeFullMap().values();
|
||||
return AbstractMapTest.this.makeFullMap().values();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isNullSupported() {
|
||||
return AbstractTestMap.this.isAllowNullKey();
|
||||
return AbstractMapTest.this.isAllowNullKey();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -1826,7 +1826,7 @@ public abstract class AbstractTestMap<K, V> extends AbstractObjectTest {
|
|||
|
||||
@Override
|
||||
public boolean isRemoveSupported() {
|
||||
return AbstractTestMap.this.isRemoveSupported();
|
||||
return AbstractMapTest.this.isRemoveSupported();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -1855,22 +1855,22 @@ public abstract class AbstractTestMap<K, V> extends AbstractObjectTest {
|
|||
|
||||
@Override
|
||||
public void resetFull() {
|
||||
AbstractTestMap.this.resetFull();
|
||||
AbstractMapTest.this.resetFull();
|
||||
setCollection(map.values());
|
||||
TestMapValues.this.setConfirmed(AbstractTestMap.this.getConfirmed().values());
|
||||
TestMapValues.this.setConfirmed(AbstractMapTest.this.getConfirmed().values());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void resetEmpty() {
|
||||
AbstractTestMap.this.resetEmpty();
|
||||
AbstractMapTest.this.resetEmpty();
|
||||
setCollection(map.values());
|
||||
TestMapValues.this.setConfirmed(AbstractTestMap.this.getConfirmed().values());
|
||||
TestMapValues.this.setConfirmed(AbstractMapTest.this.getConfirmed().values());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void verify() {
|
||||
super.verify();
|
||||
AbstractTestMap.this.verify();
|
||||
AbstractMapTest.this.verify();
|
||||
}
|
||||
|
||||
// TODO: should test that a remove on the values collection view
|
|
@ -38,14 +38,14 @@ import org.apache.commons.collections.iterators.AbstractOrderedMapIteratorTest;
|
|||
*
|
||||
* @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.
|
||||
*
|
||||
* @param testName the test name
|
||||
*/
|
||||
public AbstractTestOrderedMap(String testName) {
|
||||
public AbstractOrderedMapTest(String testName) {
|
||||
super(testName);
|
||||
}
|
||||
|
||||
|
@ -201,47 +201,47 @@ public abstract class AbstractTestOrderedMap<K, V> extends AbstractTestIterableM
|
|||
|
||||
@Override
|
||||
public boolean supportsRemove() {
|
||||
return AbstractTestOrderedMap.this.isRemoveSupported();
|
||||
return AbstractOrderedMapTest.this.isRemoveSupported();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isGetStructuralModify() {
|
||||
return AbstractTestOrderedMap.this.isGetStructuralModify();
|
||||
return AbstractOrderedMapTest.this.isGetStructuralModify();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsSetValue() {
|
||||
return AbstractTestOrderedMap.this.isSetValueSupported();
|
||||
return AbstractOrderedMapTest.this.isSetValueSupported();
|
||||
}
|
||||
|
||||
@Override
|
||||
public OrderedMapIterator<K, V> makeEmptyIterator() {
|
||||
resetEmpty();
|
||||
return AbstractTestOrderedMap.this.getMap().mapIterator();
|
||||
return AbstractOrderedMapTest.this.getMap().mapIterator();
|
||||
}
|
||||
|
||||
@Override
|
||||
public OrderedMapIterator<K, V> makeObject() {
|
||||
resetFull();
|
||||
return AbstractTestOrderedMap.this.getMap().mapIterator();
|
||||
return AbstractOrderedMapTest.this.getMap().mapIterator();
|
||||
}
|
||||
|
||||
@Override
|
||||
public OrderedMap<K, V> getMap() {
|
||||
// assumes makeFullMapIterator() called first
|
||||
return AbstractTestOrderedMap.this.getMap();
|
||||
return AbstractOrderedMapTest.this.getMap();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<K, V> getConfirmedMap() {
|
||||
// assumes makeFullMapIterator() called first
|
||||
return AbstractTestOrderedMap.this.getConfirmed();
|
||||
return AbstractOrderedMapTest.this.getConfirmed();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void verify() {
|
||||
super.verify();
|
||||
AbstractTestOrderedMap.this.verify();
|
||||
AbstractOrderedMapTest.this.verify();
|
||||
}
|
||||
}
|
||||
|
|
@ -33,14 +33,14 @@ import org.apache.commons.collections.BulkTest;
|
|||
*
|
||||
* @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.
|
||||
*
|
||||
* @param testName the test name
|
||||
*/
|
||||
public AbstractTestSortedMap(String testName) {
|
||||
public AbstractSortedMapTest(String testName) {
|
||||
super(testName);
|
||||
}
|
||||
|
||||
|
@ -112,13 +112,13 @@ public abstract class AbstractTestSortedMap<K, V> extends AbstractTestMap<K, V>
|
|||
return new TestSubMap<K, V>(this);
|
||||
}
|
||||
|
||||
public static abstract class TestViewMap <K, V> extends AbstractTestSortedMap<K, V> {
|
||||
protected final AbstractTestMap<K, V> main;
|
||||
public static abstract class TestViewMap <K, V> extends AbstractSortedMapTest<K, V> {
|
||||
protected final AbstractMapTest<K, V> main;
|
||||
protected final List<K> subSortedKeys = new ArrayList<K>();
|
||||
protected final List<V> subSortedValues = 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);
|
||||
this.main = main;
|
||||
}
|
||||
|
@ -215,7 +215,7 @@ public abstract class AbstractTestSortedMap<K, V> extends AbstractTestMap<K, V>
|
|||
static final int SUBSIZE = 6;
|
||||
final K toKey;
|
||||
|
||||
public TestHeadMap(AbstractTestMap<K, V> main) {
|
||||
public TestHeadMap(AbstractMapTest<K, V> main) {
|
||||
super("SortedMap.HeadMap", main);
|
||||
Map<K, V> sm = main.makeFullMap();
|
||||
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 invalidKey;
|
||||
|
||||
public TestTailMap(AbstractTestMap<K, V> main) {
|
||||
public TestTailMap(AbstractMapTest<K, V> main) {
|
||||
super("SortedMap.TailMap", main);
|
||||
Map<K, V> sm = main.makeFullMap();
|
||||
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 toKey;
|
||||
|
||||
public TestSubMap(AbstractTestMap<K, V> main) {
|
||||
public TestSubMap(AbstractMapTest<K, V> main) {
|
||||
super("SortedMap.SubMap", main);
|
||||
Map<K, V> sm = main.makeFullMap();
|
||||
for (Iterator<Map.Entry<K, V>> it = sm.entrySet().iterator(); it.hasNext();) {
|
|
@ -31,14 +31,14 @@ import org.apache.commons.collections.BulkTest;
|
|||
*
|
||||
* @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);
|
||||
}
|
||||
|
||||
public static Test suite() {
|
||||
return BulkTest.makeSuite(TestCaseInsensitiveMap.class);
|
||||
return BulkTest.makeSuite(CaseInsensitiveMapTest.class);
|
||||
}
|
||||
|
||||
@Override
|
|
@ -23,7 +23,7 @@ import java.util.HashMap;
|
|||
import java.util.Collection;
|
||||
|
||||
/**
|
||||
* Extension of {@link AbstractTestMap} for exercising the
|
||||
* Extension of {@link AbstractMapTest} for exercising the
|
||||
* {@link CompositeMap} implementation.
|
||||
*
|
||||
* @since Commons Collections 3.0
|
||||
|
@ -31,11 +31,11 @@ import java.util.Collection;
|
|||
*
|
||||
* @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 */
|
||||
private boolean pass = false;
|
||||
|
||||
public TestCompositeMap(String testName) {
|
||||
public CompositeMapTest(String testName) {
|
||||
super(testName);
|
||||
}
|
||||
|
|
@ -26,7 +26,7 @@ import org.apache.commons.collections.Transformer;
|
|||
import org.apache.commons.collections.functors.ConstantFactory;
|
||||
|
||||
/**
|
||||
* Extension of {@link AbstractTestMap} for exercising the
|
||||
* Extension of {@link AbstractMapTest} for exercising the
|
||||
* {@link DefaultedMap} implementation.
|
||||
*
|
||||
* @since Commons Collections 3.2
|
||||
|
@ -34,11 +34,11 @@ import org.apache.commons.collections.functors.ConstantFactory;
|
|||
*
|
||||
* @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();
|
||||
|
||||
public TestDefaultedMap(String testName) {
|
||||
public DefaultedMapTest(String testName) {
|
||||
super(testName);
|
||||
}
|
||||
|
|
@ -22,7 +22,7 @@ import java.util.Map;
|
|||
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.
|
||||
*
|
||||
* @since Commons Collections 3.0
|
||||
|
@ -30,9 +30,9 @@ import org.apache.commons.collections.IterableMap;
|
|||
*
|
||||
* @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);
|
||||
}
|
||||
|
|
@ -24,7 +24,7 @@ import junit.framework.Test;
|
|||
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.
|
||||
*
|
||||
* @since Commons Collections 3.0
|
||||
|
@ -32,14 +32,14 @@ import org.apache.commons.collections.BulkTest;
|
|||
*
|
||||
* @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);
|
||||
}
|
||||
|
||||
public static Test suite() {
|
||||
return BulkTest.makeSuite(TestFixedSizeSortedMap.class);
|
||||
return BulkTest.makeSuite(FixedSizeSortedMapTest.class);
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
|
@ -36,7 +36,7 @@ import org.apache.commons.collections.iterators.AbstractMapIteratorTest;
|
|||
*
|
||||
* @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 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 THIRTY = "30";
|
||||
|
||||
public TestFlat3Map(String testName) {
|
||||
public Flat3MapTest(String testName) {
|
||||
super(testName);
|
||||
}
|
||||
|
||||
public static Test suite() {
|
||||
return BulkTest.makeSuite(TestFlat3Map.class);
|
||||
return BulkTest.makeSuite(Flat3MapTest.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -350,47 +350,47 @@ public class TestFlat3Map<K, V> extends AbstractTestIterableMap<K, V> {
|
|||
|
||||
@Override
|
||||
public V[] addSetValues() {
|
||||
return TestFlat3Map.this.getNewSampleValues();
|
||||
return Flat3MapTest.this.getNewSampleValues();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsRemove() {
|
||||
return TestFlat3Map.this.isRemoveSupported();
|
||||
return Flat3MapTest.this.isRemoveSupported();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsSetValue() {
|
||||
return TestFlat3Map.this.isSetValueSupported();
|
||||
return Flat3MapTest.this.isSetValueSupported();
|
||||
}
|
||||
|
||||
@Override
|
||||
public MapIterator<K, V> makeEmptyIterator() {
|
||||
resetEmpty();
|
||||
return TestFlat3Map.this.getMap().mapIterator();
|
||||
return Flat3MapTest.this.getMap().mapIterator();
|
||||
}
|
||||
|
||||
@Override
|
||||
public MapIterator<K, V> makeObject() {
|
||||
resetFull();
|
||||
return TestFlat3Map.this.getMap().mapIterator();
|
||||
return Flat3MapTest.this.getMap().mapIterator();
|
||||
}
|
||||
|
||||
@Override
|
||||
public IterableMap<K, V> getMap() {
|
||||
// assumes makeFullMapIterator() called first
|
||||
return TestFlat3Map.this.getMap();
|
||||
return Flat3MapTest.this.getMap();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<K, V> getConfirmedMap() {
|
||||
// assumes makeFullMapIterator() called first
|
||||
return TestFlat3Map.this.getConfirmed();
|
||||
return Flat3MapTest.this.getConfirmed();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void verify() {
|
||||
super.verify();
|
||||
TestFlat3Map.this.verify();
|
||||
Flat3MapTest.this.verify();
|
||||
}
|
||||
}
|
||||
|
|
@ -26,14 +26,14 @@ import org.apache.commons.collections.BulkTest;
|
|||
*
|
||||
* @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);
|
||||
}
|
||||
|
||||
public static Test suite() {
|
||||
return BulkTest.makeSuite(TestHashedMap.class);
|
||||
return BulkTest.makeSuite(HashedMapTest.class);
|
||||
}
|
||||
|
||||
@Override
|
|
@ -33,19 +33,19 @@ import org.apache.commons.collections.IterableMap;
|
|||
*
|
||||
* @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 I1B = new Integer(1);
|
||||
private static final Integer I2A = new Integer(2);
|
||||
private static final Integer I2B = new Integer(2);
|
||||
|
||||
public TestIdentityMap(String testName) {
|
||||
public IdentityMapTest(String testName) {
|
||||
super(testName);
|
||||
}
|
||||
|
||||
public static Test suite() {
|
||||
return new TestSuite(TestIdentityMap.class);
|
||||
return new TestSuite(IdentityMapTest.class);
|
||||
// return BulkTest.makeSuite(TestIdentityMap.class); // causes race condition!
|
||||
}
|
||||
|
|
@ -35,14 +35,14 @@ import org.apache.commons.collections.ResettableIterator;
|
|||
*
|
||||
* @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);
|
||||
}
|
||||
|
||||
public static Test suite() {
|
||||
return BulkTest.makeSuite(TestLRUMap.class);
|
||||
return BulkTest.makeSuite(LRUMapTest.class);
|
||||
}
|
||||
|
||||
@Override
|
|
@ -27,7 +27,7 @@ import org.apache.commons.collections.Transformer;
|
|||
import org.junit.Test;
|
||||
|
||||
/**
|
||||
* Extension of {@link AbstractTestMap} for exercising the
|
||||
* Extension of {@link AbstractMapTest} for exercising the
|
||||
* {@link LazyMap} implementation.
|
||||
*
|
||||
* @since Commons Collections 3.0
|
||||
|
@ -36,11 +36,11 @@ import org.junit.Test;
|
|||
* @author Phil Steitz
|
||||
*/
|
||||
@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);
|
||||
|
||||
public TestLazyMap(String testName) {
|
||||
public LazyMapTest(String testName) {
|
||||
super(testName);
|
||||
}
|
||||
|
|
@ -30,7 +30,7 @@ import org.apache.commons.collections.TransformerUtils;
|
|||
import org.junit.Test;
|
||||
|
||||
/**
|
||||
* Extension of {@link TestLazyMap} for exercising the
|
||||
* Extension of {@link LazyMapTest} for exercising the
|
||||
* {@link LazySortedMap} implementation.
|
||||
*
|
||||
* @since Commons Collections 3.0
|
||||
|
@ -39,11 +39,11 @@ import org.junit.Test;
|
|||
* @author Phil Steitz
|
||||
*/
|
||||
@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);
|
||||
|
||||
public TestLazySortedMap(String testName) {
|
||||
public LazySortedMapTest(String testName) {
|
||||
super(testName);
|
||||
}
|
||||
|
|
@ -35,14 +35,14 @@ import org.apache.commons.collections.list.AbstractListTest;
|
|||
*
|
||||
* @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);
|
||||
}
|
||||
|
||||
public static Test suite() {
|
||||
return BulkTest.makeSuite(TestLinkedMap.class);
|
||||
return BulkTest.makeSuite(LinkedMapTest.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -238,17 +238,17 @@ public class TestLinkedMap<K, V> extends AbstractTestOrderedMap<K, V> {
|
|||
|
||||
@Override
|
||||
public List<K> makeObject() {
|
||||
return TestLinkedMap.this.makeObject().asList();
|
||||
return LinkedMapTest.this.makeObject().asList();
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<K> makeFullCollection() {
|
||||
return TestLinkedMap.this.makeFullMap().asList();
|
||||
return LinkedMapTest.this.makeFullMap().asList();
|
||||
}
|
||||
|
||||
@Override
|
||||
public K[] getFullElements() {
|
||||
return TestLinkedMap.this.getSampleKeys();
|
||||
return LinkedMapTest.this.getSampleKeys();
|
||||
}
|
||||
@Override
|
||||
public boolean isAddSupported() {
|
||||
|
@ -264,7 +264,7 @@ public class TestLinkedMap<K, V> extends AbstractTestOrderedMap<K, V> {
|
|||
}
|
||||
@Override
|
||||
public boolean isNullSupported() {
|
||||
return TestLinkedMap.this.isAllowNullKey();
|
||||
return LinkedMapTest.this.isAllowNullKey();
|
||||
}
|
||||
@Override
|
||||
public boolean isTestSerialization() {
|
|
@ -26,7 +26,7 @@ import org.apache.commons.collections.MapIterator;
|
|||
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.
|
||||
*
|
||||
* @since Commons Collections 3.1
|
||||
|
@ -34,14 +34,14 @@ import org.apache.commons.collections.list.AbstractListTest;
|
|||
*
|
||||
* @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);
|
||||
}
|
||||
|
||||
public static Test suite() {
|
||||
return BulkTest.makeSuite(TestListOrderedMap2.class);
|
||||
return BulkTest.makeSuite(ListOrderedMap2Test.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -169,17 +169,17 @@ public class TestListOrderedMap2<K, V> extends AbstractTestOrderedMap<K, V> {
|
|||
|
||||
@Override
|
||||
public List<K> makeObject() {
|
||||
return TestListOrderedMap2.this.makeObject().asList();
|
||||
return ListOrderedMap2Test.this.makeObject().asList();
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<K> makeFullCollection() {
|
||||
return TestListOrderedMap2.this.makeFullMap().asList();
|
||||
return ListOrderedMap2Test.this.makeFullMap().asList();
|
||||
}
|
||||
|
||||
@Override
|
||||
public K[] getFullElements() {
|
||||
return TestListOrderedMap2.this.getSampleKeys();
|
||||
return ListOrderedMap2Test.this.getSampleKeys();
|
||||
}
|
||||
@Override
|
||||
public boolean isAddSupported() {
|
||||
|
@ -195,7 +195,7 @@ public class TestListOrderedMap2<K, V> extends AbstractTestOrderedMap<K, V> {
|
|||
}
|
||||
@Override
|
||||
public boolean isNullSupported() {
|
||||
return TestListOrderedMap2.this.isAllowNullKey();
|
||||
return ListOrderedMap2Test.this.isAllowNullKey();
|
||||
}
|
||||
@Override
|
||||
public boolean isTestSerialization() {
|
|
@ -30,7 +30,7 @@ import org.apache.commons.collections.OrderedMapIterator;
|
|||
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.
|
||||
*
|
||||
* @since Commons Collections 3.0
|
||||
|
@ -39,14 +39,14 @@ import org.apache.commons.collections.list.AbstractListTest;
|
|||
* @author Stephen Colebourne
|
||||
* @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);
|
||||
}
|
||||
|
||||
public static Test suite() {
|
||||
return BulkTest.makeSuite(TestListOrderedMap.class);
|
||||
return BulkTest.makeSuite(ListOrderedMapTest.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -405,16 +405,16 @@ public class TestListOrderedMap<K, V> extends AbstractTestOrderedMap<K, V> {
|
|||
|
||||
@Override
|
||||
public List<K> makeObject() {
|
||||
return TestListOrderedMap.this.makeObject().keyList();
|
||||
return ListOrderedMapTest.this.makeObject().keyList();
|
||||
}
|
||||
@Override
|
||||
public List<K> makeFullCollection() {
|
||||
return TestListOrderedMap.this.makeFullMap().keyList();
|
||||
return ListOrderedMapTest.this.makeFullMap().keyList();
|
||||
}
|
||||
|
||||
@Override
|
||||
public K[] getFullElements() {
|
||||
return TestListOrderedMap.this.getSampleKeys();
|
||||
return ListOrderedMapTest.this.getSampleKeys();
|
||||
}
|
||||
@Override
|
||||
public boolean isAddSupported() {
|
||||
|
@ -430,7 +430,7 @@ public class TestListOrderedMap<K, V> extends AbstractTestOrderedMap<K, V> {
|
|||
}
|
||||
@Override
|
||||
public boolean isNullSupported() {
|
||||
return TestListOrderedMap.this.isAllowNullKey();
|
||||
return ListOrderedMapTest.this.isAllowNullKey();
|
||||
}
|
||||
@Override
|
||||
public boolean isTestSerialization() {
|
||||
|
@ -446,16 +446,16 @@ public class TestListOrderedMap<K, V> extends AbstractTestOrderedMap<K, V> {
|
|||
|
||||
@Override
|
||||
public List<V> makeObject() {
|
||||
return TestListOrderedMap.this.makeObject().valueList();
|
||||
return ListOrderedMapTest.this.makeObject().valueList();
|
||||
}
|
||||
@Override
|
||||
public List<V> makeFullCollection() {
|
||||
return TestListOrderedMap.this.makeFullMap().valueList();
|
||||
return ListOrderedMapTest.this.makeFullMap().valueList();
|
||||
}
|
||||
|
||||
@Override
|
||||
public V[] getFullElements() {
|
||||
return TestListOrderedMap.this.getSampleValues();
|
||||
return ListOrderedMapTest.this.getSampleValues();
|
||||
}
|
||||
@Override
|
||||
public boolean isAddSupported() {
|
||||
|
@ -471,7 +471,7 @@ public class TestListOrderedMap<K, V> extends AbstractTestOrderedMap<K, V> {
|
|||
}
|
||||
@Override
|
||||
public boolean isNullSupported() {
|
||||
return TestListOrderedMap.this.isAllowNullKey();
|
||||
return ListOrderedMapTest.this.isAllowNullKey();
|
||||
}
|
||||
@Override
|
||||
public boolean isTestSerialization() {
|
|
@ -30,7 +30,7 @@ import org.apache.commons.collections.keyvalue.MultiKey;
|
|||
*
|
||||
* @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 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 I8 = new Integer(8);
|
||||
|
||||
public TestMultiKeyMap(String testName) {
|
||||
public MultiKeyMapTest(String testName) {
|
||||
super(testName);
|
||||
}
|
||||
|
||||
public static Test suite() {
|
||||
return BulkTest.makeSuite(TestMultiKeyMap.class);
|
||||
return BulkTest.makeSuite(MultiKeyMapTest.class);
|
||||
}
|
||||
|
||||
@Override
|
|
@ -37,9 +37,9 @@ import org.apache.commons.collections.AbstractObjectTest;
|
|||
* @author Stephen Colebourne
|
||||
* @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);
|
||||
}
|
||||
|
|
@ -9,8 +9,8 @@ import junit.framework.Test;
|
|||
import org.apache.commons.collections.BulkTest;
|
||||
import org.apache.commons.collections.map.PassiveExpiringMap.ExpirationPolicy;
|
||||
|
||||
public class TestPassiveExpiringMap<K, V>
|
||||
extends AbstractTestMap<K, V> {
|
||||
public class PassiveExpiringMapTest<K, V>
|
||||
extends AbstractMapTest<K, V> {
|
||||
|
||||
private static class TestExpirationPolicy
|
||||
implements ExpirationPolicy<Integer, String> {
|
||||
|
@ -32,10 +32,10 @@ public class TestPassiveExpiringMap<K, V>
|
|||
}
|
||||
|
||||
public static Test suite() {
|
||||
return BulkTest.makeSuite(TestPassiveExpiringMap.class);
|
||||
return BulkTest.makeSuite(PassiveExpiringMapTest.class);
|
||||
}
|
||||
|
||||
public TestPassiveExpiringMap(String testName) {
|
||||
public PassiveExpiringMapTest(String testName) {
|
||||
super(testName);
|
||||
}
|
||||
|
|
@ -25,7 +25,7 @@ import org.apache.commons.collections.Predicate;
|
|||
import org.apache.commons.collections.functors.TruePredicate;
|
||||
|
||||
/**
|
||||
* Extension of {@link AbstractTestMap} for exercising the
|
||||
* Extension of {@link AbstractMapTest} for exercising the
|
||||
* {@link PredicatedMap} implementation.
|
||||
*
|
||||
* @since Commons Collections 3.0
|
||||
|
@ -33,7 +33,7 @@ import org.apache.commons.collections.functors.TruePredicate;
|
|||
*
|
||||
* @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();
|
||||
|
||||
|
@ -43,7 +43,7 @@ public class TestPredicatedMap<K, V> extends AbstractTestIterableMap<K, V> {
|
|||
}
|
||||
};
|
||||
|
||||
public TestPredicatedMap(String testName) {
|
||||
public PredicatedMapTest(String testName) {
|
||||
super(testName);
|
||||
}
|
||||
|
|
@ -27,7 +27,7 @@ import org.apache.commons.collections.Predicate;
|
|||
import org.apache.commons.collections.functors.TruePredicate;
|
||||
|
||||
/**
|
||||
* Extension of {@link TestPredicatedMap} for exercising the
|
||||
* Extension of {@link PredicatedMapTest} for exercising the
|
||||
* {@link PredicatedSortedMap} implementation.
|
||||
*
|
||||
* @since Commons Collections 3.0
|
||||
|
@ -35,7 +35,7 @@ import org.apache.commons.collections.functors.TruePredicate;
|
|||
*
|
||||
* @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();
|
||||
|
||||
|
@ -45,7 +45,7 @@ public class TestPredicatedSortedMap<K, V> extends AbstractTestSortedMap<K, V> {
|
|||
}
|
||||
};
|
||||
|
||||
public TestPredicatedSortedMap(String testName) {
|
||||
public PredicatedSortedMapTest(String testName) {
|
||||
super(testName);
|
||||
}
|
||||
|
|
@ -35,19 +35,19 @@ import org.apache.commons.collections.map.AbstractReferenceMap.ReferenceStrength
|
|||
* @author Stephen Colebourne
|
||||
* @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 I1B = new Integer(1);
|
||||
private static final Integer I2A = new Integer(2);
|
||||
private static final Integer I2B = new Integer(2);
|
||||
|
||||
public TestReferenceIdentityMap(String testName) {
|
||||
public ReferenceIdentityMapTest(String testName) {
|
||||
super(testName);
|
||||
}
|
||||
|
||||
public static Test suite() {
|
||||
return BulkTest.makeSuite(TestReferenceIdentityMap.class);
|
||||
return BulkTest.makeSuite(ReferenceIdentityMapTest.class);
|
||||
}
|
||||
|
||||
@Override
|
|
@ -32,14 +32,14 @@ import org.apache.commons.collections.map.AbstractReferenceMap.ReferenceStrength
|
|||
* @author Paul Jack
|
||||
* @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);
|
||||
}
|
||||
|
||||
public static Test suite() {
|
||||
return BulkTest.makeSuite(TestReferenceMap.class);
|
||||
return BulkTest.makeSuite(ReferenceMapTest.class);
|
||||
}
|
||||
|
||||
@Override
|
|
@ -31,18 +31,18 @@ import org.apache.commons.collections.OrderedMap;
|
|||
*
|
||||
* @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 TWO = new Integer(2);
|
||||
private static final String TEN = "10";
|
||||
|
||||
public TestSingletonMap(String testName) {
|
||||
public SingletonMapTest(String testName) {
|
||||
super(testName);
|
||||
}
|
||||
|
||||
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
|
||||
// but its not relevant, so we ignore them
|
||||
return new String[] {
|
||||
"TestSingletonMap.bulkTestMapIterator.testEmptyMapIterator",
|
||||
"TestSingletonMap.bulkTestOrderedMapIterator.testEmptyMapIterator",
|
||||
"SingletonMapTest.bulkTestMapIterator.testEmptyMapIterator",
|
||||
"SingletonMapTest.bulkTestOrderedMapIterator.testEmptyMapIterator",
|
||||
};
|
||||
}
|
||||
|
|
@ -28,14 +28,14 @@ import org.apache.commons.collections.BulkTest;
|
|||
*
|
||||
* @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);
|
||||
}
|
||||
|
||||
public static Test suite() {
|
||||
return BulkTest.makeSuite(TestStaticBucketMap.class);
|
||||
return BulkTest.makeSuite(StaticBucketMapTest.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -53,7 +53,7 @@ public class TestStaticBucketMap<K, V> extends AbstractTestIterableMap<K, V> {
|
|||
|
||||
@Override
|
||||
public String[] ignoredTests() {
|
||||
String pre = "TestStaticBucketMap.bulkTestMap";
|
||||
String pre = "StaticBucketMapTest.bulkTestMap";
|
||||
String post = ".testCollectionIteratorFailFast";
|
||||
return new String[] {
|
||||
pre + "EntrySet" + post,
|
|
@ -26,7 +26,7 @@ import org.apache.commons.collections.TransformerUtils;
|
|||
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.
|
||||
*
|
||||
* @since Commons Collections 3.0
|
||||
|
@ -34,9 +34,9 @@ import org.apache.commons.collections.collection.TransformedCollectionTest;
|
|||
*
|
||||
* @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);
|
||||
}
|
||||
|
|
@ -29,7 +29,7 @@ import org.apache.commons.collections.TransformerUtils;
|
|||
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.
|
||||
*
|
||||
* @since Commons Collections 3.0
|
||||
|
@ -37,14 +37,14 @@ import org.apache.commons.collections.collection.TransformedCollectionTest;
|
|||
*
|
||||
* @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);
|
||||
}
|
||||
|
||||
public static Test suite() {
|
||||
return BulkTest.makeSuite(TestTransformedSortedMap.class);
|
||||
return BulkTest.makeSuite(TransformedSortedMapTest.class);
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
|
@ -23,7 +23,7 @@ import org.apache.commons.collections.IterableMap;
|
|||
import org.apache.commons.collections.Unmodifiable;
|
||||
|
||||
/**
|
||||
* Extension of {@link AbstractTestMap} for exercising the
|
||||
* Extension of {@link AbstractMapTest} for exercising the
|
||||
* {@link UnmodifiableMap} implementation.
|
||||
*
|
||||
* @since Commons Collections 3.0
|
||||
|
@ -31,9 +31,9 @@ import org.apache.commons.collections.Unmodifiable;
|
|||
*
|
||||
* @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);
|
||||
}
|
||||
|
|
@ -22,7 +22,7 @@ import org.apache.commons.collections.OrderedMap;
|
|||
import org.apache.commons.collections.Unmodifiable;
|
||||
|
||||
/**
|
||||
* Extension of {@link AbstractTestOrderedMap} for exercising the
|
||||
* Extension of {@link AbstractOrderedMapTest} for exercising the
|
||||
* {@link UnmodifiableOrderedMap} implementation.
|
||||
*
|
||||
* @since Commons Collections 3.0
|
||||
|
@ -30,9 +30,9 @@ import org.apache.commons.collections.Unmodifiable;
|
|||
*
|
||||
* @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);
|
||||
}
|
||||
|
|
@ -22,7 +22,7 @@ import java.util.TreeMap;
|
|||
import org.apache.commons.collections.Unmodifiable;
|
||||
|
||||
/**
|
||||
* Extension of {@link AbstractTestSortedMap} for exercising the
|
||||
* Extension of {@link AbstractSortedMapTest} for exercising the
|
||||
* {@link UnmodifiableSortedMap} implementation.
|
||||
*
|
||||
* @since Commons Collections 3.0
|
||||
|
@ -30,9 +30,9 @@ import org.apache.commons.collections.Unmodifiable;
|
|||
*
|
||||
* @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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue