diff --git a/src/test/java/org/apache/commons/collections/bidimap/AbstractTestBidiMap.java b/src/test/java/org/apache/commons/collections/bidimap/AbstractBidiMapTest.java similarity index 93% rename from src/test/java/org/apache/commons/collections/bidimap/AbstractTestBidiMap.java rename to src/test/java/org/apache/commons/collections/bidimap/AbstractBidiMapTest.java index 386b01c77..b01168f63 100644 --- a/src/test/java/org/apache/commons/collections/bidimap/AbstractTestBidiMap.java +++ b/src/test/java/org/apache/commons/collections/bidimap/AbstractBidiMapTest.java @@ -31,18 +31,15 @@ import org.apache.commons.collections.map.AbstractTestIterableMap; /** * Abstract test class for {@link BidiMap} methods and contracts. * - * @version $Revision$ - * - * @author Matthew Hawthorne - * @author Stephen Colebourne + * @version $Id$ */ -public abstract class AbstractTestBidiMap extends AbstractTestIterableMap { +public abstract class AbstractBidiMapTest extends AbstractTestIterableMap { - public AbstractTestBidiMap(String testName) { + public AbstractBidiMapTest(String testName) { super(testName); } - public AbstractTestBidiMap() { + public AbstractBidiMapTest() { super("Inverse"); } @@ -388,13 +385,13 @@ public abstract class AbstractTestBidiMap extends AbstractTestIterableMap< return; // simplest way of dealing with tricky situation } entryConfirmed2.setValue(newValue1); - AbstractTestBidiMap.this.getConfirmed().remove(key1); + AbstractBidiMapTest.this.getConfirmed().remove(key1); assertEquals(newValue1, entry2.getValue()); - assertEquals(true, AbstractTestBidiMap.this.getMap().containsKey(entry2.getKey())); - assertEquals(true, AbstractTestBidiMap.this.getMap().containsValue(newValue1)); - assertEquals(newValue1, AbstractTestBidiMap.this.getMap().get(entry2.getKey())); - assertEquals(false, AbstractTestBidiMap.this.getMap().containsKey(key1)); - assertEquals(false, AbstractTestBidiMap.this.getMap().containsValue(newValue2)); + assertEquals(true, AbstractBidiMapTest.this.getMap().containsKey(entry2.getKey())); + assertEquals(true, AbstractBidiMapTest.this.getMap().containsValue(newValue1)); + assertEquals(newValue1, AbstractBidiMapTest.this.getMap().get(entry2.getKey())); + assertEquals(false, AbstractBidiMapTest.this.getMap().containsKey(key1)); + assertEquals(false, AbstractBidiMapTest.this.getMap().containsValue(newValue2)); TestBidiMapEntrySet.this.verify(); // check for ConcurrentModification @@ -409,10 +406,10 @@ public abstract class AbstractTestBidiMap extends AbstractTestIterableMap< return new TestInverseBidiMap(this); } - public class TestInverseBidiMap extends AbstractTestBidiMap { - final AbstractTestBidiMap main; + public class TestInverseBidiMap extends AbstractBidiMapTest { + final AbstractBidiMapTest main; - public TestInverseBidiMap(AbstractTestBidiMap main) { + public TestInverseBidiMap(AbstractBidiMapTest main) { super(); this.main = main; } @@ -485,47 +482,47 @@ public abstract class AbstractTestBidiMap extends AbstractTestIterableMap< @Override public V[] addSetValues() { - return AbstractTestBidiMap.this.getNewSampleValues(); + return AbstractBidiMapTest.this.getNewSampleValues(); } @Override public boolean supportsRemove() { - return AbstractTestBidiMap.this.isRemoveSupported(); + return AbstractBidiMapTest.this.isRemoveSupported(); } @Override public boolean supportsSetValue() { - return AbstractTestBidiMap.this.isSetValueSupported(); + return AbstractBidiMapTest.this.isSetValueSupported(); } @Override public MapIterator makeEmptyIterator() { resetEmpty(); - return AbstractTestBidiMap.this.getMap().mapIterator(); + return AbstractBidiMapTest.this.getMap().mapIterator(); } @Override public MapIterator makeObject() { resetFull(); - return AbstractTestBidiMap.this.getMap().mapIterator(); + return AbstractBidiMapTest.this.getMap().mapIterator(); } @Override public BidiMap getMap() { // assumes makeFullMapIterator() called first - return AbstractTestBidiMap.this.getMap(); + return AbstractBidiMapTest.this.getMap(); } @Override public Map getConfirmedMap() { // assumes makeFullMapIterator() called first - return AbstractTestBidiMap.this.getConfirmed(); + return AbstractBidiMapTest.this.getConfirmed(); } @Override public void verify() { super.verify(); - AbstractTestBidiMap.this.verify(); + AbstractBidiMapTest.this.verify(); } } @@ -586,7 +583,7 @@ public abstract class AbstractTestBidiMap extends AbstractTestIterableMap< return; // simplest way of dealing with tricky situation } confirmed.put(key2, newValue1); - AbstractTestBidiMap.this.getConfirmed().remove(key1); + AbstractBidiMapTest.this.getConfirmed().remove(key1); assertEquals(newValue1, it.getValue()); assertEquals(true, bidi.containsKey(it.getKey())); assertEquals(true, bidi.containsValue(newValue1)); diff --git a/src/test/java/org/apache/commons/collections/bidimap/TestAbstractOrderedBidiMapDecorator.java b/src/test/java/org/apache/commons/collections/bidimap/AbstractOrderedBidiMapDecoratorTest.java similarity index 92% rename from src/test/java/org/apache/commons/collections/bidimap/TestAbstractOrderedBidiMapDecorator.java rename to src/test/java/org/apache/commons/collections/bidimap/AbstractOrderedBidiMapDecoratorTest.java index 10079ec6d..4ec6a504b 100644 --- a/src/test/java/org/apache/commons/collections/bidimap/TestAbstractOrderedBidiMapDecorator.java +++ b/src/test/java/org/apache/commons/collections/bidimap/AbstractOrderedBidiMapDecoratorTest.java @@ -24,12 +24,12 @@ import org.apache.commons.collections.OrderedBidiMap; /** * Test class for AbstractOrderedBidiMapDecorator. * - * @version $Revision$ + * @version $Id$ */ -public class TestAbstractOrderedBidiMapDecorator - extends AbstractTestOrderedBidiMap { +public class AbstractOrderedBidiMapDecoratorTest + extends AbstractOrderedBidiMapTest { - public TestAbstractOrderedBidiMapDecorator(String testName) { + public AbstractOrderedBidiMapDecoratorTest(String testName) { super(testName); } diff --git a/src/test/java/org/apache/commons/collections/bidimap/AbstractTestOrderedBidiMap.java b/src/test/java/org/apache/commons/collections/bidimap/AbstractOrderedBidiMapTest.java similarity index 88% rename from src/test/java/org/apache/commons/collections/bidimap/AbstractTestOrderedBidiMap.java rename to src/test/java/org/apache/commons/collections/bidimap/AbstractOrderedBidiMapTest.java index e03b65f38..a9206ef74 100644 --- a/src/test/java/org/apache/commons/collections/bidimap/AbstractTestOrderedBidiMap.java +++ b/src/test/java/org/apache/commons/collections/bidimap/AbstractOrderedBidiMapTest.java @@ -31,18 +31,15 @@ import org.apache.commons.collections.iterators.AbstractTestMapIterator; /** * Abstract test class for {@link OrderedBidiMap} methods and contracts. * - * @version $Revision$ - * - * @author Matthew Hawthorne - * @author Stephen Colebourne + * @version $Id$ */ -public abstract class AbstractTestOrderedBidiMap extends AbstractTestBidiMap { +public abstract class AbstractOrderedBidiMapTest extends AbstractBidiMapTest { - public AbstractTestOrderedBidiMap(String testName) { + public AbstractOrderedBidiMapTest(String testName) { super(testName); } - public AbstractTestOrderedBidiMap() { + public AbstractOrderedBidiMapTest() { super(); } @@ -167,47 +164,47 @@ public abstract class AbstractTestOrderedBidiMap extends AbstractTestBidiM @Override public V[] addSetValues() { - return AbstractTestOrderedBidiMap.this.getNewSampleValues(); + return AbstractOrderedBidiMapTest.this.getNewSampleValues(); } @Override public boolean supportsRemove() { - return AbstractTestOrderedBidiMap.this.isRemoveSupported(); + return AbstractOrderedBidiMapTest.this.isRemoveSupported(); } @Override public boolean supportsSetValue() { - return AbstractTestOrderedBidiMap.this.isSetValueSupported(); + return AbstractOrderedBidiMapTest.this.isSetValueSupported(); } @Override public MapIterator makeEmptyIterator() { resetEmpty(); - return AbstractTestOrderedBidiMap.this.getMap().mapIterator(); + return AbstractOrderedBidiMapTest.this.getMap().mapIterator(); } @Override public MapIterator makeObject() { resetFull(); - return AbstractTestOrderedBidiMap.this.getMap().mapIterator(); + return AbstractOrderedBidiMapTest.this.getMap().mapIterator(); } @Override public Map getMap() { // assumes makeFullMapIterator() called first - return AbstractTestOrderedBidiMap.this.map; + return AbstractOrderedBidiMapTest.this.map; } @Override public Map getConfirmedMap() { // assumes makeFullMapIterator() called first - return AbstractTestOrderedBidiMap.this.confirmed; + return AbstractOrderedBidiMapTest.this.confirmed; } @Override public void verify() { super.verify(); - AbstractTestOrderedBidiMap.this.verify(); + AbstractOrderedBidiMapTest.this.verify(); } } diff --git a/src/test/java/org/apache/commons/collections/bidimap/AbstractTestSortedBidiMap.java b/src/test/java/org/apache/commons/collections/bidimap/AbstractSortedBidiMapTest.java similarity index 98% rename from src/test/java/org/apache/commons/collections/bidimap/AbstractTestSortedBidiMap.java rename to src/test/java/org/apache/commons/collections/bidimap/AbstractSortedBidiMapTest.java index 5c93cd49a..e895b9008 100644 --- a/src/test/java/org/apache/commons/collections/bidimap/AbstractTestSortedBidiMap.java +++ b/src/test/java/org/apache/commons/collections/bidimap/AbstractSortedBidiMapTest.java @@ -34,18 +34,15 @@ import org.apache.commons.collections.map.AbstractTestSortedMap; /** * Abstract test class for {@link SortedBidiMap} methods and contracts. * - * @version $Revision$ - * - * @author Matthew Hawthorne - * @author Stephen Colebourne + * @version $Id$ */ -public abstract class AbstractTestSortedBidiMap, V extends Comparable> extends AbstractTestOrderedBidiMap { +public abstract class AbstractSortedBidiMapTest, V extends Comparable> extends AbstractOrderedBidiMapTest { protected List sortedKeys; protected List sortedValues = new ArrayList(); protected SortedSet sortedNewValues = new TreeSet(); - public AbstractTestSortedBidiMap(String testName) { + public AbstractSortedBidiMapTest(String testName) { super(testName); sortedKeys = getAsList(getSampleKeys()); Collections.sort(sortedKeys); diff --git a/src/test/java/org/apache/commons/collections/bidimap/TestDualHashBidiMap.java b/src/test/java/org/apache/commons/collections/bidimap/DualHashBidiMapTest.java similarity index 83% rename from src/test/java/org/apache/commons/collections/bidimap/TestDualHashBidiMap.java rename to src/test/java/org/apache/commons/collections/bidimap/DualHashBidiMapTest.java index ac9b585b2..e761e91e0 100644 --- a/src/test/java/org/apache/commons/collections/bidimap/TestDualHashBidiMap.java +++ b/src/test/java/org/apache/commons/collections/bidimap/DualHashBidiMapTest.java @@ -22,18 +22,15 @@ import org.apache.commons.collections.BulkTest; /** * JUnit tests. * - * @version $Revision$ - * - * @author Matthew Hawthorne - * @author Stephen Colebourne + * @version $Id$ */ -public class TestDualHashBidiMap extends AbstractTestBidiMap { +public class DualHashBidiMapTest extends AbstractBidiMapTest { public static Test suite() { - return BulkTest.makeSuite(TestDualHashBidiMap.class); + return BulkTest.makeSuite(DualHashBidiMapTest.class); } - public TestDualHashBidiMap(String testName) { + public DualHashBidiMapTest(String testName) { super(testName); } @@ -50,7 +47,7 @@ public class TestDualHashBidiMap extends AbstractTestBidiMap { */ @Override public String[] ignoredTests() { - return new String[] { "TestDualHashBidiMap.bulkTestInverseMap.bulkTestInverseMap" }; + return new String[] { "DualHashBidiMapTest.bulkTestInverseMap.bulkTestInverseMap" }; } // public void testCreate() throws Exception { diff --git a/src/test/java/org/apache/commons/collections/bidimap/TestDualTreeBidiMap2.java b/src/test/java/org/apache/commons/collections/bidimap/DualTreeBidiMap2Test.java similarity index 93% rename from src/test/java/org/apache/commons/collections/bidimap/TestDualTreeBidiMap2.java rename to src/test/java/org/apache/commons/collections/bidimap/DualTreeBidiMap2Test.java index b7b2fafc3..cdae043ef 100644 --- a/src/test/java/org/apache/commons/collections/bidimap/TestDualTreeBidiMap2.java +++ b/src/test/java/org/apache/commons/collections/bidimap/DualTreeBidiMap2Test.java @@ -36,20 +36,16 @@ import org.apache.commons.collections.comparators.ReverseComparator; /** * JUnit tests. * - * @version $Revision$ - * - * @author Matthew Hawthorne - * @author Stephen Colebourne - * @author Jonas Van Poucke + * @version $Id$ */ @SuppressWarnings("boxing") -public class TestDualTreeBidiMap2, V extends Comparable> extends AbstractTestSortedBidiMap { +public class DualTreeBidiMap2Test, V extends Comparable> extends AbstractSortedBidiMapTest { public static Test suite() { - return BulkTest.makeSuite(TestDualTreeBidiMap2.class); + return BulkTest.makeSuite(DualTreeBidiMap2Test.class); } - public TestDualTreeBidiMap2(String testName) { + public DualTreeBidiMap2Test(String testName) { super(testName); } @@ -156,7 +152,7 @@ public class TestDualTreeBidiMap2, V extends Comparable< */ @Override public String[] ignoredTests() { - return new String[] {"TestDualTreeBidiMap2.bulkTestInverseMap.bulkTestInverseMap"}; + return new String[] {"DualTreeBidiMap2Test.bulkTestInverseMap.bulkTestInverseMap"}; } // public void testCreate() throws Exception { diff --git a/src/test/java/org/apache/commons/collections/bidimap/TestDualTreeBidiMap.java b/src/test/java/org/apache/commons/collections/bidimap/DualTreeBidiMapTest.java similarity index 81% rename from src/test/java/org/apache/commons/collections/bidimap/TestDualTreeBidiMap.java rename to src/test/java/org/apache/commons/collections/bidimap/DualTreeBidiMapTest.java index 645a8a500..793bf80c9 100644 --- a/src/test/java/org/apache/commons/collections/bidimap/TestDualTreeBidiMap.java +++ b/src/test/java/org/apache/commons/collections/bidimap/DualTreeBidiMapTest.java @@ -22,18 +22,15 @@ import org.apache.commons.collections.BulkTest; /** * JUnit tests. * - * @version $Revision$ - * - * @author Matthew Hawthorne - * @author Stephen Colebourne + * @version $Id$ */ -public class TestDualTreeBidiMap, V extends Comparable> extends AbstractTestSortedBidiMap { +public class DualTreeBidiMapTest, V extends Comparable> extends AbstractSortedBidiMapTest { public static Test suite() { - return BulkTest.makeSuite(TestDualTreeBidiMap.class); + return BulkTest.makeSuite(DualTreeBidiMapTest.class); } - public TestDualTreeBidiMap(String testName) { + public DualTreeBidiMapTest(String testName) { super(testName); } @@ -50,7 +47,7 @@ public class TestDualTreeBidiMap, V extends Comparable, V extends Comparable> extends AbstractTestOrderedBidiMap { +public class TreeBidiMapTest, V extends Comparable> extends AbstractOrderedBidiMapTest { public static Test suite() { - return BulkTest.makeSuite(TestTreeBidiMap.class); + return BulkTest.makeSuite(TreeBidiMapTest.class); } - public TestTreeBidiMap(String testName) { + public TreeBidiMapTest(String testName) { super(testName); } @@ -54,7 +52,7 @@ public class TestTreeBidiMap, V extends Comparable> e */ @Override public String[] ignoredTests() { - return new String[] {"TestTreeBidiMap.bulkTestInverseMap.bulkTestInverseMap"}; + return new String[] {"TreeBidiMapTest.bulkTestInverseMap.bulkTestInverseMap"}; } @Override diff --git a/src/test/java/org/apache/commons/collections/bidimap/TestUnmodifiableBidiMap.java b/src/test/java/org/apache/commons/collections/bidimap/UnmodifiableBidiMapTest.java similarity index 86% rename from src/test/java/org/apache/commons/collections/bidimap/TestUnmodifiableBidiMap.java rename to src/test/java/org/apache/commons/collections/bidimap/UnmodifiableBidiMapTest.java index 6b9565730..79e0645b6 100644 --- a/src/test/java/org/apache/commons/collections/bidimap/TestUnmodifiableBidiMap.java +++ b/src/test/java/org/apache/commons/collections/bidimap/UnmodifiableBidiMapTest.java @@ -26,17 +26,15 @@ import org.apache.commons.collections.BulkTest; /** * JUnit tests. * - * @version $Revision$ - * - * @author Stephen Colebourne + * @version $Id$ */ -public class TestUnmodifiableBidiMap extends AbstractTestBidiMap { +public class UnmodifiableBidiMapTest extends AbstractBidiMapTest { public static Test suite() { - return BulkTest.makeSuite(TestUnmodifiableBidiMap.class); + return BulkTest.makeSuite(UnmodifiableBidiMapTest.class); } - public TestUnmodifiableBidiMap(String testName) { + public UnmodifiableBidiMapTest(String testName) { super(testName); } @@ -62,7 +60,7 @@ public class TestUnmodifiableBidiMap extends AbstractTestBidiMap { */ @Override public String[] ignoredTests() { - return new String[] {"TestUnmodifiableBidiMap.bulkTestInverseMap.bulkTestInverseMap"}; + return new String[] {"UnmodifiableBidiMapTest.bulkTestInverseMap.bulkTestInverseMap"}; } @Override diff --git a/src/test/java/org/apache/commons/collections/bidimap/TestUnmodifiableOrderedBidiMap.java b/src/test/java/org/apache/commons/collections/bidimap/UnmodifiableOrderedBidiMapTest.java similarity index 85% rename from src/test/java/org/apache/commons/collections/bidimap/TestUnmodifiableOrderedBidiMap.java rename to src/test/java/org/apache/commons/collections/bidimap/UnmodifiableOrderedBidiMapTest.java index 8a073aa4a..0abf78b23 100644 --- a/src/test/java/org/apache/commons/collections/bidimap/TestUnmodifiableOrderedBidiMap.java +++ b/src/test/java/org/apache/commons/collections/bidimap/UnmodifiableOrderedBidiMapTest.java @@ -27,17 +27,15 @@ import org.apache.commons.collections.OrderedBidiMap; /** * JUnit tests. * - * @version $Revision$ - * - * @author Stephen Colebourne + * @version $Id$ */ -public class TestUnmodifiableOrderedBidiMap, V extends Comparable> extends AbstractTestOrderedBidiMap { +public class UnmodifiableOrderedBidiMapTest, V extends Comparable> extends AbstractOrderedBidiMapTest { public static Test suite() { - return BulkTest.makeSuite(TestUnmodifiableOrderedBidiMap.class); + return BulkTest.makeSuite(UnmodifiableOrderedBidiMapTest.class); } - public TestUnmodifiableOrderedBidiMap(String testName) { + public UnmodifiableOrderedBidiMapTest(String testName) { super(testName); } @@ -63,7 +61,7 @@ public class TestUnmodifiableOrderedBidiMap, V extends C */ @Override public String[] ignoredTests() { - return new String[] {"TestUnmodifiableOrderedBidiMap.bulkTestInverseMap.bulkTestInverseMap"}; + return new String[] {"UnmodifiableOrderedBidiMapTest.bulkTestInverseMap.bulkTestInverseMap"}; } @Override diff --git a/src/test/java/org/apache/commons/collections/bidimap/TestUnmodifiableSortedBidiMap.java b/src/test/java/org/apache/commons/collections/bidimap/UnmodifiableSortedBidiMapTest.java similarity index 87% rename from src/test/java/org/apache/commons/collections/bidimap/TestUnmodifiableSortedBidiMap.java rename to src/test/java/org/apache/commons/collections/bidimap/UnmodifiableSortedBidiMapTest.java index 361edd3e8..ac7fb71ef 100644 --- a/src/test/java/org/apache/commons/collections/bidimap/TestUnmodifiableSortedBidiMap.java +++ b/src/test/java/org/apache/commons/collections/bidimap/UnmodifiableSortedBidiMapTest.java @@ -26,17 +26,15 @@ import org.apache.commons.collections.SortedBidiMap; /** * JUnit tests. * - * @version $Revision$ - * - * @author Stephen Colebourne + * @version $Id$ */ -public class TestUnmodifiableSortedBidiMap, V extends Comparable> extends AbstractTestSortedBidiMap { +public class UnmodifiableSortedBidiMapTest, V extends Comparable> extends AbstractSortedBidiMapTest { public static Test suite() { - return BulkTest.makeSuite(TestUnmodifiableSortedBidiMap.class); + return BulkTest.makeSuite(UnmodifiableSortedBidiMapTest.class); } - public TestUnmodifiableSortedBidiMap(String testName) { + public UnmodifiableSortedBidiMapTest(String testName) { super(testName); } @@ -67,7 +65,7 @@ public class TestUnmodifiableSortedBidiMap, V extends Co @Override public String[] ignoredTests() { // Override to prevent infinite recursion of tests. - return new String[] {"TestUnmodifiableSortedBidiMap.bulkTestInverseMap.bulkTestInverseMap"}; + return new String[] {"UnmodifiableSortedBidiMapTest.bulkTestInverseMap.bulkTestInverseMap"}; } //----------------------------------------------------------------------- diff --git a/src/test/java/org/apache/commons/collections/splitmap/TestTransformedMap.java b/src/test/java/org/apache/commons/collections/splitmap/TransformedMapTest.java similarity index 97% rename from src/test/java/org/apache/commons/collections/splitmap/TestTransformedMap.java rename to src/test/java/org/apache/commons/collections/splitmap/TransformedMapTest.java index 3053515ed..3197dc1b0 100644 --- a/src/test/java/org/apache/commons/collections/splitmap/TestTransformedMap.java +++ b/src/test/java/org/apache/commons/collections/splitmap/TransformedMapTest.java @@ -28,15 +28,13 @@ import org.apache.commons.collections.functors.NOPTransformer; /** * Tests for {@link TransformedMap} * - * @since Commons Collections 5 * TODO fix version, add Serialization tests - * @version $Revision$ * - * @author Stephen Colebourne - * @author Matt Benson + * @since 4.0 + * @version $Id$ */ @SuppressWarnings("boxing") -public class TestTransformedMap extends BulkTest { +public class TransformedMapTest extends BulkTest { private Transformer intToString = new Transformer() { public String transform(Integer input) { @@ -56,7 +54,7 @@ public class TestTransformedMap extends BulkTest { } }; - public TestTransformedMap(String testName) { + public TransformedMapTest(String testName) { super(testName); }