mirror of
https://github.com/apache/commons-collections.git
synced 2025-02-18 07:54:56 +00:00
Normalize test method names
Skip bloom filter package due to WIP PR
This commit is contained in:
parent
2f3d800fd6
commit
eba4b8cbc5
@ -123,13 +123,13 @@ public class CollectionUtilsTest extends MockTestCase {
|
||||
Transformer<Object, Integer> TRANSFORM_TO_INTEGER = input -> Integer.valueOf(((Long) input).intValue());
|
||||
|
||||
@Test
|
||||
public void addAllForElements() {
|
||||
public void testAddAllForElements() {
|
||||
CollectionUtils.addAll(collectionA, 5);
|
||||
assertTrue(collectionA.contains(5));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void addAllForEnumeration() {
|
||||
public void testAddAllForEnumeration() {
|
||||
final Hashtable<Integer, Integer> h = new Hashtable<>();
|
||||
h.put(5, 5);
|
||||
final Enumeration<? extends Integer> enumeration = h.keys();
|
||||
@ -144,7 +144,7 @@ public class CollectionUtilsTest extends MockTestCase {
|
||||
* {@link Collection#addAll(Collection)} is called instead of iterating.
|
||||
*/
|
||||
@Test
|
||||
public void addAllForIterable() {
|
||||
public void testAddAllForIterable() {
|
||||
final Collection<Integer> inputCollection = createMock(Collection.class);
|
||||
final Iterable<Integer> inputIterable = inputCollection;
|
||||
final Iterable<Long> iterable = createMock(Iterable.class);
|
||||
@ -180,7 +180,7 @@ public class CollectionUtilsTest extends MockTestCase {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void addIgnoreNull() {
|
||||
public void testAddIgnoreNull() {
|
||||
final Set<String> set = new HashSet<>();
|
||||
set.add("1");
|
||||
set.add("2");
|
||||
@ -291,22 +291,22 @@ public class CollectionUtilsTest extends MockTestCase {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void collateException0() {
|
||||
public void testCollateException0() {
|
||||
assertThrows(NullPointerException.class, () -> CollectionUtils.collate(null, collectionC));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void collateException1() {
|
||||
public void testCollateException1() {
|
||||
assertThrows(NullPointerException.class, () -> CollectionUtils.collate(collectionA, null));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void collateException2() {
|
||||
public void testCollateException2() {
|
||||
assertThrows(NullPointerException.class, () -> CollectionUtils.collate(collectionA, collectionC, null));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void collect() {
|
||||
public void testCollect() {
|
||||
final Transformer<Number, Long> transformer = TransformerUtils.constantTransformer(2L);
|
||||
Collection<Number> collection = CollectionUtils.<Integer, Number>collect(iterableA, transformer);
|
||||
assertEquals(collection.size(), collectionA.size());
|
||||
@ -340,7 +340,7 @@ public class CollectionUtilsTest extends MockTestCase {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void containsAll() {
|
||||
public void testContainsAll() {
|
||||
final Collection<String> empty = new ArrayList<>(0);
|
||||
final Collection<String> one = new ArrayList<>(1);
|
||||
one.add("1");
|
||||
@ -376,7 +376,7 @@ public class CollectionUtilsTest extends MockTestCase {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void containsAnyInArray() {
|
||||
public void testContainsAnyInArray() {
|
||||
final Collection<String> empty = new ArrayList<>(0);
|
||||
final String[] emptyArr = {};
|
||||
final Collection<String> one = new ArrayList<>(1);
|
||||
@ -410,7 +410,7 @@ public class CollectionUtilsTest extends MockTestCase {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void containsAnyInCollection() {
|
||||
public void testContainsAnyInCollection() {
|
||||
final Collection<String> empty = new ArrayList<>(0);
|
||||
final Collection<String> one = new ArrayList<>(1);
|
||||
one.add("1");
|
||||
@ -448,7 +448,7 @@ public class CollectionUtilsTest extends MockTestCase {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void disjunction() {
|
||||
public void testDisjunction() {
|
||||
final Collection<Integer> col = CollectionUtils.disjunction(iterableA, iterableC);
|
||||
final Map<Integer, Integer> freq = CollectionUtils.getCardinalityMap(col);
|
||||
assertEquals(Integer.valueOf(1), freq.get(1));
|
||||
@ -467,13 +467,13 @@ public class CollectionUtilsTest extends MockTestCase {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void emptyCollection() throws Exception {
|
||||
public void testEmptyCollection() throws Exception {
|
||||
final Collection<Number> coll = CollectionUtils.emptyCollection();
|
||||
assertEquals(CollectionUtils.EMPTY_COLLECTION, coll);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void emptyIfNull() {
|
||||
public void testEmptyIfNull() {
|
||||
assertTrue(CollectionUtils.emptyIfNull(null).isEmpty());
|
||||
final Collection<Object> collection = new ArrayList<>();
|
||||
assertSame(collection, CollectionUtils.emptyIfNull(collection));
|
||||
@ -497,7 +497,7 @@ public class CollectionUtilsTest extends MockTestCase {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void extractSingleton() {
|
||||
public void testExtractSingleton() {
|
||||
assertAll(
|
||||
() -> {
|
||||
final ArrayList<String> collNull = null;
|
||||
@ -523,7 +523,7 @@ public class CollectionUtilsTest extends MockTestCase {
|
||||
|
||||
//Up to here
|
||||
@Test
|
||||
public void filter() {
|
||||
public void testFilter() {
|
||||
final List<Integer> ints = new ArrayList<>();
|
||||
ints.add(1);
|
||||
ints.add(2);
|
||||
@ -536,7 +536,7 @@ public class CollectionUtilsTest extends MockTestCase {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void filterInverse() {
|
||||
public void testFilterInverse() {
|
||||
final List<Integer> ints = new ArrayList<>();
|
||||
ints.add(1);
|
||||
ints.add(2);
|
||||
@ -551,7 +551,7 @@ public class CollectionUtilsTest extends MockTestCase {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void filterInverseNullParameters() throws Exception {
|
||||
public void testFilterInverseNullParameters() throws Exception {
|
||||
final List<Long> longs = Collections.nCopies(4, 10L);
|
||||
assertFalse(CollectionUtils.filterInverse(longs, null));
|
||||
assertEquals(4, longs.size());
|
||||
@ -562,7 +562,7 @@ public class CollectionUtilsTest extends MockTestCase {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void filterNullParameters() throws Exception {
|
||||
public void testFilterNullParameters() throws Exception {
|
||||
final List<Long> longs = Collections.nCopies(4, 10L);
|
||||
assertFalse(CollectionUtils.filter(longs, null));
|
||||
assertEquals(4, longs.size());
|
||||
@ -684,7 +684,7 @@ public class CollectionUtilsTest extends MockTestCase {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void get() {
|
||||
public void testGet() {
|
||||
assertEquals(2, CollectionUtils.get((Object) collectionA, 2));
|
||||
assertEquals(2, CollectionUtils.get((Object) collectionA.iterator(), 2));
|
||||
final Map<Integer, Integer> map = CollectionUtils.getCardinalityMap(collectionA);
|
||||
@ -694,12 +694,12 @@ public class CollectionUtilsTest extends MockTestCase {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void get1() {
|
||||
public void testGet1() {
|
||||
assertThrows(IllegalArgumentException.class, () -> CollectionUtils.get((Object) null, 0));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void getCardinalityMap() {
|
||||
public void testGetCardinalityMap() {
|
||||
final Map<Number, Integer> freqA = CollectionUtils.<Number>getCardinalityMap(iterableA);
|
||||
assertEquals(1, (int) freqA.get(1));
|
||||
assertEquals(2, (int) freqA.get(2));
|
||||
@ -716,7 +716,7 @@ public class CollectionUtilsTest extends MockTestCase {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void getEnumeration() {
|
||||
public void testGetEnumeration() {
|
||||
final Vector<Integer> vectorA = new Vector<>(collectionA);
|
||||
final Enumeration<Integer> e = vectorA.elements();
|
||||
assertEquals(Integer.valueOf(2), CollectionUtils.get(e, 2));
|
||||
@ -746,7 +746,7 @@ public class CollectionUtilsTest extends MockTestCase {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void getFromHashMap() {
|
||||
public void testGetFromHashMap() {
|
||||
// Unordered map, entries exist
|
||||
final Map<String, String> expected = new HashMap<>();
|
||||
expected.put("zeroKey", "zero");
|
||||
@ -796,7 +796,7 @@ public class CollectionUtilsTest extends MockTestCase {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void getFromLinkedHashMap() {
|
||||
public void testGetFromLinkedHashMap() {
|
||||
// Ordered map, entries exist
|
||||
final Map<String, String> expected = new LinkedHashMap<>();
|
||||
expected.put("zeroKey", "zero");
|
||||
@ -815,7 +815,7 @@ public class CollectionUtilsTest extends MockTestCase {
|
||||
* {@link List#get(int)}.
|
||||
*/
|
||||
@Test
|
||||
public void getFromList() throws Exception {
|
||||
public void testGetFromList() throws Exception {
|
||||
// List, entry exists
|
||||
final List<String> list = createMock(List.class);
|
||||
expect(list.get(0)).andReturn("zero");
|
||||
@ -829,7 +829,7 @@ public class CollectionUtilsTest extends MockTestCase {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void getFromMapIndexOutOfRange() {
|
||||
public void testGetFromMapIndexOutOfRange() {
|
||||
// Ordered map, entries exist
|
||||
final Map<String, String> expected = new LinkedHashMap<>();
|
||||
expected.put("zeroKey", "zero");
|
||||
@ -845,14 +845,14 @@ public class CollectionUtilsTest extends MockTestCase {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void getFromObject() throws Exception {
|
||||
public void testGetFromObject() throws Exception {
|
||||
// Invalid object
|
||||
final Object obj = new Object();
|
||||
assertThrows(IllegalArgumentException.class, () -> CollectionUtils.get(obj, 0));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void getFromObjectArray() throws Exception {
|
||||
public void testGetFromObjectArray() throws Exception {
|
||||
// Object array, entry exists
|
||||
final Object[] objArray = new Object[2];
|
||||
objArray[0] = "zero";
|
||||
@ -866,7 +866,7 @@ public class CollectionUtilsTest extends MockTestCase {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void getFromPrimitiveArray() throws Exception {
|
||||
public void testGetFromPrimitiveArray() throws Exception {
|
||||
// Primitive array, entry exists
|
||||
final int[] array = new int[2];
|
||||
array[0] = 10;
|
||||
@ -880,7 +880,7 @@ public class CollectionUtilsTest extends MockTestCase {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void getFromTreeMap() {
|
||||
public void testGetFromTreeMap() {
|
||||
// Ordered map, entries exist
|
||||
final Map<String, String> expected = new LinkedHashMap<>();
|
||||
expected.put("zeroKey", "zero");
|
||||
@ -899,7 +899,7 @@ public class CollectionUtilsTest extends MockTestCase {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void getIterator() {
|
||||
public void testGetIterator() {
|
||||
final Iterator<Integer> it = collectionA.iterator();
|
||||
assertEquals(Integer.valueOf(2), CollectionUtils.get((Object) it, 2));
|
||||
assertTrue(it.hasNext());
|
||||
@ -908,17 +908,17 @@ public class CollectionUtilsTest extends MockTestCase {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void getNegative() {
|
||||
public void testGetNegative() {
|
||||
assertThrows(IndexOutOfBoundsException.class, () -> CollectionUtils.get((Object) collectionA, -3));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void getPositiveOutOfBounds() {
|
||||
public void testGetPositiveOutOfBounds() {
|
||||
assertThrows(IndexOutOfBoundsException.class, () -> CollectionUtils.get((Object) collectionA.iterator(), 30));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void intersection() {
|
||||
public void testIntersection() {
|
||||
final Collection<Integer> col = CollectionUtils.intersection(iterableA, iterableC);
|
||||
final Map<Integer, Integer> freq = CollectionUtils.getCardinalityMap(col);
|
||||
assertNull(freq.get(1));
|
||||
@ -937,7 +937,7 @@ public class CollectionUtilsTest extends MockTestCase {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void intersectionUsesMethodEquals() {
|
||||
public void testIntersectionUsesMethodEquals() {
|
||||
// Let elta and eltb be objects...
|
||||
final Integer elta = 17;
|
||||
final Integer eltb = 17;
|
||||
@ -974,13 +974,13 @@ public class CollectionUtilsTest extends MockTestCase {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void isEmpty() {
|
||||
public void testIsEmpty() {
|
||||
assertFalse(CollectionUtils.isNotEmpty(null));
|
||||
assertTrue(CollectionUtils.isNotEmpty(collectionA));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void isFull() {
|
||||
public void testIsFull() {
|
||||
final Set<String> set = new HashSet<>();
|
||||
set.add("1");
|
||||
set.add("2");
|
||||
@ -996,7 +996,7 @@ public class CollectionUtilsTest extends MockTestCase {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void maxSize() {
|
||||
public void testMaxSize() {
|
||||
final Set<String> set = new HashSet<>();
|
||||
set.add("1");
|
||||
set.add("2");
|
||||
@ -1020,14 +1020,14 @@ public class CollectionUtilsTest extends MockTestCase {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void predicatedCollection() {
|
||||
public void testPredicatedCollection() {
|
||||
final Predicate<Object> predicate = PredicateUtils.instanceofPredicate(Integer.class);
|
||||
final Collection<Number> collection = CollectionUtils.predicatedCollection(new ArrayList<>(), predicate);
|
||||
assertTrue(collection instanceof PredicatedCollection, "returned object should be a PredicatedCollection");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void reverse() {
|
||||
public void testReverse() {
|
||||
CollectionUtils.reverseArray(new Object[] {});
|
||||
final Integer[] a = collectionA.toArray(ArrayUtils.EMPTY_INTEGER_OBJECT_ARRAY);
|
||||
CollectionUtils.reverseArray(a);
|
||||
@ -1037,7 +1037,7 @@ public class CollectionUtilsTest extends MockTestCase {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void select() {
|
||||
public void testSelect() {
|
||||
final List<Integer> list = new ArrayList<>();
|
||||
list.add(1);
|
||||
list.add(2);
|
||||
@ -1054,7 +1054,7 @@ public class CollectionUtilsTest extends MockTestCase {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void selectRejected() {
|
||||
public void testSelectRejected() {
|
||||
final List<Long> list = new ArrayList<>();
|
||||
list.add(1L);
|
||||
list.add(2L);
|
||||
@ -1073,7 +1073,7 @@ public class CollectionUtilsTest extends MockTestCase {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void selectWithOutputCollections() {
|
||||
public void testSelectWithOutputCollections() {
|
||||
final List<Integer> input = new ArrayList<>();
|
||||
input.add(1);
|
||||
input.add(2);
|
||||
@ -2284,7 +2284,7 @@ public class CollectionUtilsTest extends MockTestCase {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void union() {
|
||||
public void testUnion() {
|
||||
final Collection<Integer> col = CollectionUtils.union(iterableA, iterableC);
|
||||
final Map<Integer, Integer> freq = CollectionUtils.getCardinalityMap(col);
|
||||
assertEquals(Integer.valueOf(1), freq.get(1));
|
||||
|
@ -31,7 +31,7 @@ import org.junit.jupiter.api.Test;
|
||||
public class ComparatorUtilsTest {
|
||||
|
||||
@Test
|
||||
public void booleanComparator() {
|
||||
public void testBooleanComparator() {
|
||||
Comparator<Boolean> comp = ComparatorUtils.booleanComparator(true);
|
||||
assertTrue(comp.compare(Boolean.TRUE, Boolean.FALSE) < 0);
|
||||
assertEquals(0, comp.compare(Boolean.TRUE, Boolean.TRUE));
|
||||
@ -44,7 +44,7 @@ public class ComparatorUtilsTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void chainedComparator() {
|
||||
public void testChainedComparator() {
|
||||
// simple test: chain 2 natural comparators
|
||||
final Comparator<Integer> comp = ComparatorUtils.chainedComparator(ComparatorUtils.<Integer>naturalComparator(),
|
||||
ComparatorUtils.naturalComparator());
|
||||
@ -54,7 +54,7 @@ public class ComparatorUtilsTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void max() {
|
||||
public void testMax() {
|
||||
final Comparator<Integer> reversed =
|
||||
ComparatorUtils.reversedComparator(ComparatorUtils.<Integer>naturalComparator());
|
||||
|
||||
@ -72,7 +72,7 @@ public class ComparatorUtilsTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void min() {
|
||||
public void testMin() {
|
||||
final Comparator<Integer> reversed =
|
||||
ComparatorUtils.reversedComparator(ComparatorUtils.<Integer>naturalComparator());
|
||||
|
||||
@ -90,7 +90,7 @@ public class ComparatorUtilsTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void nullLowComparator() {
|
||||
public void testNullLowComparator() {
|
||||
final Comparator<Integer> comp = ComparatorUtils.nullLowComparator(null);
|
||||
assertTrue(comp.compare(null, 10) < 0);
|
||||
assertEquals(0, comp.compare(null, null));
|
||||
@ -98,7 +98,7 @@ public class ComparatorUtilsTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void nullHighComparator() {
|
||||
public void testNullHighComparator() {
|
||||
final Comparator<Integer> comp = ComparatorUtils.nullHighComparator(null);
|
||||
assertTrue(comp.compare(null, 10) > 0);
|
||||
assertEquals(0, comp.compare(null, null));
|
||||
|
@ -39,7 +39,7 @@ public class EnumerationUtilsTest {
|
||||
public static final String TO_LIST_FIXTURE = "this is a test";
|
||||
|
||||
@Test
|
||||
public void getFromEnumeration() throws Exception {
|
||||
public void testGetFromEnumeration() throws Exception {
|
||||
// Enumeration, entry exists
|
||||
final Vector<String> vector = new Vector<>();
|
||||
vector.addElement("zero");
|
||||
|
@ -179,12 +179,12 @@ public class FactoryUtilsTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void instantiateFactoryNull() {
|
||||
public void testInstantiateFactoryNull() {
|
||||
assertThrows(NullPointerException.class, () -> FactoryUtils.instantiateFactory(null));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void instantiateFactorySimple() {
|
||||
public void testInstantiateFactorySimple() {
|
||||
final Factory<Mock3> factory = FactoryUtils.instantiateFactory(Mock3.class);
|
||||
assertNotNull(factory);
|
||||
Mock3 created = factory.create();
|
||||
@ -194,17 +194,17 @@ public class FactoryUtilsTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void instantiateFactoryMismatch() {
|
||||
public void testInstantiateFactoryMismatch() {
|
||||
assertThrows(IllegalArgumentException.class, () -> FactoryUtils.instantiateFactory(Date.class, null, new Object[] {null}));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void instantiateFactoryNoConstructor() {
|
||||
public void testInstantiateFactoryNoConstructor() {
|
||||
assertThrows(IllegalArgumentException.class, () -> FactoryUtils.instantiateFactory(Date.class, new Class[] {Long.class}, new Object[] {null}));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void instantiateFactoryComplex() {
|
||||
public void testInstantiateFactoryComplex() {
|
||||
TimeZone.setDefault(TimeZone.getTimeZone("GMT"));
|
||||
// 2nd Jan 1970
|
||||
final Factory<Date> factory = FactoryUtils.instantiateFactory(Date.class,
|
||||
|
@ -106,7 +106,7 @@ public class FluentIterableTest {
|
||||
private static final Predicate<Number> EVEN = input -> input.intValue() % 2 == 0;
|
||||
|
||||
@Test
|
||||
public void factoryMethodOf() {
|
||||
public void testFactoryMethodOf() {
|
||||
FluentIterable<Integer> iterable = FluentIterable.of(1, 2, 3, 4, 5);
|
||||
List<Integer> result = iterable.toList();
|
||||
assertEquals(Arrays.asList(1, 2, 3, 4, 5), result);
|
||||
@ -125,7 +125,7 @@ public class FluentIterableTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void appendElements() {
|
||||
public void testAppendElements() {
|
||||
final FluentIterable<Integer> it = FluentIterable.of(iterableA).append(10, 20, 30);
|
||||
assertEquals(IterableUtils.size(iterableA) + 3, IterableUtils.size(it));
|
||||
assertTrue(IterableUtils.contains(it, 1));
|
||||
@ -139,7 +139,7 @@ public class FluentIterableTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void appendIterable() {
|
||||
public void testAppendIterable() {
|
||||
final List<Integer> listB = Arrays.asList(10, 20, 30);
|
||||
final FluentIterable<Integer> it = FluentIterable.of(iterableA).append(listB);
|
||||
assertEquals(IterableUtils.size(iterableA) + listB.size(), IterableUtils.size(it));
|
||||
@ -151,7 +151,7 @@ public class FluentIterableTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void collate() {
|
||||
public void testCollate() {
|
||||
final List<Integer> result = FluentIterable.of(iterableOdd).collate(iterableEven).toList();
|
||||
final List<Integer> combinedList = new ArrayList<>();
|
||||
CollectionUtils.addAll(combinedList, iterableOdd);
|
||||
@ -164,7 +164,7 @@ public class FluentIterableTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void collateWithComparator() {
|
||||
public void testCollateWithComparator() {
|
||||
List<Integer> result =
|
||||
FluentIterable
|
||||
.of(iterableOdd)
|
||||
@ -183,7 +183,7 @@ public class FluentIterableTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void filter() {
|
||||
public void testFilter() {
|
||||
final Predicate<Integer> smallerThan3 = object -> object.intValue() < 3;
|
||||
List<Integer> result = FluentIterable.of(iterableA).filter(smallerThan3).toList();
|
||||
assertEquals(3, result.size());
|
||||
@ -198,7 +198,7 @@ public class FluentIterableTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void forEach() {
|
||||
public void testForEach() {
|
||||
final AtomicInteger sum = new AtomicInteger(0);
|
||||
final Closure<Integer> closure = sum::addAndGet;
|
||||
|
||||
@ -214,7 +214,7 @@ public class FluentIterableTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void limit() {
|
||||
public void testLimit() {
|
||||
List<Integer> result = FluentIterable.of(iterableA).limit(3).toList();
|
||||
assertEquals(3, result.size());
|
||||
assertEquals(Arrays.asList(1, 2, 2), result);
|
||||
@ -238,7 +238,7 @@ public class FluentIterableTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void reverse() {
|
||||
public void testReverse() {
|
||||
List<Integer> result = FluentIterable.of(iterableA).reverse().toList();
|
||||
final List<Integer> expected = IterableUtils.toList(iterableA);
|
||||
Collections.reverse(expected);
|
||||
@ -250,7 +250,7 @@ public class FluentIterableTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void skip() {
|
||||
public void testSkip() {
|
||||
List<Integer> result = FluentIterable.of(iterableA).skip(4).toList();
|
||||
assertEquals(6, result.size());
|
||||
assertEquals(Arrays.asList(3, 3, 4, 4, 4, 4), result);
|
||||
@ -289,7 +289,7 @@ public class FluentIterableTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void unique() {
|
||||
public void testUnique() {
|
||||
List<Integer> result = FluentIterable.of(iterableA).unique().toList();
|
||||
assertEquals(4, result.size());
|
||||
assertEquals(Arrays.asList(1, 2, 3, 4), result);
|
||||
@ -300,7 +300,7 @@ public class FluentIterableTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void unmodifiable() {
|
||||
public void testUnmodifiable() {
|
||||
final FluentIterable<Integer> iterable1 = FluentIterable.of(iterableA).unmodifiable();
|
||||
final Iterator<Integer> it = iterable1.iterator();
|
||||
assertEquals(1, it.next().intValue());
|
||||
@ -315,7 +315,7 @@ public class FluentIterableTest {
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@Test
|
||||
public void zip() {
|
||||
public void testZip() {
|
||||
List<Integer> result = FluentIterable.of(iterableOdd).zip(iterableEven).toList();
|
||||
List<Integer> combinedList = new ArrayList<>();
|
||||
CollectionUtils.addAll(combinedList, iterableOdd);
|
||||
@ -335,7 +335,7 @@ public class FluentIterableTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void asEnumeration() {
|
||||
public void testAsEnumeration() {
|
||||
Enumeration<Long> enumeration = FluentIterable.of(iterableB).asEnumeration();
|
||||
final List<Long> result = EnumerationUtils.toList(enumeration);
|
||||
assertEquals(iterableB, result);
|
||||
@ -345,7 +345,7 @@ public class FluentIterableTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void allMatch() {
|
||||
public void testAllMatch() {
|
||||
assertTrue(FluentIterable.of(iterableEven).allMatch(EVEN));
|
||||
assertFalse(FluentIterable.of(iterableOdd).allMatch(EVEN));
|
||||
assertFalse(FluentIterable.of(iterableA).allMatch(EVEN));
|
||||
@ -355,7 +355,7 @@ public class FluentIterableTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void anyMatch() {
|
||||
public void testAnyMatch() {
|
||||
assertTrue(FluentIterable.of(iterableEven).anyMatch(EVEN));
|
||||
assertFalse(FluentIterable.of(iterableOdd).anyMatch(EVEN));
|
||||
assertTrue(FluentIterable.of(iterableA).anyMatch(EVEN));
|
||||
@ -365,19 +365,19 @@ public class FluentIterableTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void isEmpty() {
|
||||
public void testIsEmpty() {
|
||||
assertTrue(FluentIterable.of(emptyIterable).isEmpty());
|
||||
assertFalse(FluentIterable.of(iterableOdd).isEmpty());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void size() {
|
||||
public void testSize() {
|
||||
assertEquals(0, FluentIterable.of(emptyIterable).size());
|
||||
assertEquals(IterableUtils.toList(iterableOdd).size(), FluentIterable.of(iterableOdd).size());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void eval() {
|
||||
public void testEval() {
|
||||
final List<Integer> listNumbers = new ArrayList<>(Arrays.asList(1, 2, 3, 4, 5, 6, 7, 8, 9, 10));
|
||||
final FluentIterable<Integer> iterable = FluentIterable.of(listNumbers).filter(EVEN);
|
||||
final FluentIterable<Integer> materialized = iterable.eval();
|
||||
@ -391,7 +391,7 @@ public class FluentIterableTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void contains() {
|
||||
public void testContains() {
|
||||
assertTrue(FluentIterable.of(iterableEven).contains(2));
|
||||
assertFalse(FluentIterable.of(iterableEven).contains(1));
|
||||
assertFalse(FluentIterable.of(iterableEven).contains(null));
|
||||
@ -399,7 +399,7 @@ public class FluentIterableTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void copyInto() {
|
||||
public void testCopyInto() {
|
||||
List<Integer> result = new ArrayList<>();
|
||||
FluentIterable.of(iterableA).copyInto(result);
|
||||
|
||||
@ -423,7 +423,7 @@ public class FluentIterableTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void iterator() {
|
||||
public void testIterator() {
|
||||
Iterator<Integer> iterator = FluentIterable.of(iterableA).iterator();
|
||||
assertTrue(iterator.hasNext());
|
||||
|
||||
@ -432,7 +432,7 @@ public class FluentIterableTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void get() {
|
||||
public void testGet() {
|
||||
assertEquals(2, FluentIterable.of(iterableEven).get(0).intValue());
|
||||
|
||||
assertThrows(IndexOutOfBoundsException.class, () -> FluentIterable.of(iterableEven).get(-1),
|
||||
|
@ -98,7 +98,7 @@ public class IterableUtilsTest {
|
||||
private static final Predicate<Number> EVEN = input -> input.intValue() % 2 == 0;
|
||||
|
||||
@Test
|
||||
public void forEach() {
|
||||
public void testForEach() {
|
||||
final List<Integer> listA = new ArrayList<>();
|
||||
listA.add(1);
|
||||
|
||||
@ -123,7 +123,7 @@ public class IterableUtilsTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void forEachFailure() {
|
||||
public void testForEachFailure() {
|
||||
final Closure<String> testClosure = ClosureUtils.invokerClosure("clear");
|
||||
final Collection<String> col = new ArrayList<>();
|
||||
col.add("x");
|
||||
@ -131,7 +131,7 @@ public class IterableUtilsTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void forEachButLast() {
|
||||
public void testForEachButLast() {
|
||||
final List<Integer> listA = new ArrayList<>();
|
||||
listA.add(1);
|
||||
|
||||
@ -159,7 +159,7 @@ public class IterableUtilsTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void containsWithEquator() {
|
||||
public void testContainsWithEquator() {
|
||||
final List<String> base = new ArrayList<>();
|
||||
base.add("AC");
|
||||
base.add("BB");
|
||||
@ -190,7 +190,7 @@ public class IterableUtilsTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void frequency() {
|
||||
public void testFrequency() {
|
||||
// null iterable test
|
||||
assertEquals(0, IterableUtils.frequency(null, 1));
|
||||
|
||||
@ -238,7 +238,7 @@ public class IterableUtilsTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void frequencyOfNull() {
|
||||
public void testFrequencyOfNull() {
|
||||
final List<String> list = new ArrayList<>();
|
||||
assertEquals(0, IterableUtils.frequency(list, null));
|
||||
list.add("A");
|
||||
@ -256,7 +256,7 @@ public class IterableUtilsTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void find() {
|
||||
public void testFind() {
|
||||
Predicate<Number> testPredicate = equalPredicate(4);
|
||||
Integer test = IterableUtils.find(iterableA, testPredicate);
|
||||
assertEquals(4, (int) test);
|
||||
@ -270,7 +270,7 @@ public class IterableUtilsTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void indexOf() {
|
||||
public void testIndexOf() {
|
||||
Predicate<Number> testPredicate = equalPredicate((Number) 4);
|
||||
int index = IterableUtils.indexOf(iterableA, testPredicate);
|
||||
assertEquals(6, index);
|
||||
@ -284,7 +284,7 @@ public class IterableUtilsTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void countMatches() {
|
||||
public void testCountMatches() {
|
||||
assertEquals(4, IterableUtils.countMatches(iterableB, EQUALS_TWO));
|
||||
assertEquals(0, IterableUtils.countMatches(null, EQUALS_TWO));
|
||||
assertAll(
|
||||
@ -296,7 +296,7 @@ public class IterableUtilsTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void matchesAny() {
|
||||
public void testMatchesAny() {
|
||||
final List<Integer> list = new ArrayList<>();
|
||||
|
||||
assertThrows(NullPointerException.class, () -> assertFalse(IterableUtils.matchesAny(null, null)),
|
||||
@ -317,7 +317,7 @@ public class IterableUtilsTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void matchesAll() {
|
||||
public void testMatchesAll() {
|
||||
assertThrows(NullPointerException.class, () -> assertFalse(IterableUtils.matchesAll(null, null)),
|
||||
"predicate must not be null");
|
||||
|
||||
@ -342,7 +342,7 @@ public class IterableUtilsTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void getFromIterableIndexOutOfBoundsException() throws Exception {
|
||||
public void testGetFromIterableIndexOutOfBoundsException() throws Exception {
|
||||
// Collection, entry exists
|
||||
final Bag<String> bag = new HashBag<>();
|
||||
bag.add("element", 1);
|
||||
@ -358,7 +358,7 @@ public class IterableUtilsTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void firstFromIterableIndexOutOfBoundsException() throws Exception {
|
||||
public void testFirstFromIterableIndexOutOfBoundsException() throws Exception {
|
||||
// Collection, entry exists
|
||||
final Bag<String> bag = new HashBag<>();
|
||||
// Collection, non-existent entry
|
||||
@ -367,7 +367,7 @@ public class IterableUtilsTest {
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@Test
|
||||
public void partition() {
|
||||
public void testPartition() {
|
||||
final List<Integer> input = new ArrayList<>();
|
||||
input.add(1);
|
||||
input.add(2);
|
||||
@ -401,7 +401,7 @@ public class IterableUtilsTest {
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@Test
|
||||
public void partitionMultiplePredicates() {
|
||||
public void testPartitionMultiplePredicates() {
|
||||
final List<Integer> input = new ArrayList<>();
|
||||
input.add(1);
|
||||
input.add(2);
|
||||
@ -517,7 +517,7 @@ public class IterableUtilsTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void size() {
|
||||
public void testSize() {
|
||||
assertEquals(0, IterableUtils.size(null));
|
||||
}
|
||||
|
||||
|
@ -44,7 +44,7 @@ public class SetUtilsTest {
|
||||
private Set<Integer> setB;
|
||||
|
||||
@Test
|
||||
public void difference() {
|
||||
public void testDifference() {
|
||||
final SetView<Integer> set = SetUtils.difference(setA, setB);
|
||||
assertEquals(2, set.size());
|
||||
assertTrue(set.contains(1));
|
||||
@ -64,7 +64,7 @@ public class SetUtilsTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void disjunction() {
|
||||
public void testDisjunction() {
|
||||
final SetView<Integer> set = SetUtils.disjunction(setA, setB);
|
||||
assertEquals(4, set.size());
|
||||
assertTrue(set.contains(1));
|
||||
@ -86,7 +86,7 @@ public class SetUtilsTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void intersection() {
|
||||
public void testIntersection() {
|
||||
final SetView<Integer> set = SetUtils.intersection(setA, setB);
|
||||
assertEquals(3, set.size());
|
||||
assertTrue(set.contains(3));
|
||||
@ -252,7 +252,7 @@ public class SetUtilsTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void union() {
|
||||
public void testUnion() {
|
||||
final SetView<Integer> set = SetUtils.union(setA, setB);
|
||||
assertEquals(7, set.size());
|
||||
assertTrue(set.containsAll(setA));
|
||||
|
@ -41,7 +41,7 @@ public class PredicatedCollectionBuilderTest {
|
||||
* Verify that passing the Predicate means ending up in the buffer.
|
||||
*/
|
||||
@Test
|
||||
public void addPass() {
|
||||
public void testAddPass() {
|
||||
final PredicatedCollection.Builder<String> builder = PredicatedCollection.notNullBuilder();
|
||||
builder.add("test");
|
||||
assertEquals(builder.createPredicatedList().size(), 1);
|
||||
@ -51,7 +51,7 @@ public class PredicatedCollectionBuilderTest {
|
||||
* Verify that failing the Predicate means NOT ending up in the buffer.
|
||||
*/
|
||||
@Test
|
||||
public void addFail() {
|
||||
public void testAddFail() {
|
||||
final PredicatedCollection.Builder<String> builder = PredicatedCollection.notNullBuilder();
|
||||
builder.add((String) null);
|
||||
assertTrue(builder.createPredicatedList().isEmpty());
|
||||
@ -63,14 +63,14 @@ public class PredicatedCollectionBuilderTest {
|
||||
* Verify that only items that pass the Predicate end up in the buffer.
|
||||
*/
|
||||
@Test
|
||||
public void addAllPass() {
|
||||
public void testAddAllPass() {
|
||||
final PredicatedCollection.Builder<String> builder = PredicatedCollection.notNullBuilder();
|
||||
builder.addAll(Arrays.asList("test1", null, "test2"));
|
||||
assertEquals(builder.createPredicatedList().size(), 2);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void createPredicatedCollectionWithNotNullPredicate() {
|
||||
public void testCreatePredicatedCollectionWithNotNullPredicate() {
|
||||
final PredicatedCollection.Builder<String> builder = PredicatedCollection.notNullBuilder();
|
||||
builder.add("test1");
|
||||
builder.add((String) null);
|
||||
@ -99,7 +99,7 @@ public class PredicatedCollectionBuilderTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void createPredicatedCollectionWithPredicate() {
|
||||
public void testCreatePredicatedCollectionWithPredicate() {
|
||||
final OddPredicate p = new OddPredicate();
|
||||
final PredicatedCollection.Builder<Integer> builder = PredicatedCollection.builder(p);
|
||||
|
||||
|
@ -24,7 +24,7 @@ import org.junit.jupiter.api.Test;
|
||||
public abstract class AbstractClosureTest {
|
||||
|
||||
@Test
|
||||
public void closureSanityTests() throws Exception {
|
||||
public void testClosureSanityTests() throws Exception {
|
||||
final Closure<?> closure = generateClosure();
|
||||
assertNotNull(closure);
|
||||
}
|
||||
|
@ -38,7 +38,7 @@ public abstract class AbstractPredicateTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void predicateSanityTests() throws Exception {
|
||||
public void testPredicateSanityTests() throws Exception {
|
||||
final Predicate<?> predicate = generatePredicate();
|
||||
assertNotNull(predicate);
|
||||
}
|
||||
|
@ -62,7 +62,7 @@ public class AllPredicateTest extends AbstractAnyAllOnePredicateTest<Integer> {
|
||||
*/
|
||||
@SuppressWarnings({"unchecked"})
|
||||
@Test
|
||||
public void emptyArrayToGetInstance() {
|
||||
public void testEmptyArrayToGetInstance() {
|
||||
assertTrue(getPredicateInstance(new Predicate[] {}).evaluate(null), "empty array not true");
|
||||
}
|
||||
|
||||
@ -70,7 +70,7 @@ public class AllPredicateTest extends AbstractAnyAllOnePredicateTest<Integer> {
|
||||
* Verifies that providing an empty predicate collection evaluates to true.
|
||||
*/
|
||||
@Test
|
||||
public void emptyCollectionToGetInstance() {
|
||||
public void testEmptyCollectionToGetInstance() {
|
||||
final Predicate<Integer> allPredicate = getPredicateInstance(
|
||||
Collections.<Predicate<Integer>>emptyList());
|
||||
assertTrue(allPredicate.evaluate(getTestValue()), "empty collection not true");
|
||||
@ -81,7 +81,7 @@ public class AllPredicateTest extends AbstractAnyAllOnePredicateTest<Integer> {
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
@Test
|
||||
public void oneTruePredicate() {
|
||||
public void testOneTruePredicate() {
|
||||
// use the constructor directly, as getInstance() returns the original predicate when passed
|
||||
// an array of size one.
|
||||
final Predicate<Integer> predicate = createMockPredicate(true);
|
||||
@ -94,7 +94,7 @@ public class AllPredicateTest extends AbstractAnyAllOnePredicateTest<Integer> {
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
@Test
|
||||
public void oneFalsePredicate() {
|
||||
public void testOneFalsePredicate() {
|
||||
// use the constructor directly, as getInstance() returns the original predicate when passed
|
||||
// an array of size one.
|
||||
final Predicate<Integer> predicate = createMockPredicate(false);
|
||||
@ -106,7 +106,7 @@ public class AllPredicateTest extends AbstractAnyAllOnePredicateTest<Integer> {
|
||||
* Tests whether multiple true predicates evaluates to true.
|
||||
*/
|
||||
@Test
|
||||
public void allTrue() {
|
||||
public void testAllTrue() {
|
||||
assertTrue(getPredicateInstance(true, true).evaluate(getTestValue()),
|
||||
"multiple true predicates evaluated to false");
|
||||
assertTrue(getPredicateInstance(true, true, true).evaluate(getTestValue()),
|
||||
|
@ -34,7 +34,7 @@ public class ComparatorPredicateTest extends AbstractPredicateTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void compareEquals() {
|
||||
public void testCompareEquals() {
|
||||
final Integer value = Integer.valueOf(10);
|
||||
final Predicate<Integer> p = comparatorPredicate(value, new TestComparator<>());
|
||||
assertPredicateFalse(p, Integer.valueOf(value.intValue() - 1));
|
||||
@ -43,7 +43,7 @@ public class ComparatorPredicateTest extends AbstractPredicateTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void compareGreater() {
|
||||
public void testCompareGreater() {
|
||||
final Integer value = Integer.valueOf(10);
|
||||
final Predicate<Integer> p = comparatorPredicate(value, new TestComparator<>(), Criterion.GREATER);
|
||||
assertPredicateTrue(p, Integer.valueOf(value.intValue() - 1));
|
||||
@ -52,7 +52,7 @@ public class ComparatorPredicateTest extends AbstractPredicateTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void compareLess() {
|
||||
public void testCompareLess() {
|
||||
final Integer value = Integer.valueOf(10);
|
||||
final Predicate<Integer> p = comparatorPredicate(value, new TestComparator<>(), Criterion.LESS);
|
||||
assertPredicateFalse(p, Integer.valueOf(value.intValue() - 1));
|
||||
@ -61,7 +61,7 @@ public class ComparatorPredicateTest extends AbstractPredicateTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void compareGreaterOrEqual() {
|
||||
public void testCompareGreaterOrEqual() {
|
||||
final Integer value = Integer.valueOf(10);
|
||||
final Predicate<Integer> p = comparatorPredicate(value, new TestComparator<>(), Criterion.GREATER_OR_EQUAL);
|
||||
assertPredicateTrue(p, Integer.valueOf(value.intValue() - 1));
|
||||
@ -70,7 +70,7 @@ public class ComparatorPredicateTest extends AbstractPredicateTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void compareLessOrEqual() {
|
||||
public void testCompareLessOrEqual() {
|
||||
final Integer value = Integer.valueOf(10);
|
||||
final Predicate<Integer> p = comparatorPredicate(value, new TestComparator<>(), Criterion.LESS_OR_EQUAL);
|
||||
assertPredicateFalse(p, Integer.valueOf(value.intValue() - 1));
|
||||
|
@ -39,7 +39,7 @@ public class EqualPredicateTest extends AbstractPredicateTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void objectFactoryUsesEqualsForTest() throws Exception {
|
||||
public void testObjectFactoryUsesEqualsForTest() throws Exception {
|
||||
final Predicate<EqualsTestObject> predicate = equalPredicate(FALSE_OBJECT);
|
||||
assertPredicateFalse(predicate, FALSE_OBJECT);
|
||||
assertPredicateTrue(equalPredicate(TRUE_OBJECT), TRUE_OBJECT);
|
||||
|
@ -30,7 +30,7 @@ public class NullPredicateTest extends AbstractPredicateTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void ensurePredicateCanBeTypedWithoutWarning() throws Exception {
|
||||
public void testEnsurePredicateCanBeTypedWithoutWarning() throws Exception {
|
||||
final Predicate<String> predicate = NullPredicate.nullPredicate();
|
||||
assertPredicateFalse(predicate, cString);
|
||||
}
|
||||
|
@ -56,7 +56,7 @@ public class LazyMapTest<K, V> extends AbstractIterableMapTest<K, V> {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void mapGetWithFactory() {
|
||||
public void testMapGetWithFactory() {
|
||||
Map<Integer, Number> map = lazyMap(new HashMap<>(), oneFactory);
|
||||
assertEquals(0, map.size());
|
||||
final Number i1 = map.get("Five");
|
||||
@ -74,7 +74,7 @@ public class LazyMapTest<K, V> extends AbstractIterableMapTest<K, V> {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void mapGetWithTransformer() {
|
||||
public void testMapGetWithTransformer() {
|
||||
final Transformer<Number, Integer> intConverter = Number::intValue;
|
||||
final Map<Long, Number> map = lazyMap(new HashMap<>(), intConverter);
|
||||
assertEquals(0, map.size());
|
||||
|
@ -72,15 +72,9 @@ public class LazySortedMapTest<K, V> extends AbstractSortedMapTest<K, V> {
|
||||
return false;
|
||||
}
|
||||
|
||||
// from LazyMapTest
|
||||
@Test
|
||||
@Override
|
||||
public void testMapGet() {
|
||||
//TODO eliminate need for this via superclass - see svn history.
|
||||
}
|
||||
|
||||
@Test
|
||||
public void mapGet() {
|
||||
public void testMapGet() {
|
||||
Map<Integer, Number> map = lazySortedMap(new TreeMap<>(), oneFactory);
|
||||
assertEquals(0, map.size());
|
||||
final Number i1 = map.get(5);
|
||||
|
Loading…
x
Reference in New Issue
Block a user