[COLLECTIONS-777] Migrate to JUnit 5

Remove unused method
This commit is contained in:
Gary Gregory 2024-11-11 09:58:30 -05:00
parent 474de2bb1f
commit 9e7f5ac132
14 changed files with 0 additions and 163 deletions

View File

@ -66,43 +66,6 @@ public class BulkTest {
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}.
*

View File

@ -31,14 +31,6 @@ public class DualHashBidiMapTest<K, V> extends AbstractBidiMapTest<K, V> {
return AbstractCollectionTest.UNORDERED;
}
/**
* Override to prevent infinite recursion of tests.
*/
@Override
public String[] ignoredTests() {
return new String[] { "DualHashBidiMapTest.bulkTestInverseMap.bulkTestInverseMap" };
}
/**
* {@inheritDoc}
*/

View File

@ -29,14 +29,6 @@ public class DualLinkedHashBidiMapTest<K, V> extends AbstractBidiMapTest<K, V> {
return "4";
}
/**
* Override to prevent infinite recursion of tests.
*/
@Override
public String[] ignoredTests() {
return new String[] { "DualLinkedHashBidiMapTest.bulkTestInverseMap.bulkTestInverseMap" };
}
/**
* {@inheritDoc}
*/

View File

@ -60,15 +60,6 @@ public class DualTreeBidiMap2Test<K extends Comparable<K>, V extends Comparable<
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?

View File

@ -25,15 +25,6 @@ public class DualTreeBidiMapTest<K extends Comparable<K>, V extends Comparable<V
super();
}
/**
* Override to prevent infinite recursion of tests.
*/
@Override
public String[] ignoredTests() {
final String recursiveTest = "DualTreeBidiMapTest.bulkTestInverseMap.bulkTestInverseMap";
return new String[] { recursiveTest };
}
/**
* {@inheritDoc}
*/

View File

@ -30,14 +30,6 @@ public class TreeBidiMapTest<K extends Comparable<K>, V extends Comparable<V>> e
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;

View File

@ -41,14 +41,6 @@ public class UnmodifiableBidiMapTest<K, V> extends AbstractBidiMapTest<K, V> {
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;

View File

@ -32,14 +32,6 @@ import org.junit.jupiter.api.Test;
*/
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;

View File

@ -36,12 +36,6 @@ public class UnmodifiableSortedBidiMapTest<K extends Comparable<K>, V extends Co
super();
}
@Override
public String[] ignoredTests() {
// Override to prevent infinite recursion of tests.
return new String[] {"UnmodifiableSortedBidiMapTest.bulkTestInverseMap.bulkTestInverseMap"};
}
@Override
public boolean isAllowNullKey() {
return false;

View File

@ -25,7 +25,6 @@ import static org.junit.jupiter.api.Assertions.assertSame;
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;
@ -50,33 +49,6 @@ public class CursorableLinkedListTest<E> extends AbstractLinkedListTest<E> {
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<>();

View File

@ -62,16 +62,6 @@ public class SingletonMapTest<K, V> extends AbstractOrderedMapTest<K, V> {
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;

View File

@ -32,17 +32,6 @@ import org.junit.jupiter.api.Test;
*/
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}
*/

View File

@ -45,11 +45,6 @@ public class TransformedSortedMapTest<K, V> extends AbstractSortedMapTest<K, V>
return "4";
}
@Override
public String[] ignoredTests() {
return null;
}
@Override
public boolean isSubMapViewsSerializable() {
// TreeMap sub map views have a bug in deserialization.

View File

@ -38,14 +38,6 @@ public class UnmodifiableTrieTest<V> extends AbstractSortedMapTest<String, V> {
return "4";
}
/**
* Override to prevent infinite recursion of tests.
*/
@Override
public String[] ignoredTests() {
return null;
}
@Override
public boolean isPutAddSupported() {
return false;