Skip to content

Commit

Permalink
[COLLECTIONS-777] Migrate to JUnit 5
Browse files Browse the repository at this point in the history
Remove unused method
  • Loading branch information
garydgregory committed Nov 11, 2024
1 parent 474de2b commit 9e7f5ac
Show file tree
Hide file tree
Showing 14 changed files with 0 additions and 163 deletions.
37 changes: 0 additions & 37 deletions src/test/java/org/apache/commons/collections4/BulkTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -66,43 +66,6 @@ public String getName() {
return name;
}

/**
* Returns an array of test names to ignore.<P>
*
* If a test that's defined by this {@code BulkTest} or
* by one of its bulk test methods has a name that's in the returned
* array, then that simple test will not be executed.<P>
*
* A test's name is formed by taking the class name of the
* root {@code BulkTest}, eliminating the package name, then
* appending the names of any bulk test methods that were invoked
* to get to the simple test, and then appending the simple test
* method name. The method names are delimited by periods:
*
* <pre>
* HashMapTest.bulkTestEntrySet.testClear
* </pre>
*
* is the name of one of the simple tests defined in the sample classes
* described above. If the sample {@code HashMapTest} class
* included this method:
*
* <pre>
* public String[] ignoredTests() {
* return new String[] { "HashMapTest.bulkTestEntrySet.testClear" };
* }
* </pre>
*
* then the entry set's clear method wouldn't be tested, but the key
* set's clear method would.
*
* @return an array of the names of tests to ignore, or null if
* no tests should be ignored
*/
public String[] ignoredTests() {
return null;
}

/**
* Returns the display name of this {@code BulkTest}.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,6 @@ protected int getIterationBehaviour() {
return AbstractCollectionTest.UNORDERED;
}

/**
* Override to prevent infinite recursion of tests.
*/
@Override
public String[] ignoredTests() {
return new String[] { "DualHashBidiMapTest.bulkTestInverseMap.bulkTestInverseMap" };
}

/**
* {@inheritDoc}
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,6 @@ public String getCompatibilityVersion() {
return "4";
}

/**
* Override to prevent infinite recursion of tests.
*/
@Override
public String[] ignoredTests() {
return new String[] { "DualLinkedHashBidiMapTest.bulkTestInverseMap.bulkTestInverseMap" };
}

/**
* {@inheritDoc}
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,15 +60,6 @@ public String getCompatibilityVersion() {
return "4.Test2";
}

/**
* Override to prevent infinite recursion of tests.
*/
@Override
public String[] ignoredTests() {
final String recursiveTest = "DualTreeBidiMap2Test.bulkTestInverseMap.bulkTestInverseMap";
return new String[] { recursiveTest };
}

@Override
public boolean isAllowNullValueGet() {
// TODO Is this a bug or a feature?
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,6 @@ public DualTreeBidiMapTest() {
super();
}

/**
* Override to prevent infinite recursion of tests.
*/
@Override
public String[] ignoredTests() {
final String recursiveTest = "DualTreeBidiMapTest.bulkTestInverseMap.bulkTestInverseMap";
return new String[] { recursiveTest };
}

/**
* {@inheritDoc}
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,6 @@ public String getCompatibilityVersion() {
return "4";
}

/**
* Override to prevent infinite recursion of tests.
*/
@Override
public String[] ignoredTests() {
return new String[] {"TreeBidiMapTest.bulkTestInverseMap.bulkTestInverseMap"};
}

@Override
public boolean isAllowNullKey() {
return false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,6 @@ protected int getIterationBehaviour() {
return AbstractCollectionTest.UNORDERED;
}

/**
* Override to prevent infinite recursion of tests.
*/
@Override
public String[] ignoredTests() {
return new String[] {"UnmodifiableBidiMapTest.bulkTestInverseMap.bulkTestInverseMap"};
}

@Override
public boolean isPutAddSupported() {
return false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,6 @@
*/
public class UnmodifiableOrderedBidiMapTest<K extends Comparable<K>, V extends Comparable<V>> extends AbstractOrderedBidiMapTest<K, V> {

/**
* Override to prevent infinite recursion of tests.
*/
@Override
public String[] ignoredTests() {
return new String[] {"UnmodifiableOrderedBidiMapTest.bulkTestInverseMap.bulkTestInverseMap"};
}

@Override
public boolean isAllowNullKey() {
return false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,6 @@ public UnmodifiableSortedBidiMapTest() {
super();
}

@Override
public String[] ignoredTests() {
// Override to prevent infinite recursion of tests.
return new String[] {"UnmodifiableSortedBidiMapTest.bulkTestInverseMap.bulkTestInverseMap"};
}

@Override
public boolean isAllowNullKey() {
return false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
import static org.junit.jupiter.api.Assertions.assertThrows;
import static org.junit.jupiter.api.Assertions.assertTrue;

import java.util.ArrayList;
import java.util.ConcurrentModificationException;
import java.util.HashSet;
import java.util.Iterator;
Expand All @@ -50,33 +49,6 @@ public String getCompatibilityVersion() {
return "4";
}

/**
* Ignore the serialization tests for sublists and sub-sublists.
*
* @return an array of sublist serialization test names
*/
@Override
public String[] ignoredTests() {
final ArrayList<String> list = new ArrayList<>();
final String prefix = "CursorableLinkedListTest";
final String bulk = ".bulkTestSubList";
final String[] ignored = {
".testEmptyListSerialization",
".testFullListSerialization",
".testEmptyListCompatibility",
".testFullListCompatibility",
".testSimpleSerialization",
".testCanonicalEmptyCollectionExists",
".testCanonicalFullCollectionExists",
".testSerializeDeserializeThenCompare"
};
for (final String element : ignored) {
list.add(prefix + bulk + element);
list.add(prefix + bulk + bulk + element);
}
return list.toArray(ArrayUtils.EMPTY_STRING_ARRAY);
}

@Override
public CursorableLinkedList<E> makeObject() {
return new CursorableLinkedList<>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,16 +62,6 @@ public V[] getSampleValues() {
return (V[]) new Object[] { TWO };
}

@Override
public String[] ignoredTests() {
// the ridiculous map above still doesn't pass these tests
// but it's not relevant, so we ignore them
return new String[] {
"SingletonMapTest.bulkTestMapIterator.testEmptyMapIterator",
"SingletonMapTest.bulkTestOrderedMapIterator.testEmptyMapIterator",
};
}

@Override
public boolean isPutAddSupported() {
return false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,17 +32,6 @@
*/
public class StaticBucketMapTest<K, V> extends AbstractIterableMapTest<K, V> {

@Override
public String[] ignoredTests() {
final String pre = "StaticBucketMapTest.bulkTestMap";
final String post = ".testCollectionIteratorFailFast";
return new String[] {
pre + "EntrySet" + post,
pre + "KeySet" + post,
pre + "Values" + post
};
}

/**
* {@inheritDoc}
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,6 @@ public String getCompatibilityVersion() {
return "4";
}

@Override
public String[] ignoredTests() {
return null;
}

@Override
public boolean isSubMapViewsSerializable() {
// TreeMap sub map views have a bug in deserialization.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,6 @@ public String getCompatibilityVersion() {
return "4";
}

/**
* Override to prevent infinite recursion of tests.
*/
@Override
public String[] ignoredTests() {
return null;
}

@Override
public boolean isPutAddSupported() {
return false;
Expand Down

0 comments on commit 9e7f5ac

Please sign in to comment.