java.lang.Object
junit.framework.Assert
junit.framework.TestCase
com.google.common.collect.testing.AbstractTester<OneSizeTestContainerGenerator<com.google.common.collect.ListMultimap<K,V>, Map.Entry<K,V>>>
com.google.common.collect.testing.AbstractContainerTester<com.google.common.collect.ListMultimap<K,V>, Map.Entry<K,V>>
com.google.common.collect.testing.google.AbstractMultimapTester<K, V, com.google.common.collect.ListMultimap<K,V>>
com.google.common.collect.testing.google.AbstractListMultimapTester<K,V>
com.google.common.collect.testing.google.ListMultimapAsMapTester<K,V>
- Type Parameters:
K- The key type of the tested multimap.V- The value type of the tested multimap.
- All Implemented Interfaces:
junit.framework.Test
@GwtCompatible
@NullMarked
public class ListMultimapAsMapTester<K extends @Nullable Object, V extends @Nullable Object>
extends AbstractListMultimapTester<K,V>
Testers for
ListMultimap.asMap().- Author:
- Louis Wasserman
-
Nested Class Summary
Nested classes/interfaces inherited from class AbstractContainerTester
AbstractContainerTester.ArrayWithDuplicate<E>Modifier and TypeClassDescriptionstatic final classAbstractContainerTester.ArrayWithDuplicate<E extends @Nullable Object> -
Field Summary
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidvoidvoidvoidvoidMethods inherited from class AbstractListMultimapTester
assertGet, assertGetMethods inherited from class AbstractMultimapTester
actualContents, createArrayWithNullKey, createArrayWithNullKeyAndValue, createArrayWithNullValue, getKeyForNullValue, getValueForNullKey, initMultimapWithNullKey, initMultimapWithNullKeyAndValue, initMultimapWithNullValue, k0, k1, k2, k3, k4, multimap, resetCollection, resetContainer, resetContainer, sampleKeys, sampleValues, v0, v1, v2, v3, v4Modifier and TypeMethodDescriptionprotected Collection<Map.Entry<K, V>> protected Kprotected Vprotected voidprotected voidprotected voidprotected final Kk0()protected final Kk1()protected final Kk2()protected final Kk3()protected final Kk4()multimap()protected voidresetContainer(Map.Entry<K, V>... newContents) resetContainer(com.google.common.collect.ListMultimap<K, V> newContents) Replaces the existing container under test with a new container.protected SampleElements<K> protected SampleElements<V> protected final Vv0()protected final Vv1()protected final Vv2()protected final Vv3()protected final Vv4()Methods inherited from class AbstractContainerTester
createArrayWithDuplicateElement, createDisjointCollection, createOrderedArray, createSamplesArray, e0, e1, e2, e3, e4, emptyCollection, expectAdded, expectAdded, expectAdded, expectContents, expectContents, expectMissing, expectUnchanged, getNullLocation, getNumElements, getOrderedElements, getSampleElements, getSampleElements, resetContainer, setUpModifier and TypeMethodDescriptionprotected AbstractContainerTester.ArrayWithDuplicate<Map.Entry<K, V>> protected MinimalCollection<Map.Entry<K, V>> e0()e1()e2()e3()e4()protected MinimalCollection<Map.Entry<K, V>> protected final voidexpectAdded(int index, Map.Entry<K, V>... elements) protected final voidexpectAdded(int index, Collection<Map.Entry<K, V>> elements) protected final voidexpectAdded(Map.Entry<K, V>... elements) Asserts that the collection under test contains exactly the elements it was initialized with plus the given elements, according toAbstractContainerTester.expectContents(java.util.Collection).protected final voidexpectContents(Map.Entry<K, V>... elements) protected voidexpectContents(Collection<Map.Entry<K, V>> expected) Asserts that the collection under test contains exactly the given elements, respecting cardinality but not order.protected voidexpectMissing(Map.Entry<K, V>... elements) protected voidprotected intprotected intReturns the sample elements as ordered byTestContainerGenerator.order(List).protected Collection<Map.Entry<K, V>> protected Collection<Map.Entry<K, V>> getSampleElements(int howMany) Replaces the existing container under test with a new container created by the subject generator.voidsetUp()Methods inherited from class AbstractTester
assertNull, getName, getSubjectGenerator, getTestMethodName, init, init, tearDownModifier and TypeMethodDescriptionstatic voidassertNull(String message, @Nullable Object object) Asserts that the given object is non-null, with a better failure message thanTestCase.assertNull(String, Object).getName()final StringReturns the name of the test method invoked by this test instance.final voidinit(OneSizeTestContainerGenerator<com.google.common.collect.ListMultimap<K, V>, Map.Entry<K, V>> subjectGenerator, String suiteName) final voidinit(OneSizeTestContainerGenerator<com.google.common.collect.ListMultimap<K, V>, Map.Entry<K, V>> subjectGenerator, String suiteName, @Nullable Runnable setUp, @Nullable Runnable tearDown) voidtearDown()Methods inherited from class junit.framework.TestCase
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertSame, assertSame, assertTrue, assertTrue, countTestCases, createResult, fail, fail, failNotEquals, failNotSame, failSame, format, run, run, runBare, runTest, setName, toString
-
Constructor Details
-
ListMultimapAsMapTester
public ListMultimapAsMapTester()
-
-
Method Details
-
testAsMapValuesImplementList
public void testAsMapValuesImplementList() -
testAsMapGetImplementsList
public void testAsMapGetImplementsList() -
testAsMapRemoveImplementsList
public void testAsMapRemoveImplementsList() -
testEquals
public void testEquals() -
testEntrySetEquals
public void testEntrySetEquals() -
testValuesRemove
public void testValuesRemove()
-