From c39fd281b7319fd1dc54959f13991605e491eb3c Mon Sep 17 00:00:00 2001 From: Thomas Neidhart Date: Fri, 17 Aug 2012 19:11:35 +0000 Subject: [PATCH] Renamed unit tests for functors package. git-svn-id: https://svn.apache.org/repos/asf/commons/proper/collections/trunk@1374400 13f79535-47bb-0310-9956-ffa450edef68 --- .../apache/commons/collections/TestPredicateUtils.java | 4 ++-- ...dicate.java => AbstractAnyAllOnePredicateTest.java} | 10 ++++------ ...icClosureTestBase.java => AbstractClosureTest.java} | 2 +- ...dicate.java => AbstractCompositePredicateTest.java} | 10 ++++------ ...ateTestBase.java => AbstractMockPredicateTest.java} | 10 ++++------ ...edicateTestBase.java => AbstractPredicateTest.java} | 2 +- .../{TestAllPredicate.java => AllPredicateTest.java} | 10 ++++------ ...rowClosure.java => CatchAndRethrowClosureTest.java} | 2 +- ...atorPredicate.java => ComparatorPredicateTest.java} | 2 +- ...TestEqualPredicate.java => EqualPredicateTest.java} | 2 +- .../{TestNullPredicate.java => NullPredicateTest.java} | 2 +- 11 files changed, 24 insertions(+), 32 deletions(-) rename src/test/java/org/apache/commons/collections/functors/{AbstractTestAnyAllOnePredicate.java => AbstractAnyAllOnePredicateTest.java} (91%) rename src/test/java/org/apache/commons/collections/functors/{BasicClosureTestBase.java => AbstractClosureTest.java} (96%) rename src/test/java/org/apache/commons/collections/functors/{AbstractTestCompositePredicate.java => AbstractCompositePredicateTest.java} (95%) rename src/test/java/org/apache/commons/collections/functors/{MockPredicateTestBase.java => AbstractMockPredicateTest.java} (94%) rename src/test/java/org/apache/commons/collections/functors/{BasicPredicateTestBase.java => AbstractPredicateTest.java} (97%) rename src/test/java/org/apache/commons/collections/functors/{TestAllPredicate.java => AllPredicateTest.java} (95%) rename src/test/java/org/apache/commons/collections/functors/{TestCatchAndRethrowClosure.java => CatchAndRethrowClosureTest.java} (97%) rename src/test/java/org/apache/commons/collections/functors/{TestComparatorPredicate.java => ComparatorPredicateTest.java} (97%) rename src/test/java/org/apache/commons/collections/functors/{TestEqualPredicate.java => EqualPredicateTest.java} (97%) rename src/test/java/org/apache/commons/collections/functors/{TestNullPredicate.java => NullPredicateTest.java} (96%) diff --git a/src/test/java/org/apache/commons/collections/TestPredicateUtils.java b/src/test/java/org/apache/commons/collections/TestPredicateUtils.java index 0ecfe1a25..35b422307 100644 --- a/src/test/java/org/apache/commons/collections/TestPredicateUtils.java +++ b/src/test/java/org/apache/commons/collections/TestPredicateUtils.java @@ -31,7 +31,7 @@ import java.util.List; import java.util.Map; import org.apache.commons.collections.functors.AllPredicate; -import org.apache.commons.collections.functors.BasicPredicateTestBase; +import org.apache.commons.collections.functors.AbstractPredicateTest; import org.apache.commons.collections.functors.EqualPredicate; import org.apache.commons.collections.functors.ExceptionPredicate; import org.apache.commons.collections.functors.FalsePredicate; @@ -50,7 +50,7 @@ import org.junit.Test; * @author Matt Benson */ @SuppressWarnings("boxing") -public class TestPredicateUtils extends BasicPredicateTestBase { +public class TestPredicateUtils extends AbstractPredicateTest { /** * Set up instance variables required by this test case. */ diff --git a/src/test/java/org/apache/commons/collections/functors/AbstractTestAnyAllOnePredicate.java b/src/test/java/org/apache/commons/collections/functors/AbstractAnyAllOnePredicateTest.java similarity index 91% rename from src/test/java/org/apache/commons/collections/functors/AbstractTestAnyAllOnePredicate.java rename to src/test/java/org/apache/commons/collections/functors/AbstractAnyAllOnePredicateTest.java index b6476cb4f..a98b8504f 100644 --- a/src/test/java/org/apache/commons/collections/functors/AbstractTestAnyAllOnePredicate.java +++ b/src/test/java/org/apache/commons/collections/functors/AbstractAnyAllOnePredicateTest.java @@ -27,19 +27,17 @@ import java.util.Collections; /** * Base class for tests of AnyPredicate, AllPredicate, and OnePredicate. * - * @since Commons Collections 3.0 - * @version $Revision$ - * - * @author Edwin Tellman + * @since 3.0 + * @version $Id$ */ -public abstract class AbstractTestAnyAllOnePredicate extends AbstractTestCompositePredicate { +public abstract class AbstractAnyAllOnePredicateTest extends AbstractCompositePredicateTest { /** * Creates a new TestCompositePredicate. * * @param testValue the value which the mock predicates should expect to see (may be null). */ - protected AbstractTestAnyAllOnePredicate(final T testValue) { + protected AbstractAnyAllOnePredicateTest(final T testValue) { super(testValue); } diff --git a/src/test/java/org/apache/commons/collections/functors/BasicClosureTestBase.java b/src/test/java/org/apache/commons/collections/functors/AbstractClosureTest.java similarity index 96% rename from src/test/java/org/apache/commons/collections/functors/BasicClosureTestBase.java rename to src/test/java/org/apache/commons/collections/functors/AbstractClosureTest.java index 1138c2c41..84383e83a 100644 --- a/src/test/java/org/apache/commons/collections/functors/BasicClosureTestBase.java +++ b/src/test/java/org/apache/commons/collections/functors/AbstractClosureTest.java @@ -20,7 +20,7 @@ import org.apache.commons.collections.Closure; import org.junit.Assert; import org.junit.Test; -public abstract class BasicClosureTestBase { +public abstract class AbstractClosureTest { @Test public void closureSanityTests() throws Exception { diff --git a/src/test/java/org/apache/commons/collections/functors/AbstractTestCompositePredicate.java b/src/test/java/org/apache/commons/collections/functors/AbstractCompositePredicateTest.java similarity index 95% rename from src/test/java/org/apache/commons/collections/functors/AbstractTestCompositePredicate.java rename to src/test/java/org/apache/commons/collections/functors/AbstractCompositePredicateTest.java index b44501d69..bf720a147 100644 --- a/src/test/java/org/apache/commons/collections/functors/AbstractTestCompositePredicate.java +++ b/src/test/java/org/apache/commons/collections/functors/AbstractCompositePredicateTest.java @@ -29,19 +29,17 @@ import java.util.List; /** * Base class for tests of composite predicates. * - * @since Commons Collections 3.0 - * @version $Revision$ - * - * @author Edwin Tellman + * @since 3.0 + * @version $Id$ */ -public abstract class AbstractTestCompositePredicate extends MockPredicateTestBase { +public abstract class AbstractCompositePredicateTest extends AbstractMockPredicateTest { /** * Creates a new TestCompositePredicate. * * @param testValue the value which the mock predicates should expect to see (may be null). */ - protected AbstractTestCompositePredicate(final T testValue) { + protected AbstractCompositePredicateTest(final T testValue) { super(testValue); } diff --git a/src/test/java/org/apache/commons/collections/functors/MockPredicateTestBase.java b/src/test/java/org/apache/commons/collections/functors/AbstractMockPredicateTest.java similarity index 94% rename from src/test/java/org/apache/commons/collections/functors/MockPredicateTestBase.java rename to src/test/java/org/apache/commons/collections/functors/AbstractMockPredicateTest.java index 4fbe3553d..d9a077f54 100644 --- a/src/test/java/org/apache/commons/collections/functors/MockPredicateTestBase.java +++ b/src/test/java/org/apache/commons/collections/functors/AbstractMockPredicateTest.java @@ -30,12 +30,10 @@ import java.util.List; * Base class for tests of predicates which delegate to other predicates when evaluating an object. This class * provides methods to create and verify mock predicates to which to delegate. * - * @since Commons Collections 3.0 - * @version $Revision$ - * - * @author Edwin Tellman + * @since 3.0 + * @version $Id$ */ -public abstract class MockPredicateTestBase { +public abstract class AbstractMockPredicateTest { /** * Mock predicates created by a single test case which need to be verified after the test completes. */ @@ -51,7 +49,7 @@ public abstract class MockPredicateTestBase { * * @param testValue the value to pass to mock predicates. */ - protected MockPredicateTestBase(final T testValue) { + protected AbstractMockPredicateTest(final T testValue) { this.testValue = testValue; } diff --git a/src/test/java/org/apache/commons/collections/functors/BasicPredicateTestBase.java b/src/test/java/org/apache/commons/collections/functors/AbstractPredicateTest.java similarity index 97% rename from src/test/java/org/apache/commons/collections/functors/BasicPredicateTestBase.java rename to src/test/java/org/apache/commons/collections/functors/AbstractPredicateTest.java index cfcbe644a..564c8c964 100644 --- a/src/test/java/org/apache/commons/collections/functors/BasicPredicateTestBase.java +++ b/src/test/java/org/apache/commons/collections/functors/AbstractPredicateTest.java @@ -21,7 +21,7 @@ import org.junit.Assert; import org.junit.Before; import org.junit.Test; -public abstract class BasicPredicateTestBase { +public abstract class AbstractPredicateTest { protected Object cObject; protected String cString; protected Integer cInteger; diff --git a/src/test/java/org/apache/commons/collections/functors/TestAllPredicate.java b/src/test/java/org/apache/commons/collections/functors/AllPredicateTest.java similarity index 95% rename from src/test/java/org/apache/commons/collections/functors/TestAllPredicate.java rename to src/test/java/org/apache/commons/collections/functors/AllPredicateTest.java index 80a9e497e..3b2f3f5e4 100644 --- a/src/test/java/org/apache/commons/collections/functors/TestAllPredicate.java +++ b/src/test/java/org/apache/commons/collections/functors/AllPredicateTest.java @@ -13,18 +13,16 @@ import java.util.Collections; /** * Tests the org.apache.commons.collections.functors.AllPredicate class. * - * @since Commons Collections 3.0 - * @version $Revision$ - * - * @author Edwin Tellman + * @since 3.0 + * @version $Id$ */ @SuppressWarnings("boxing") -public class TestAllPredicate extends AbstractTestAnyAllOnePredicate { +public class AllPredicateTest extends AbstractAnyAllOnePredicateTest { /** * Creates a new TestAllPredicate. */ - public TestAllPredicate() { + public AllPredicateTest() { super(42); } diff --git a/src/test/java/org/apache/commons/collections/functors/TestCatchAndRethrowClosure.java b/src/test/java/org/apache/commons/collections/functors/CatchAndRethrowClosureTest.java similarity index 97% rename from src/test/java/org/apache/commons/collections/functors/TestCatchAndRethrowClosure.java rename to src/test/java/org/apache/commons/collections/functors/CatchAndRethrowClosureTest.java index a0d686f89..a4c6f57c7 100644 --- a/src/test/java/org/apache/commons/collections/functors/TestCatchAndRethrowClosure.java +++ b/src/test/java/org/apache/commons/collections/functors/CatchAndRethrowClosureTest.java @@ -23,7 +23,7 @@ import org.apache.commons.collections.FunctorException; import org.junit.Assert; import org.junit.Test; -public class TestCatchAndRethrowClosure extends BasicClosureTestBase { +public class CatchAndRethrowClosureTest extends AbstractClosureTest { private static Closure generateIOExceptionClosure() { return new CatchAndRethrowClosure() { diff --git a/src/test/java/org/apache/commons/collections/functors/TestComparatorPredicate.java b/src/test/java/org/apache/commons/collections/functors/ComparatorPredicateTest.java similarity index 97% rename from src/test/java/org/apache/commons/collections/functors/TestComparatorPredicate.java rename to src/test/java/org/apache/commons/collections/functors/ComparatorPredicateTest.java index e12511b7e..eda5a468a 100644 --- a/src/test/java/org/apache/commons/collections/functors/TestComparatorPredicate.java +++ b/src/test/java/org/apache/commons/collections/functors/ComparatorPredicateTest.java @@ -23,7 +23,7 @@ import org.apache.commons.collections.Predicate; import org.junit.Test; -public class TestComparatorPredicate extends BasicPredicateTestBase { +public class ComparatorPredicateTest extends AbstractPredicateTest { private class TestComparator> implements Comparator { public int compare(T first, T second) { return first.compareTo(second); diff --git a/src/test/java/org/apache/commons/collections/functors/TestEqualPredicate.java b/src/test/java/org/apache/commons/collections/functors/EqualPredicateTest.java similarity index 97% rename from src/test/java/org/apache/commons/collections/functors/TestEqualPredicate.java rename to src/test/java/org/apache/commons/collections/functors/EqualPredicateTest.java index 34ae592ff..9d529dc6a 100644 --- a/src/test/java/org/apache/commons/collections/functors/TestEqualPredicate.java +++ b/src/test/java/org/apache/commons/collections/functors/EqualPredicateTest.java @@ -24,7 +24,7 @@ import org.apache.commons.collections.Predicate; import org.junit.Test; -public class TestEqualPredicate extends BasicPredicateTestBase { +public class EqualPredicateTest extends AbstractPredicateTest { private static final EqualsTestObject FALSE_OBJECT = new EqualsTestObject(false); private static final EqualsTestObject TRUE_OBJECT = new EqualsTestObject(true); diff --git a/src/test/java/org/apache/commons/collections/functors/TestNullPredicate.java b/src/test/java/org/apache/commons/collections/functors/NullPredicateTest.java similarity index 96% rename from src/test/java/org/apache/commons/collections/functors/TestNullPredicate.java rename to src/test/java/org/apache/commons/collections/functors/NullPredicateTest.java index 2361360dd..41b44c2ef 100644 --- a/src/test/java/org/apache/commons/collections/functors/TestNullPredicate.java +++ b/src/test/java/org/apache/commons/collections/functors/NullPredicateTest.java @@ -23,7 +23,7 @@ import org.apache.commons.collections.Predicate; import org.junit.Test; -public class TestNullPredicate extends BasicPredicateTestBase { +public class NullPredicateTest extends AbstractPredicateTest { @Test public void testNullPredicate() { assertSame(NullPredicate.nullPredicate(), NullPredicate.nullPredicate());