Renamed unit tests for set package.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/collections/trunk@1374067 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
056d81fe40
commit
dcb64284ef
|
@ -105,7 +105,7 @@ import org.apache.commons.collections.AbstractTestObject;
|
||||||
* that's compatible with your collection implementation.
|
* that's compatible with your collection implementation.
|
||||||
* <p>
|
* <p>
|
||||||
* If you're extending {@link org.apache.commons.collections.list.AbstractListTest AbstractListTest},
|
* If you're extending {@link org.apache.commons.collections.list.AbstractListTest AbstractListTest},
|
||||||
* {@link org.apache.commons.collections.set.AbstractTestSet AbstractTestSet},
|
* {@link org.apache.commons.collections.set.AbstractSetTest AbstractTestSet},
|
||||||
* or {@link org.apache.commons.collections.bag.AbstractBagTest AbstractBagTest},
|
* or {@link org.apache.commons.collections.bag.AbstractBagTest AbstractBagTest},
|
||||||
* you probably don't have to worry about the
|
* you probably don't have to worry about the
|
||||||
* above methods, because those three classes already override the methods
|
* above methods, because those three classes already override the methods
|
||||||
|
|
|
@ -34,7 +34,7 @@ import org.apache.commons.collections.BulkTest;
|
||||||
import org.apache.commons.collections.CollectionUtils;
|
import org.apache.commons.collections.CollectionUtils;
|
||||||
import org.apache.commons.collections.collection.AbstractCollectionTest;
|
import org.apache.commons.collections.collection.AbstractCollectionTest;
|
||||||
import org.apache.commons.collections.keyvalue.DefaultMapEntry;
|
import org.apache.commons.collections.keyvalue.DefaultMapEntry;
|
||||||
import org.apache.commons.collections.set.AbstractTestSet;
|
import org.apache.commons.collections.set.AbstractSetTest;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Abstract test class for {@link java.util.Map} methods and contracts.
|
* Abstract test class for {@link java.util.Map} methods and contracts.
|
||||||
|
@ -1510,17 +1510,17 @@ public abstract class AbstractTestMap<K, V> extends AbstractTestObject {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Bulk test {@link Map#entrySet()}. This method runs through all of
|
* Bulk test {@link Map#entrySet()}. This method runs through all of
|
||||||
* the tests in {@link AbstractTestSet}.
|
* the tests in {@link AbstractSetTest}.
|
||||||
* After modification operations, {@link #verify()} is invoked to ensure
|
* After modification operations, {@link #verify()} is invoked to ensure
|
||||||
* that the map and the other collection views are still valid.
|
* that the map and the other collection views are still valid.
|
||||||
*
|
*
|
||||||
* @return a {@link AbstractTestSet} instance for testing the map's entry set
|
* @return a {@link AbstractSetTest} instance for testing the map's entry set
|
||||||
*/
|
*/
|
||||||
public BulkTest bulkTestMapEntrySet() {
|
public BulkTest bulkTestMapEntrySet() {
|
||||||
return new TestMapEntrySet();
|
return new TestMapEntrySet();
|
||||||
}
|
}
|
||||||
|
|
||||||
public class TestMapEntrySet extends AbstractTestSet<Map.Entry<K, V>> {
|
public class TestMapEntrySet extends AbstractSetTest<Map.Entry<K, V>> {
|
||||||
public TestMapEntrySet() {
|
public TestMapEntrySet() {
|
||||||
super("MapEntrySet");
|
super("MapEntrySet");
|
||||||
}
|
}
|
||||||
|
@ -1700,17 +1700,17 @@ public abstract class AbstractTestMap<K, V> extends AbstractTestObject {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Bulk test {@link Map#keySet()}. This method runs through all of
|
* Bulk test {@link Map#keySet()}. This method runs through all of
|
||||||
* the tests in {@link AbstractTestSet}.
|
* the tests in {@link AbstractSetTest}.
|
||||||
* After modification operations, {@link #verify()} is invoked to ensure
|
* After modification operations, {@link #verify()} is invoked to ensure
|
||||||
* that the map and the other collection views are still valid.
|
* that the map and the other collection views are still valid.
|
||||||
*
|
*
|
||||||
* @return a {@link AbstractTestSet} instance for testing the map's key set
|
* @return a {@link AbstractSetTest} instance for testing the map's key set
|
||||||
*/
|
*/
|
||||||
public BulkTest bulkTestMapKeySet() {
|
public BulkTest bulkTestMapKeySet() {
|
||||||
return new TestMapKeySet();
|
return new TestMapKeySet();
|
||||||
}
|
}
|
||||||
|
|
||||||
public class TestMapKeySet extends AbstractTestSet<K> {
|
public class TestMapKeySet extends AbstractSetTest<K> {
|
||||||
public TestMapKeySet() {
|
public TestMapKeySet() {
|
||||||
super("");
|
super("");
|
||||||
}
|
}
|
||||||
|
|
|
@ -38,19 +38,17 @@ import org.apache.commons.collections.collection.AbstractCollectionTest;
|
||||||
* set is not modifiable, or if your set restricts what kinds of
|
* set is not modifiable, or if your set restricts what kinds of
|
||||||
* elements may be added; see {@link AbstractCollectionTest} for more details.
|
* elements may be added; see {@link AbstractCollectionTest} for more details.
|
||||||
*
|
*
|
||||||
* @since Commons Collections 3.0
|
* @since 3.0
|
||||||
* @version $Revision$
|
* @version $Id$
|
||||||
*
|
|
||||||
* @author Paul Jack
|
|
||||||
*/
|
*/
|
||||||
public abstract class AbstractTestSet<E> extends AbstractCollectionTest<E> {
|
public abstract class AbstractSetTest<E> extends AbstractCollectionTest<E> {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* JUnit constructor.
|
* JUnit constructor.
|
||||||
*
|
*
|
||||||
* @param name name for test
|
* @param name name for test
|
||||||
*/
|
*/
|
||||||
public AbstractTestSet(String name) {
|
public AbstractSetTest(String name) {
|
||||||
super(name);
|
super(name);
|
||||||
}
|
}
|
||||||
|
|
|
@ -28,22 +28,19 @@ import org.apache.commons.collections.BulkTest;
|
||||||
* To use, subclass and override the {@link #makeObject()}
|
* To use, subclass and override the {@link #makeObject()}
|
||||||
* method. You may have to override other protected methods if your
|
* method. You may have to override other protected methods if your
|
||||||
* set is not modifiable, or if your set restricts what kinds of
|
* set is not modifiable, or if your set restricts what kinds of
|
||||||
* elements may be added; see {@link AbstractTestSet} for more details.
|
* elements may be added; see {@link AbstractSetTest} for more details.
|
||||||
*
|
*
|
||||||
* @since Commons Collections 3.0
|
* @since 3.0
|
||||||
* @version $Revision$
|
* @version $Id$
|
||||||
*
|
|
||||||
* @author Stephen Colebourne
|
|
||||||
* @author Dieter Wimberger
|
|
||||||
*/
|
*/
|
||||||
public abstract class AbstractTestSortedSet<E> extends AbstractTestSet<E> {
|
public abstract class AbstractSortedSetTest<E> extends AbstractSetTest<E> {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* JUnit constructor.
|
* JUnit constructor.
|
||||||
*
|
*
|
||||||
* @param name name for test
|
* @param name name for test
|
||||||
*/
|
*/
|
||||||
public AbstractTestSortedSet(String name) {
|
public AbstractSortedSetTest(String name) {
|
||||||
super(name);
|
super(name);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -147,11 +144,11 @@ public abstract class AbstractTestSortedSet<E> extends AbstractTestSet<E> {
|
||||||
//-----------------------------------------------------------------------
|
//-----------------------------------------------------------------------
|
||||||
/**
|
/**
|
||||||
* Bulk test {@link SortedSet#subSet(Object, Object)}. This method runs through all of
|
* Bulk test {@link SortedSet#subSet(Object, Object)}. This method runs through all of
|
||||||
* the tests in {@link AbstractTestSortedSet}.
|
* the tests in {@link AbstractSortedSetTest}.
|
||||||
* After modification operations, {@link #verify()} is invoked to ensure
|
* After modification operations, {@link #verify()} is invoked to ensure
|
||||||
* that the set and the other collection views are still valid.
|
* that the set and the other collection views are still valid.
|
||||||
*
|
*
|
||||||
* @return a {@link AbstractTestSet} instance for testing a subset.
|
* @return a {@link AbstractSetTest} instance for testing a subset.
|
||||||
*/
|
*/
|
||||||
public BulkTest bulkTestSortedSetSubSet() {
|
public BulkTest bulkTestSortedSetSubSet() {
|
||||||
int length = getFullElements().length;
|
int length = getFullElements().length;
|
||||||
|
@ -164,11 +161,11 @@ public abstract class AbstractTestSortedSet<E> extends AbstractTestSet<E> {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Bulk test {@link SortedSet#headSet(Object)}. This method runs through all of
|
* Bulk test {@link SortedSet#headSet(Object)}. This method runs through all of
|
||||||
* the tests in {@link AbstractTestSortedSet}.
|
* the tests in {@link AbstractSortedSetTest}.
|
||||||
* After modification operations, {@link #verify()} is invoked to ensure
|
* After modification operations, {@link #verify()} is invoked to ensure
|
||||||
* that the set and the other collection views are still valid.
|
* that the set and the other collection views are still valid.
|
||||||
*
|
*
|
||||||
* @return a {@link AbstractTestSet} instance for testing a headset.
|
* @return a {@link AbstractSetTest} instance for testing a headset.
|
||||||
*/
|
*/
|
||||||
public BulkTest bulkTestSortedSetHeadSet() {
|
public BulkTest bulkTestSortedSetHeadSet() {
|
||||||
int length = getFullElements().length;
|
int length = getFullElements().length;
|
||||||
|
@ -181,11 +178,11 @@ public abstract class AbstractTestSortedSet<E> extends AbstractTestSet<E> {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Bulk test {@link SortedSet#tailSet(Object)}. This method runs through all of
|
* Bulk test {@link SortedSet#tailSet(Object)}. This method runs through all of
|
||||||
* the tests in {@link AbstractTestSortedSet}.
|
* the tests in {@link AbstractSortedSetTest}.
|
||||||
* After modification operations, {@link #verify()} is invoked to ensure
|
* After modification operations, {@link #verify()} is invoked to ensure
|
||||||
* that the set and the other collection views are still valid.
|
* that the set and the other collection views are still valid.
|
||||||
*
|
*
|
||||||
* @return a {@link AbstractTestSet} instance for testing a tailset.
|
* @return a {@link AbstractSetTest} instance for testing a tailset.
|
||||||
*/
|
*/
|
||||||
public BulkTest bulkTestSortedSetTailSet() {
|
public BulkTest bulkTestSortedSetTailSet() {
|
||||||
int length = getFullElements().length;
|
int length = getFullElements().length;
|
||||||
|
@ -193,7 +190,7 @@ public abstract class AbstractTestSortedSet<E> extends AbstractTestSet<E> {
|
||||||
return new TestSortedSetSubSet(lobound, false);
|
return new TestSortedSetSubSet(lobound, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
public class TestSortedSetSubSet extends AbstractTestSortedSet<E> {
|
public class TestSortedSetSubSet extends AbstractSortedSetTest<E> {
|
||||||
|
|
||||||
private int m_Type;
|
private int m_Type;
|
||||||
private int m_LowBound;
|
private int m_LowBound;
|
||||||
|
@ -209,23 +206,23 @@ public abstract class AbstractTestSortedSet<E> extends AbstractTestSet<E> {
|
||||||
m_Type = TYPE_HEADSET;
|
m_Type = TYPE_HEADSET;
|
||||||
m_HighBound = bound;
|
m_HighBound = bound;
|
||||||
m_FullElements = (E[]) new Object[bound];
|
m_FullElements = (E[]) new Object[bound];
|
||||||
System.arraycopy(AbstractTestSortedSet.this.getFullElements(), 0, m_FullElements, 0, bound);
|
System.arraycopy(AbstractSortedSetTest.this.getFullElements(), 0, m_FullElements, 0, bound);
|
||||||
m_OtherElements = (E[]) new Object[bound - 1];
|
m_OtherElements = (E[]) new Object[bound - 1];
|
||||||
System.arraycopy(//src src_pos dst dst_pos length
|
System.arraycopy(//src src_pos dst dst_pos length
|
||||||
AbstractTestSortedSet.this.getOtherElements(), 0, m_OtherElements, 0, bound - 1);
|
AbstractSortedSetTest.this.getOtherElements(), 0, m_OtherElements, 0, bound - 1);
|
||||||
//System.out.println(new TreeSet(Arrays.asList(m_FullElements)));
|
//System.out.println(new TreeSet(Arrays.asList(m_FullElements)));
|
||||||
//System.out.println(new TreeSet(Arrays.asList(m_OtherElements)));
|
//System.out.println(new TreeSet(Arrays.asList(m_OtherElements)));
|
||||||
} else {
|
} else {
|
||||||
//System.out.println("TAILSET");
|
//System.out.println("TAILSET");
|
||||||
m_Type = TYPE_TAILSET;
|
m_Type = TYPE_TAILSET;
|
||||||
m_LowBound = bound;
|
m_LowBound = bound;
|
||||||
Object[] allelements = AbstractTestSortedSet.this.getFullElements();
|
Object[] allelements = AbstractSortedSetTest.this.getFullElements();
|
||||||
//System.out.println("bound = "+bound +"::length="+allelements.length);
|
//System.out.println("bound = "+bound +"::length="+allelements.length);
|
||||||
m_FullElements = (E[]) new Object[allelements.length - bound];
|
m_FullElements = (E[]) new Object[allelements.length - bound];
|
||||||
System.arraycopy(allelements, bound, m_FullElements, 0, allelements.length - bound);
|
System.arraycopy(allelements, bound, m_FullElements, 0, allelements.length - bound);
|
||||||
m_OtherElements = (E[]) new Object[allelements.length - bound - 1];
|
m_OtherElements = (E[]) new Object[allelements.length - bound - 1];
|
||||||
System.arraycopy(//src src_pos dst dst_pos length
|
System.arraycopy(//src src_pos dst dst_pos length
|
||||||
AbstractTestSortedSet.this.getOtherElements(), bound, m_OtherElements, 0, allelements.length - bound - 1);
|
AbstractSortedSetTest.this.getOtherElements(), bound, m_OtherElements, 0, allelements.length - bound - 1);
|
||||||
//System.out.println(new TreeSet(Arrays.asList(m_FullElements)));
|
//System.out.println(new TreeSet(Arrays.asList(m_FullElements)));
|
||||||
//System.out.println(new TreeSet(Arrays.asList(m_OtherElements)));
|
//System.out.println(new TreeSet(Arrays.asList(m_OtherElements)));
|
||||||
//resetFull();
|
//resetFull();
|
||||||
|
@ -246,10 +243,10 @@ public abstract class AbstractTestSortedSet<E> extends AbstractTestSet<E> {
|
||||||
int length = hibound - lobound;
|
int length = hibound - lobound;
|
||||||
//System.out.println("Low=" + lobound + "::High=" + hibound + "::Length=" + length);
|
//System.out.println("Low=" + lobound + "::High=" + hibound + "::Length=" + length);
|
||||||
m_FullElements = (E[]) new Object[length];
|
m_FullElements = (E[]) new Object[length];
|
||||||
System.arraycopy(AbstractTestSortedSet.this.getFullElements(), lobound, m_FullElements, 0, length);
|
System.arraycopy(AbstractSortedSetTest.this.getFullElements(), lobound, m_FullElements, 0, length);
|
||||||
m_OtherElements = (E[]) new Object[length - 1];
|
m_OtherElements = (E[]) new Object[length - 1];
|
||||||
System.arraycopy(//src src_pos dst dst_pos length
|
System.arraycopy(//src src_pos dst dst_pos length
|
||||||
AbstractTestSortedSet.this.getOtherElements(), lobound, m_OtherElements, 0, length - 1);
|
AbstractSortedSetTest.this.getOtherElements(), lobound, m_OtherElements, 0, length - 1);
|
||||||
|
|
||||||
//System.out.println(new TreeSet(Arrays.asList(m_FullElements)));
|
//System.out.println(new TreeSet(Arrays.asList(m_FullElements)));
|
||||||
//System.out.println(new TreeSet(Arrays.asList(m_OtherElements)));
|
//System.out.println(new TreeSet(Arrays.asList(m_OtherElements)));
|
||||||
|
@ -258,19 +255,19 @@ public abstract class AbstractTestSortedSet<E> extends AbstractTestSet<E> {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isNullSupported() {
|
public boolean isNullSupported() {
|
||||||
return AbstractTestSortedSet.this.isNullSupported();
|
return AbstractSortedSetTest.this.isNullSupported();
|
||||||
}
|
}
|
||||||
@Override
|
@Override
|
||||||
public boolean isAddSupported() {
|
public boolean isAddSupported() {
|
||||||
return AbstractTestSortedSet.this.isAddSupported();
|
return AbstractSortedSetTest.this.isAddSupported();
|
||||||
}
|
}
|
||||||
@Override
|
@Override
|
||||||
public boolean isRemoveSupported() {
|
public boolean isRemoveSupported() {
|
||||||
return AbstractTestSortedSet.this.isRemoveSupported();
|
return AbstractSortedSetTest.this.isRemoveSupported();
|
||||||
}
|
}
|
||||||
@Override
|
@Override
|
||||||
public boolean isFailFastSupported() {
|
public boolean isFailFastSupported() {
|
||||||
return AbstractTestSortedSet.this.isFailFastSupported();
|
return AbstractSortedSetTest.this.isFailFastSupported();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -283,7 +280,7 @@ public abstract class AbstractTestSortedSet<E> extends AbstractTestSet<E> {
|
||||||
}
|
}
|
||||||
|
|
||||||
private SortedSet<E> getSubSet(SortedSet<E> set) {
|
private SortedSet<E> getSubSet(SortedSet<E> set) {
|
||||||
E[] elements = AbstractTestSortedSet.this.getFullElements();
|
E[] elements = AbstractSortedSetTest.this.getFullElements();
|
||||||
switch (m_Type) {
|
switch (m_Type) {
|
||||||
case TYPE_SUBSET :
|
case TYPE_SUBSET :
|
||||||
return set.subSet(elements[m_LowBound], elements[m_HighBound]);
|
return set.subSet(elements[m_LowBound], elements[m_HighBound]);
|
||||||
|
@ -298,12 +295,12 @@ public abstract class AbstractTestSortedSet<E> extends AbstractTestSet<E> {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public SortedSet<E> makeObject() {
|
public SortedSet<E> makeObject() {
|
||||||
return getSubSet(AbstractTestSortedSet.this.makeObject());
|
return getSubSet(AbstractSortedSetTest.this.makeObject());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public SortedSet<E> makeFullCollection() {
|
public SortedSet<E> makeFullCollection() {
|
||||||
return getSubSet(AbstractTestSortedSet.this.makeFullCollection());
|
return getSubSet(AbstractSortedSetTest.this.makeFullCollection());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
|
@ -24,18 +24,14 @@ import java.util.Set;
|
||||||
import org.apache.commons.collections.collection.CompositeCollection;
|
import org.apache.commons.collections.collection.CompositeCollection;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Extension of {@link AbstractTestSet} for exercising the
|
* Extension of {@link AbstractSetTest} for exercising the
|
||||||
* {@link CompositeSet} implementation.
|
* {@link CompositeSet} implementation.
|
||||||
*
|
*
|
||||||
* @since Commons Collections 3.0
|
* @since 3.0
|
||||||
* @version $Revision$
|
* @version $Id$
|
||||||
*
|
|
||||||
* @author Brian McCallister
|
|
||||||
* @author Phil Steitz
|
|
||||||
*/
|
*/
|
||||||
|
public class CompositeSetTest<E> extends AbstractSetTest<E> {
|
||||||
public class TestCompositeSet<E> extends AbstractTestSet<E> {
|
public CompositeSetTest(String name) {
|
||||||
public TestCompositeSet(String name) {
|
|
||||||
super(name);
|
super(name);
|
||||||
}
|
}
|
||||||
|
|
|
@ -23,8 +23,8 @@ import java.util.Set;
|
||||||
import org.apache.commons.collections.collection.CompositeCollection;
|
import org.apache.commons.collections.collection.CompositeCollection;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This class is used in TestCompositeSet. When testing serialization,
|
* This class is used in CompositeSetTest. When testing serialization,
|
||||||
* the class has to be separate of TestCompositeSet, else the test
|
* the class has to be separate of CompositeSetTest, else the test
|
||||||
* class also has to be serialized.
|
* class also has to be serialized.
|
||||||
*/
|
*/
|
||||||
class EmptySetMutator<E> implements CompositeSet.SetMutator<E> {
|
class EmptySetMutator<E> implements CompositeSet.SetMutator<E> {
|
||||||
|
|
|
@ -21,23 +21,20 @@ import java.util.Iterator;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Extension of {@link AbstractTestSet} for exercising the {@link ListOrderedSet}
|
* Extension of {@link AbstractSetTest} for exercising the {@link ListOrderedSet}
|
||||||
* implementation.
|
* implementation.
|
||||||
*
|
*
|
||||||
* @since Commons Collections 3.1
|
* @since 3.1
|
||||||
* @version $Revision$
|
* @version $Id$
|
||||||
*
|
|
||||||
* @author Henning P. Schmiedehausen
|
|
||||||
* @author Stephen Colebourne
|
|
||||||
*/
|
*/
|
||||||
public class TestListOrderedSet2<E> extends AbstractTestSet<E> {
|
public class ListOrderedSet2Test<E> extends AbstractSetTest<E> {
|
||||||
|
|
||||||
private static final Integer ZERO = new Integer(0);
|
private static final Integer ZERO = new Integer(0);
|
||||||
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 Integer THREE = new Integer(3);
|
private static final Integer THREE = new Integer(3);
|
||||||
|
|
||||||
public TestListOrderedSet2(String testName) {
|
public ListOrderedSet2Test(String testName) {
|
||||||
super(testName);
|
super(testName);
|
||||||
}
|
}
|
||||||
|
|
|
@ -23,23 +23,20 @@ import java.util.List;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Extension of {@link AbstractTestSet} for exercising the {@link ListOrderedSet}
|
* Extension of {@link AbstractSetTest} for exercising the {@link ListOrderedSet}
|
||||||
* implementation.
|
* implementation.
|
||||||
*
|
*
|
||||||
* @since Commons Collections 3.0
|
* @since 3.0
|
||||||
* @version $Revision$
|
* @version $Id$
|
||||||
*
|
|
||||||
* @author Henning P. Schmiedehausen
|
|
||||||
* @author Stephen Colebourne
|
|
||||||
*/
|
*/
|
||||||
public class TestListOrderedSet<E> extends AbstractTestSet<E> {
|
public class ListOrderedSetTest<E> extends AbstractSetTest<E> {
|
||||||
|
|
||||||
private static final Integer ZERO = new Integer(0);
|
private static final Integer ZERO = new Integer(0);
|
||||||
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 Integer THREE = new Integer(3);
|
private static final Integer THREE = new Integer(3);
|
||||||
|
|
||||||
public TestListOrderedSet(String testName) {
|
public ListOrderedSetTest(String testName) {
|
||||||
super(testName);
|
super(testName);
|
||||||
}
|
}
|
||||||
|
|
|
@ -24,14 +24,12 @@ import org.apache.commons.collections.map.LinkedMap;
|
||||||
/**
|
/**
|
||||||
* JUnit test.
|
* JUnit test.
|
||||||
*
|
*
|
||||||
* @since Commons Collections 3.1
|
* @since 3.1
|
||||||
* @version $Revision$
|
* @version $Id$
|
||||||
*
|
|
||||||
* @author Stephen Colebourne
|
|
||||||
*/
|
*/
|
||||||
public class TestMapBackedSet2<E> extends AbstractTestSet<E> {
|
public class MapBackedSet2Test<E> extends AbstractSetTest<E> {
|
||||||
|
|
||||||
public TestMapBackedSet2(String testName) {
|
public MapBackedSet2Test(String testName) {
|
||||||
super(testName);
|
super(testName);
|
||||||
}
|
}
|
||||||
|
|
|
@ -23,14 +23,12 @@ import org.apache.commons.collections.map.HashedMap;
|
||||||
/**
|
/**
|
||||||
* JUnit test.
|
* JUnit test.
|
||||||
*
|
*
|
||||||
* @since Commons Collections 3.1
|
* @since 3.1
|
||||||
* @version $Revision$
|
* @version $Id$
|
||||||
*
|
|
||||||
* @author Stephen Colebourne
|
|
||||||
*/
|
*/
|
||||||
public class TestMapBackedSet<E> extends AbstractTestSet<E> {
|
public class MapBackedSetTest<E> extends AbstractSetTest<E> {
|
||||||
|
|
||||||
public TestMapBackedSet(String testName) {
|
public MapBackedSetTest(String testName) {
|
||||||
super(testName);
|
super(testName);
|
||||||
}
|
}
|
||||||
|
|
|
@ -23,17 +23,15 @@ import org.apache.commons.collections.Predicate;
|
||||||
import org.apache.commons.collections.functors.TruePredicate;
|
import org.apache.commons.collections.functors.TruePredicate;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Extension of {@link AbstractTestSet} for exercising the
|
* Extension of {@link AbstractSetTest} for exercising the
|
||||||
* {@link PredicatedSet} implementation.
|
* {@link PredicatedSet} implementation.
|
||||||
*
|
*
|
||||||
* @since Commons Collections 3.0
|
* @since 3.0
|
||||||
* @version $Revision$
|
* @version $Id$
|
||||||
*
|
|
||||||
* @author Phil Steitz
|
|
||||||
*/
|
*/
|
||||||
public class TestPredicatedSet<E> extends AbstractTestSet<E> {
|
public class PredicatedSetTest<E> extends AbstractSetTest<E> {
|
||||||
|
|
||||||
public TestPredicatedSet(String testName) {
|
public PredicatedSetTest(String testName) {
|
||||||
super(testName);
|
super(testName);
|
||||||
}
|
}
|
||||||
|
|
|
@ -29,22 +29,20 @@ import org.apache.commons.collections.Predicate;
|
||||||
import org.apache.commons.collections.functors.TruePredicate;
|
import org.apache.commons.collections.functors.TruePredicate;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Extension of {@link AbstractTestSortedSet} for exercising the
|
* Extension of {@link AbstractSortedSetTest} for exercising the
|
||||||
* {@link PredicatedSortedSet} implementation.
|
* {@link PredicatedSortedSet} implementation.
|
||||||
*
|
*
|
||||||
* @since Commons Collections 3.0
|
* @since 3.0
|
||||||
* @version $Revision$
|
* @version $Id$
|
||||||
*
|
|
||||||
* @author Phil Steitz
|
|
||||||
*/
|
*/
|
||||||
public class TestPredicatedSortedSet<E> extends AbstractTestSortedSet<E> {
|
public class PredicatedSortedSetTest<E> extends AbstractSortedSetTest<E> {
|
||||||
|
|
||||||
public TestPredicatedSortedSet(String testName) {
|
public PredicatedSortedSetTest(String testName) {
|
||||||
super(testName);
|
super(testName);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static Test suite() {
|
public static Test suite() {
|
||||||
return BulkTest.makeSuite(TestPredicatedSortedSet.class);
|
return BulkTest.makeSuite(PredicatedSortedSetTest.class);
|
||||||
}
|
}
|
||||||
|
|
||||||
//-------------------------------------------------------------------
|
//-------------------------------------------------------------------
|
|
@ -24,22 +24,20 @@ import junit.framework.Test;
|
||||||
import org.apache.commons.collections.BulkTest;
|
import org.apache.commons.collections.BulkTest;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Extension of {@link AbstractTestSet} for exercising the
|
* Extension of {@link AbstractSetTest} for exercising the
|
||||||
* {@link SynchronizedSet} implementation.
|
* {@link SynchronizedSet} implementation.
|
||||||
*
|
*
|
||||||
* @since Commons Collections 3.1
|
* @since 3.1
|
||||||
* @version $Revision$
|
* @version $Id$
|
||||||
*
|
|
||||||
* @author Stephen Colebourne
|
|
||||||
*/
|
*/
|
||||||
public class TestSynchronizedSet<E> extends AbstractTestSet<E> {
|
public class SynchronizedSetTest<E> extends AbstractSetTest<E> {
|
||||||
|
|
||||||
public TestSynchronizedSet(String testName) {
|
public SynchronizedSetTest(String testName) {
|
||||||
super(testName);
|
super(testName);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static Test suite() {
|
public static Test suite() {
|
||||||
return BulkTest.makeSuite(TestSynchronizedSet.class);
|
return BulkTest.makeSuite(SynchronizedSetTest.class);
|
||||||
}
|
}
|
||||||
|
|
||||||
//-------------------------------------------------------------------
|
//-------------------------------------------------------------------
|
|
@ -24,22 +24,20 @@ import junit.framework.Test;
|
||||||
import org.apache.commons.collections.BulkTest;
|
import org.apache.commons.collections.BulkTest;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Extension of {@link AbstractTestSet} for exercising the
|
* Extension of {@link AbstractSetTest} for exercising the
|
||||||
* {@link SynchronizedSortedSet} implementation.
|
* {@link SynchronizedSortedSet} implementation.
|
||||||
*
|
*
|
||||||
* @since Commons Collections 3.1
|
* @since 3.1
|
||||||
* @version $Revision$
|
* @version $Id$
|
||||||
*
|
|
||||||
* @author Stephen Colebourne
|
|
||||||
*/
|
*/
|
||||||
public class TestSynchronizedSortedSet<E> extends AbstractTestSortedSet<E> {
|
public class SynchronizedSortedSetTest<E> extends AbstractSortedSetTest<E> {
|
||||||
|
|
||||||
public TestSynchronizedSortedSet(String testName) {
|
public SynchronizedSortedSetTest(String testName) {
|
||||||
super(testName);
|
super(testName);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static Test suite() {
|
public static Test suite() {
|
||||||
return BulkTest.makeSuite(TestSynchronizedSortedSet.class);
|
return BulkTest.makeSuite(SynchronizedSortedSetTest.class);
|
||||||
}
|
}
|
||||||
|
|
||||||
//-------------------------------------------------------------------
|
//-------------------------------------------------------------------
|
|
@ -24,17 +24,15 @@ import org.apache.commons.collections.Transformer;
|
||||||
import org.apache.commons.collections.collection.TransformedCollectionTest;
|
import org.apache.commons.collections.collection.TransformedCollectionTest;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Extension of {@link AbstractTestSet} for exercising the {@link TransformedSet}
|
* Extension of {@link AbstractSetTest} for exercising the {@link TransformedSet}
|
||||||
* implementation.
|
* implementation.
|
||||||
*
|
*
|
||||||
* @since Commons Collections 3.0
|
* @since 3.0
|
||||||
* @version $Revision$
|
* @version $Id$
|
||||||
*
|
|
||||||
* @author Stephen Colebourne
|
|
||||||
*/
|
*/
|
||||||
public class TestTransformedSet<E> extends AbstractTestSet<E> {
|
public class TransformedSetTest<E> extends AbstractSetTest<E> {
|
||||||
|
|
||||||
public TestTransformedSet(String testName) {
|
public TransformedSetTest(String testName) {
|
||||||
super(testName);
|
super(testName);
|
||||||
}
|
}
|
||||||
|
|
|
@ -28,22 +28,20 @@ import org.apache.commons.collections.Transformer;
|
||||||
import org.apache.commons.collections.collection.TransformedCollectionTest;
|
import org.apache.commons.collections.collection.TransformedCollectionTest;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Extension of {@link AbstractTestSortedSet} for exercising the {@link TransformedSortedSet}
|
* Extension of {@link AbstractSortedSetTest} for exercising the {@link TransformedSortedSet}
|
||||||
* implementation.
|
* implementation.
|
||||||
*
|
*
|
||||||
* @since Commons Collections 3.0
|
* @since 3.0
|
||||||
* @version $Revision$
|
* @version $Id$
|
||||||
*
|
|
||||||
* @author Stephen Colebourne
|
|
||||||
*/
|
*/
|
||||||
public class TestTransformedSortedSet<E> extends AbstractTestSortedSet<E> {
|
public class TransformedSortedSetTest<E> extends AbstractSortedSetTest<E> {
|
||||||
|
|
||||||
public TestTransformedSortedSet(String testName) {
|
public TransformedSortedSetTest(String testName) {
|
||||||
super(testName);
|
super(testName);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static Test suite() {
|
public static Test suite() {
|
||||||
return BulkTest.makeSuite(TestTransformedSortedSet.class);
|
return BulkTest.makeSuite(TransformedSortedSetTest.class);
|
||||||
}
|
}
|
||||||
|
|
||||||
//-----------------------------------------------------------------------
|
//-----------------------------------------------------------------------
|
|
@ -25,22 +25,20 @@ import junit.framework.Test;
|
||||||
import org.apache.commons.collections.BulkTest;
|
import org.apache.commons.collections.BulkTest;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Extension of {@link AbstractTestSet} for exercising the
|
* Extension of {@link AbstractSetTest} for exercising the
|
||||||
* {@link UnmodifiableSet} implementation.
|
* {@link UnmodifiableSet} implementation.
|
||||||
*
|
*
|
||||||
* @since Commons Collections 3.0
|
* @since 3.0
|
||||||
* @version $Revision$
|
* @version $Id$
|
||||||
*
|
|
||||||
* @author Phil Steitz
|
|
||||||
*/
|
*/
|
||||||
public class TestUnmodifiableSet<E> extends AbstractTestSet<E> {
|
public class UnmodifiableSetTest<E> extends AbstractSetTest<E> {
|
||||||
|
|
||||||
public TestUnmodifiableSet(String testName) {
|
public UnmodifiableSetTest(String testName) {
|
||||||
super(testName);
|
super(testName);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static Test suite() {
|
public static Test suite() {
|
||||||
return BulkTest.makeSuite(TestUnmodifiableSet.class);
|
return BulkTest.makeSuite(UnmodifiableSetTest.class);
|
||||||
}
|
}
|
||||||
|
|
||||||
//-------------------------------------------------------------------
|
//-------------------------------------------------------------------
|
|
@ -28,24 +28,22 @@ import junit.framework.Test;
|
||||||
import org.apache.commons.collections.BulkTest;
|
import org.apache.commons.collections.BulkTest;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Extension of {@link AbstractTestSortedSet} for exercising the
|
* Extension of {@link AbstractSortedSetTest} for exercising the
|
||||||
* {@link UnmodifiableSortedSet} implementation.
|
* {@link UnmodifiableSortedSet} implementation.
|
||||||
*
|
*
|
||||||
* @since Commons Collections 3.0
|
* @since 3.0
|
||||||
* @version $Revision$
|
* @version $Id$
|
||||||
*
|
|
||||||
* @author Phil Steitz
|
|
||||||
*/
|
*/
|
||||||
public class TestUnmodifiableSortedSet<E> extends AbstractTestSortedSet<E> {
|
public class UnmodifiableSortedSetTest<E> extends AbstractSortedSetTest<E> {
|
||||||
protected UnmodifiableSortedSet<E> set = null;
|
protected UnmodifiableSortedSet<E> set = null;
|
||||||
protected ArrayList<E> array = null;
|
protected ArrayList<E> array = null;
|
||||||
|
|
||||||
public TestUnmodifiableSortedSet(String testName) {
|
public UnmodifiableSortedSetTest(String testName) {
|
||||||
super(testName);
|
super(testName);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static Test suite() {
|
public static Test suite() {
|
||||||
return BulkTest.makeSuite(TestUnmodifiableSortedSet.class);
|
return BulkTest.makeSuite(UnmodifiableSortedSetTest.class);
|
||||||
}
|
}
|
||||||
|
|
||||||
//-------------------------------------------------------------------
|
//-------------------------------------------------------------------
|
Loading…
Reference in New Issue