Coverage Summary for Class: AbstractListMultimapTester (com.google.common.collect.testing.google)
| Class | Class, % | Method, % | Line, % |
|---|---|---|---|
| AbstractListMultimapTester | 0% (0/1) | 0% (0/3) | 0% (0/13) |
1 /* 2 * Copyright (C) 2012 The Guava Authors 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except 5 * in compliance with the License. You may obtain a copy of the License at 6 * 7 * http://www.apache.org/licenses/LICENSE-2.0 8 * 9 * Unless required by applicable law or agreed to in writing, software distributed under the License 10 * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express 11 * or implied. See the License for the specific language governing permissions and limitations under 12 * the License. 13 */ 14 15 package com.google.common.collect.testing.google; 16 17 import static com.google.common.collect.testing.Helpers.assertEqualInOrder; 18 19 import com.google.common.annotations.GwtCompatible; 20 import com.google.common.collect.ListMultimap; 21 import java.util.Arrays; 22 import java.util.Collection; 23 import org.junit.Ignore; 24 25 /** 26 * Superclass for all {@code ListMultimap} testers. 27 * 28 * @author Louis Wasserman 29 */ 30 @GwtCompatible 31 @Ignore // Affects only Android test runner, which respects JUnit 4 annotations on JUnit 3 tests. 32 public class AbstractListMultimapTester<K, V> 33 extends AbstractMultimapTester<K, V, ListMultimap<K, V>> { 34 35 @Override 36 protected void assertGet(K key, V... values) { 37 assertGet(key, Arrays.asList(values)); 38 } 39 40 @Override 41 protected void assertGet(K key, Collection<V> values) { 42 assertEqualInOrder(values, multimap().get(key)); 43 44 if (!values.isEmpty()) { 45 assertEqualInOrder(values, multimap().asMap().get(key)); 46 assertFalse(multimap().isEmpty()); 47 } else { 48 assertNull(multimap().asMap().get(key)); 49 } 50 51 assertEquals(values.size(), multimap().get(key).size()); 52 assertEquals(values.size() > 0, multimap().containsKey(key)); 53 assertEquals(values.size() > 0, multimap().keySet().contains(key)); 54 assertEquals(values.size() > 0, multimap().keys().contains(key)); 55 } 56 }