diff --git a/src/test/java/org/apache/commons/collections4/BulkTest.java b/src/test/java/org/apache/commons/collections4/BulkTest.java index 2da8a0725..5b7d86de1 100644 --- a/src/test/java/org/apache/commons/collections4/BulkTest.java +++ b/src/test/java/org/apache/commons/collections4/BulkTest.java @@ -44,11 +44,11 @@ import junit.framework.TestSuite; * For instance, consider the following two classes: * *
- * public class TestSet extends BulkTest { + * public class SetTest extends BulkTest { * * private Set set; * - * public TestSet(Set set) { + * public SetTest(Set set) { * this.set = set; * } * @@ -64,7 +64,7 @@ import junit.framework.TestSuite; * } * * - * public class TestHashMap extends BulkTest { + * public class HashMapTest extends BulkTest { * * private Map makeFullMap() { * HashMap result = new HashMap(); @@ -89,25 +89,25 @@ import junit.framework.TestSuite; * } ** - * In the above examples,
TestSet
defines two
- * simple test methods and no bulk test methods; TestHashMap
+ * In the above examples, SetTest
defines two
+ * simple test methods and no bulk test methods; HashMapTest
* defines one simple test method and two bulk test methods. When
- * makeSuite(TestHashMap.class).run
is executed,
+ * makeSuite(HashMapTest.class).run
is executed,
* five simple test methods will be run, in this order:* *
* *
- * TestHashMap.bulkTestEntrySet.testClear + * HashMapTest.bulkTestEntrySet.testClear ** * is the name of one of the simple tests defined in the sample classes - * described above. If the sample
TestHashMap
class
+ * described above. If the sample HashMapTest
class
* included this method:
*
* * public String[] ignoredTests() { - * return new String[] { "TestHashMap.bulkTestEntrySet.testClear" }; + * return new String[] { "HashMapTest.bulkTestEntrySet.testClear" }; * } ** @@ -241,7 +241,7 @@ public class BulkTest extends TestCase implements Cloneable { * * The class is examined for simple and bulk test methods; any child * bulk tests are also examined recursively; and the results are stored - * in a hierarchal {@link TestSuite}.
+ * in a hierarchical {@link TestSuite}.
*
* The given class must be a subclass of BulkTest
and must
* not be abstract.
@@ -278,24 +278,24 @@ class BulkTestSuiteMaker { private TestSuite result; /** - * The prefix for simple test methods. Used to check if a test is in - * the ignored list. + * The prefix for simple test methods. Used to check if a test is in + * the ignored list. */ private String prefix; /** - * Constructor. + * Constructor. * - * @param startingClass the starting class + * @param startingClass the starting class */ public BulkTestSuiteMaker(final Class extends BulkTest> startingClass) { this.startingClass = startingClass; } /** - * Makes a hierarchical TestSuite based on the starting class. + * Makes a hierarchical TestSuite based on the starting class. * - * @return the hierarchical TestSuite for startingClass + * @return the hierarchical TestSuite for startingClass */ public TestSuite make() { this.result = new TestSuite(); @@ -313,10 +313,10 @@ class BulkTestSuiteMaker { } /** - * Appends all the simple tests and bulk tests defined by the given - * instance's class to the current TestSuite. + * Appends all the simple tests and bulk tests defined by the given + * instance's class to the current TestSuite. * - * @param bulk An instance of the class that defines simple and bulk + * @param bulk An instance of the class that defines simple and bulk * tests for us to append */ void make(final BulkTest bulk) { @@ -333,12 +333,12 @@ class BulkTestSuiteMaker { } /** - * Adds the simple test defined by the given method to the TestSuite. + * Adds the simple test defined by the given method to the TestSuite. * - * @param bulk The instance of the class that defined the method + * @param bulk The instance of the class that defined the method * (I know it's weird. But the point is, we can clone the instance * and not have to worry about constructors.) - * @param m The simple test method + * @param m The simple test method */ void addTest(final BulkTest bulk, final Method m) { final BulkTest bulk2 = (BulkTest)bulk.clone(); @@ -351,13 +351,13 @@ class BulkTestSuiteMaker { } /** - * Adds a whole new suite of tests that are defined by the result of - * the given bulk test method. In other words, the given bulk test - * method is invoked, and the resulting BulkTest instance is examined - * for yet more simple and bulk tests. + * Adds a whole new suite of tests that are defined by the result of + * the given bulk test method. In other words, the given bulk test + * method is invoked, and the resulting BulkTest instance is examined + * for yet more simple and bulk tests. * - * @param bulk The instance of the class that defined the method - * @param m The bulk test method + * @param bulk The instance of the class that defined the method + * @param m The bulk test method */ void addBulk(final BulkTest bulk, final Method m) { final String verboseName = prefix + "." + m.getName(); @@ -397,10 +397,10 @@ class BulkTestSuiteMaker { } /** - * Returns the base name of the given class. + * Returns the base name of the given class. * - * @param c the class - * @return the name of that class, minus any package names + * @param c the class + * @return the name of that class, minus any package names */ private static String getBaseName(final Class> c) { String name = c.getName(); @@ -419,8 +419,7 @@ class BulkTestSuiteMaker { try { return c.getConstructor(new Class[] { String.class }); } catch (final NoSuchMethodException e) { - throw new IllegalArgumentException(c + " must provide " + - "a (String) constructor"); + throw new IllegalArgumentException(c + " must provide a (String) constructor"); } } @@ -445,12 +444,11 @@ class BulkTestSuiteMaker { return makeTestCase(c, element); } } - throw new IllegalArgumentException(c.getName() + " must provide " - + " at least one test method."); + throw new IllegalArgumentException(c.getName() + " must provide at least one test method."); } /** - * Returns true if the given method is a simple test method. + * Returns true if the given method is a simple test method. */ private static boolean isTest(final Method m) { if (!m.getName().startsWith("test")) { @@ -473,7 +471,7 @@ class BulkTestSuiteMaker { } /** - * Returns true if the given method is a bulk test method. + * Returns true if the given method is a bulk test method. */ private static boolean isBulk(final Method m) { if (!m.getName().startsWith("bulkTest")) {