Java 类com.google.common.collect.SortedMapDifference 实例源码

项目:guava-mock    文件:ArbitraryInstancesTest.java   
public void testGet_collections() {
  assertEquals(ImmutableSet.of().iterator(), ArbitraryInstances.get(Iterator.class));
  assertFalse(ArbitraryInstances.get(PeekingIterator.class).hasNext());
  assertFalse(ArbitraryInstances.get(ListIterator.class).hasNext());
  assertEquals(ImmutableSet.of(), ArbitraryInstances.get(Iterable.class));
  assertEquals(ImmutableSet.of(), ArbitraryInstances.get(Set.class));
  assertEquals(ImmutableSet.of(), ArbitraryInstances.get(ImmutableSet.class));
  assertEquals(ImmutableSortedSet.of(), ArbitraryInstances.get(SortedSet.class));
  assertEquals(ImmutableSortedSet.of(), ArbitraryInstances.get(ImmutableSortedSet.class));
  assertEquals(ImmutableList.of(), ArbitraryInstances.get(Collection.class));
  assertEquals(ImmutableList.of(), ArbitraryInstances.get(ImmutableCollection.class));
  assertEquals(ImmutableList.of(), ArbitraryInstances.get(List.class));
  assertEquals(ImmutableList.of(), ArbitraryInstances.get(ImmutableList.class));
  assertEquals(ImmutableMap.of(), ArbitraryInstances.get(Map.class));
  assertEquals(ImmutableMap.of(), ArbitraryInstances.get(ImmutableMap.class));
  assertEquals(ImmutableSortedMap.of(), ArbitraryInstances.get(SortedMap.class));
  assertEquals(ImmutableSortedMap.of(), ArbitraryInstances.get(ImmutableSortedMap.class));
  assertEquals(ImmutableMultiset.of(), ArbitraryInstances.get(Multiset.class));
  assertEquals(ImmutableMultiset.of(), ArbitraryInstances.get(ImmutableMultiset.class));
  assertTrue(ArbitraryInstances.get(SortedMultiset.class).isEmpty());
  assertEquals(ImmutableMultimap.of(), ArbitraryInstances.get(Multimap.class));
  assertEquals(ImmutableMultimap.of(), ArbitraryInstances.get(ImmutableMultimap.class));
  assertTrue(ArbitraryInstances.get(SortedSetMultimap.class).isEmpty());
  assertEquals(ImmutableTable.of(), ArbitraryInstances.get(Table.class));
  assertEquals(ImmutableTable.of(), ArbitraryInstances.get(ImmutableTable.class));
  assertTrue(ArbitraryInstances.get(RowSortedTable.class).isEmpty());
  assertEquals(ImmutableBiMap.of(), ArbitraryInstances.get(BiMap.class));
  assertEquals(ImmutableBiMap.of(), ArbitraryInstances.get(ImmutableBiMap.class));
  assertTrue(ArbitraryInstances.get(ImmutableClassToInstanceMap.class).isEmpty());
  assertTrue(ArbitraryInstances.get(ClassToInstanceMap.class).isEmpty());
  assertTrue(ArbitraryInstances.get(ListMultimap.class).isEmpty());
  assertTrue(ArbitraryInstances.get(ImmutableListMultimap.class).isEmpty());
  assertTrue(ArbitraryInstances.get(SetMultimap.class).isEmpty());
  assertTrue(ArbitraryInstances.get(ImmutableSetMultimap.class).isEmpty());
  assertTrue(ArbitraryInstances.get(MapDifference.class).areEqual());
  assertTrue(ArbitraryInstances.get(SortedMapDifference.class).areEqual());
  assertEquals(Range.all(), ArbitraryInstances.get(Range.class));
  assertTrue(ArbitraryInstances.get(NavigableSet.class).isEmpty());
  assertTrue(ArbitraryInstances.get(NavigableMap.class).isEmpty());
  assertTrue(ArbitraryInstances.get(LinkedList.class).isEmpty());
  assertTrue(ArbitraryInstances.get(Deque.class).isEmpty());
  assertTrue(ArbitraryInstances.get(Queue.class).isEmpty());
  assertTrue(ArbitraryInstances.get(PriorityQueue.class).isEmpty());
  assertTrue(ArbitraryInstances.get(BitSet.class).isEmpty());
  assertTrue(ArbitraryInstances.get(TreeSet.class).isEmpty());
  assertTrue(ArbitraryInstances.get(TreeMap.class).isEmpty());
  assertFreshInstanceReturned(
      LinkedList.class, Deque.class, Queue.class, PriorityQueue.class, BitSet.class,
      TreeSet.class, TreeMap.class);
}
项目:googles-monorepo-demo    文件:ArbitraryInstancesTest.java   
public void testGet_collections() {
  assertEquals(ImmutableSet.of().iterator(), ArbitraryInstances.get(Iterator.class));
  assertFalse(ArbitraryInstances.get(PeekingIterator.class).hasNext());
  assertFalse(ArbitraryInstances.get(ListIterator.class).hasNext());
  assertEquals(ImmutableSet.of(), ArbitraryInstances.get(Iterable.class));
  assertEquals(ImmutableSet.of(), ArbitraryInstances.get(Set.class));
  assertEquals(ImmutableSet.of(), ArbitraryInstances.get(ImmutableSet.class));
  assertEquals(ImmutableSortedSet.of(), ArbitraryInstances.get(SortedSet.class));
  assertEquals(ImmutableSortedSet.of(), ArbitraryInstances.get(ImmutableSortedSet.class));
  assertEquals(ImmutableList.of(), ArbitraryInstances.get(Collection.class));
  assertEquals(ImmutableList.of(), ArbitraryInstances.get(ImmutableCollection.class));
  assertEquals(ImmutableList.of(), ArbitraryInstances.get(List.class));
  assertEquals(ImmutableList.of(), ArbitraryInstances.get(ImmutableList.class));
  assertEquals(ImmutableMap.of(), ArbitraryInstances.get(Map.class));
  assertEquals(ImmutableMap.of(), ArbitraryInstances.get(ImmutableMap.class));
  assertEquals(ImmutableSortedMap.of(), ArbitraryInstances.get(SortedMap.class));
  assertEquals(ImmutableSortedMap.of(), ArbitraryInstances.get(ImmutableSortedMap.class));
  assertEquals(ImmutableMultiset.of(), ArbitraryInstances.get(Multiset.class));
  assertEquals(ImmutableMultiset.of(), ArbitraryInstances.get(ImmutableMultiset.class));
  assertTrue(ArbitraryInstances.get(SortedMultiset.class).isEmpty());
  assertEquals(ImmutableMultimap.of(), ArbitraryInstances.get(Multimap.class));
  assertEquals(ImmutableMultimap.of(), ArbitraryInstances.get(ImmutableMultimap.class));
  assertTrue(ArbitraryInstances.get(SortedSetMultimap.class).isEmpty());
  assertEquals(ImmutableTable.of(), ArbitraryInstances.get(Table.class));
  assertEquals(ImmutableTable.of(), ArbitraryInstances.get(ImmutableTable.class));
  assertTrue(ArbitraryInstances.get(RowSortedTable.class).isEmpty());
  assertEquals(ImmutableBiMap.of(), ArbitraryInstances.get(BiMap.class));
  assertEquals(ImmutableBiMap.of(), ArbitraryInstances.get(ImmutableBiMap.class));
  assertTrue(ArbitraryInstances.get(ImmutableClassToInstanceMap.class).isEmpty());
  assertTrue(ArbitraryInstances.get(ClassToInstanceMap.class).isEmpty());
  assertTrue(ArbitraryInstances.get(ListMultimap.class).isEmpty());
  assertTrue(ArbitraryInstances.get(ImmutableListMultimap.class).isEmpty());
  assertTrue(ArbitraryInstances.get(SetMultimap.class).isEmpty());
  assertTrue(ArbitraryInstances.get(ImmutableSetMultimap.class).isEmpty());
  assertTrue(ArbitraryInstances.get(MapDifference.class).areEqual());
  assertTrue(ArbitraryInstances.get(SortedMapDifference.class).areEqual());
  assertEquals(Range.all(), ArbitraryInstances.get(Range.class));
  assertTrue(ArbitraryInstances.get(NavigableSet.class).isEmpty());
  assertTrue(ArbitraryInstances.get(NavigableMap.class).isEmpty());
  assertTrue(ArbitraryInstances.get(LinkedList.class).isEmpty());
  assertTrue(ArbitraryInstances.get(Deque.class).isEmpty());
  assertTrue(ArbitraryInstances.get(Queue.class).isEmpty());
  assertTrue(ArbitraryInstances.get(PriorityQueue.class).isEmpty());
  assertTrue(ArbitraryInstances.get(BitSet.class).isEmpty());
  assertTrue(ArbitraryInstances.get(TreeSet.class).isEmpty());
  assertTrue(ArbitraryInstances.get(TreeMap.class).isEmpty());
  assertFreshInstanceReturned(
      LinkedList.class, Deque.class, Queue.class, PriorityQueue.class, BitSet.class,
      TreeSet.class, TreeMap.class);
}
项目:guava-libraries    文件:ArbitraryInstancesTest.java   
public void testGet_collections() {
  assertEquals(ImmutableSet.of().iterator(), ArbitraryInstances.get(Iterator.class));
  assertFalse(ArbitraryInstances.get(PeekingIterator.class).hasNext());
  assertFalse(ArbitraryInstances.get(ListIterator.class).hasNext());
  assertEquals(ImmutableSet.of(), ArbitraryInstances.get(Iterable.class));
  assertEquals(ImmutableSet.of(), ArbitraryInstances.get(Set.class));
  assertEquals(ImmutableSet.of(), ArbitraryInstances.get(ImmutableSet.class));
  assertEquals(ImmutableSortedSet.of(), ArbitraryInstances.get(SortedSet.class));
  assertEquals(ImmutableSortedSet.of(), ArbitraryInstances.get(ImmutableSortedSet.class));
  assertEquals(ImmutableList.of(), ArbitraryInstances.get(Collection.class));
  assertEquals(ImmutableList.of(), ArbitraryInstances.get(ImmutableCollection.class));
  assertEquals(ImmutableList.of(), ArbitraryInstances.get(List.class));
  assertEquals(ImmutableList.of(), ArbitraryInstances.get(ImmutableList.class));
  assertEquals(ImmutableMap.of(), ArbitraryInstances.get(Map.class));
  assertEquals(ImmutableMap.of(), ArbitraryInstances.get(ImmutableMap.class));
  assertEquals(ImmutableSortedMap.of(), ArbitraryInstances.get(SortedMap.class));
  assertEquals(ImmutableSortedMap.of(), ArbitraryInstances.get(ImmutableSortedMap.class));
  assertEquals(ImmutableMultiset.of(), ArbitraryInstances.get(Multiset.class));
  assertEquals(ImmutableMultiset.of(), ArbitraryInstances.get(ImmutableMultiset.class));
  assertTrue(ArbitraryInstances.get(SortedMultiset.class).isEmpty());
  assertEquals(ImmutableMultimap.of(), ArbitraryInstances.get(Multimap.class));
  assertEquals(ImmutableMultimap.of(), ArbitraryInstances.get(ImmutableMultimap.class));
  assertTrue(ArbitraryInstances.get(SortedSetMultimap.class).isEmpty());
  assertEquals(ImmutableTable.of(), ArbitraryInstances.get(Table.class));
  assertEquals(ImmutableTable.of(), ArbitraryInstances.get(ImmutableTable.class));
  assertTrue(ArbitraryInstances.get(RowSortedTable.class).isEmpty());
  assertEquals(ImmutableBiMap.of(), ArbitraryInstances.get(BiMap.class));
  assertEquals(ImmutableBiMap.of(), ArbitraryInstances.get(ImmutableBiMap.class));
  assertTrue(ArbitraryInstances.get(ImmutableClassToInstanceMap.class).isEmpty());
  assertTrue(ArbitraryInstances.get(ClassToInstanceMap.class).isEmpty());
  assertTrue(ArbitraryInstances.get(ListMultimap.class).isEmpty());
  assertTrue(ArbitraryInstances.get(ImmutableListMultimap.class).isEmpty());
  assertTrue(ArbitraryInstances.get(SetMultimap.class).isEmpty());
  assertTrue(ArbitraryInstances.get(ImmutableSetMultimap.class).isEmpty());
  assertTrue(ArbitraryInstances.get(MapDifference.class).areEqual());
  assertTrue(ArbitraryInstances.get(SortedMapDifference.class).areEqual());
  assertEquals(Range.all(), ArbitraryInstances.get(Range.class));
  assertTrue(ArbitraryInstances.get(NavigableSet.class).isEmpty());
  assertTrue(ArbitraryInstances.get(NavigableMap.class).isEmpty());
  assertTrue(ArbitraryInstances.get(LinkedList.class).isEmpty());
  assertTrue(ArbitraryInstances.get(Deque.class).isEmpty());
  assertTrue(ArbitraryInstances.get(Queue.class).isEmpty());
  assertTrue(ArbitraryInstances.get(PriorityQueue.class).isEmpty());
  assertTrue(ArbitraryInstances.get(BitSet.class).isEmpty());
  assertTrue(ArbitraryInstances.get(TreeSet.class).isEmpty());
  assertTrue(ArbitraryInstances.get(TreeMap.class).isEmpty());
  assertFreshInstanceReturned(
      LinkedList.class, Deque.class, Queue.class, PriorityQueue.class, BitSet.class, 
      TreeSet.class, TreeMap.class);
}
项目:guava    文件:ArbitraryInstancesTest.java   
public void testGet_collections() {
  assertEquals(ImmutableSet.of().iterator(), ArbitraryInstances.get(Iterator.class));
  assertFalse(ArbitraryInstances.get(PeekingIterator.class).hasNext());
  assertFalse(ArbitraryInstances.get(ListIterator.class).hasNext());
  assertEquals(ImmutableSet.of(), ArbitraryInstances.get(Iterable.class));
  assertEquals(ImmutableSet.of(), ArbitraryInstances.get(Set.class));
  assertEquals(ImmutableSet.of(), ArbitraryInstances.get(ImmutableSet.class));
  assertEquals(ImmutableSortedSet.of(), ArbitraryInstances.get(SortedSet.class));
  assertEquals(ImmutableSortedSet.of(), ArbitraryInstances.get(ImmutableSortedSet.class));
  assertEquals(ImmutableList.of(), ArbitraryInstances.get(Collection.class));
  assertEquals(ImmutableList.of(), ArbitraryInstances.get(ImmutableCollection.class));
  assertEquals(ImmutableList.of(), ArbitraryInstances.get(List.class));
  assertEquals(ImmutableList.of(), ArbitraryInstances.get(ImmutableList.class));
  assertEquals(ImmutableMap.of(), ArbitraryInstances.get(Map.class));
  assertEquals(ImmutableMap.of(), ArbitraryInstances.get(ImmutableMap.class));
  assertEquals(ImmutableSortedMap.of(), ArbitraryInstances.get(SortedMap.class));
  assertEquals(ImmutableSortedMap.of(), ArbitraryInstances.get(ImmutableSortedMap.class));
  assertEquals(ImmutableMultiset.of(), ArbitraryInstances.get(Multiset.class));
  assertEquals(ImmutableMultiset.of(), ArbitraryInstances.get(ImmutableMultiset.class));
  assertTrue(ArbitraryInstances.get(SortedMultiset.class).isEmpty());
  assertEquals(ImmutableMultimap.of(), ArbitraryInstances.get(Multimap.class));
  assertEquals(ImmutableMultimap.of(), ArbitraryInstances.get(ImmutableMultimap.class));
  assertTrue(ArbitraryInstances.get(SortedSetMultimap.class).isEmpty());
  assertEquals(ImmutableTable.of(), ArbitraryInstances.get(Table.class));
  assertEquals(ImmutableTable.of(), ArbitraryInstances.get(ImmutableTable.class));
  assertTrue(ArbitraryInstances.get(RowSortedTable.class).isEmpty());
  assertEquals(ImmutableBiMap.of(), ArbitraryInstances.get(BiMap.class));
  assertEquals(ImmutableBiMap.of(), ArbitraryInstances.get(ImmutableBiMap.class));
  assertTrue(ArbitraryInstances.get(ImmutableClassToInstanceMap.class).isEmpty());
  assertTrue(ArbitraryInstances.get(ClassToInstanceMap.class).isEmpty());
  assertTrue(ArbitraryInstances.get(ListMultimap.class).isEmpty());
  assertTrue(ArbitraryInstances.get(ImmutableListMultimap.class).isEmpty());
  assertTrue(ArbitraryInstances.get(SetMultimap.class).isEmpty());
  assertTrue(ArbitraryInstances.get(ImmutableSetMultimap.class).isEmpty());
  assertTrue(ArbitraryInstances.get(MapDifference.class).areEqual());
  assertTrue(ArbitraryInstances.get(SortedMapDifference.class).areEqual());
  assertEquals(Range.all(), ArbitraryInstances.get(Range.class));
  assertTrue(ArbitraryInstances.get(NavigableSet.class).isEmpty());
  assertTrue(ArbitraryInstances.get(NavigableMap.class).isEmpty());
  assertTrue(ArbitraryInstances.get(LinkedList.class).isEmpty());
  assertTrue(ArbitraryInstances.get(Deque.class).isEmpty());
  assertTrue(ArbitraryInstances.get(Queue.class).isEmpty());
  assertTrue(ArbitraryInstances.get(PriorityQueue.class).isEmpty());
  assertTrue(ArbitraryInstances.get(BitSet.class).isEmpty());
  assertTrue(ArbitraryInstances.get(TreeSet.class).isEmpty());
  assertTrue(ArbitraryInstances.get(TreeMap.class).isEmpty());
  assertFreshInstanceReturned(
      LinkedList.class,
      Deque.class,
      Queue.class,
      PriorityQueue.class,
      BitSet.class,
      TreeSet.class,
      TreeMap.class);
}
项目:guava    文件:ArbitraryInstancesTest.java   
public void testGet_collections() {
  assertEquals(ImmutableSet.of().iterator(), ArbitraryInstances.get(Iterator.class));
  assertFalse(ArbitraryInstances.get(PeekingIterator.class).hasNext());
  assertFalse(ArbitraryInstances.get(ListIterator.class).hasNext());
  assertEquals(ImmutableSet.of(), ArbitraryInstances.get(Iterable.class));
  assertEquals(ImmutableSet.of(), ArbitraryInstances.get(Set.class));
  assertEquals(ImmutableSet.of(), ArbitraryInstances.get(ImmutableSet.class));
  assertEquals(ImmutableSortedSet.of(), ArbitraryInstances.get(SortedSet.class));
  assertEquals(ImmutableSortedSet.of(), ArbitraryInstances.get(ImmutableSortedSet.class));
  assertEquals(ImmutableList.of(), ArbitraryInstances.get(Collection.class));
  assertEquals(ImmutableList.of(), ArbitraryInstances.get(ImmutableCollection.class));
  assertEquals(ImmutableList.of(), ArbitraryInstances.get(List.class));
  assertEquals(ImmutableList.of(), ArbitraryInstances.get(ImmutableList.class));
  assertEquals(ImmutableMap.of(), ArbitraryInstances.get(Map.class));
  assertEquals(ImmutableMap.of(), ArbitraryInstances.get(ImmutableMap.class));
  assertEquals(ImmutableSortedMap.of(), ArbitraryInstances.get(SortedMap.class));
  assertEquals(ImmutableSortedMap.of(), ArbitraryInstances.get(ImmutableSortedMap.class));
  assertEquals(ImmutableMultiset.of(), ArbitraryInstances.get(Multiset.class));
  assertEquals(ImmutableMultiset.of(), ArbitraryInstances.get(ImmutableMultiset.class));
  assertTrue(ArbitraryInstances.get(SortedMultiset.class).isEmpty());
  assertEquals(ImmutableMultimap.of(), ArbitraryInstances.get(Multimap.class));
  assertEquals(ImmutableMultimap.of(), ArbitraryInstances.get(ImmutableMultimap.class));
  assertTrue(ArbitraryInstances.get(SortedSetMultimap.class).isEmpty());
  assertEquals(ImmutableTable.of(), ArbitraryInstances.get(Table.class));
  assertEquals(ImmutableTable.of(), ArbitraryInstances.get(ImmutableTable.class));
  assertTrue(ArbitraryInstances.get(RowSortedTable.class).isEmpty());
  assertEquals(ImmutableBiMap.of(), ArbitraryInstances.get(BiMap.class));
  assertEquals(ImmutableBiMap.of(), ArbitraryInstances.get(ImmutableBiMap.class));
  assertTrue(ArbitraryInstances.get(ImmutableClassToInstanceMap.class).isEmpty());
  assertTrue(ArbitraryInstances.get(ClassToInstanceMap.class).isEmpty());
  assertTrue(ArbitraryInstances.get(ListMultimap.class).isEmpty());
  assertTrue(ArbitraryInstances.get(ImmutableListMultimap.class).isEmpty());
  assertTrue(ArbitraryInstances.get(SetMultimap.class).isEmpty());
  assertTrue(ArbitraryInstances.get(ImmutableSetMultimap.class).isEmpty());
  assertTrue(ArbitraryInstances.get(MapDifference.class).areEqual());
  assertTrue(ArbitraryInstances.get(SortedMapDifference.class).areEqual());
  assertEquals(Range.all(), ArbitraryInstances.get(Range.class));
  assertTrue(ArbitraryInstances.get(NavigableSet.class).isEmpty());
  assertTrue(ArbitraryInstances.get(NavigableMap.class).isEmpty());
  assertTrue(ArbitraryInstances.get(LinkedList.class).isEmpty());
  assertTrue(ArbitraryInstances.get(Deque.class).isEmpty());
  assertTrue(ArbitraryInstances.get(Queue.class).isEmpty());
  assertTrue(ArbitraryInstances.get(PriorityQueue.class).isEmpty());
  assertTrue(ArbitraryInstances.get(BitSet.class).isEmpty());
  assertTrue(ArbitraryInstances.get(TreeSet.class).isEmpty());
  assertTrue(ArbitraryInstances.get(TreeMap.class).isEmpty());
  assertFreshInstanceReturned(
      LinkedList.class,
      Deque.class,
      Queue.class,
      PriorityQueue.class,
      BitSet.class,
      TreeSet.class,
      TreeMap.class);
}