微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

com.google.common.collect.testing.DerivedComparable的实例源码

项目:guava-mock    文件TreeMultimapNaturalTest.java   
@GwtIncompatible // SerializableTester
public void testTreeMultimapDerived() {
  TreeMultimap<DerivedComparable,DerivedComparable> multimap = TreeMultimap.create();
  assertEquals(ImmutableMultimap.of(),multimap);
  multimap.put(new DerivedComparable("foo"),new DerivedComparable("f"));
  multimap.put(new DerivedComparable("foo"),new DerivedComparable("o"));
  multimap.put(new DerivedComparable("foo"),new DerivedComparable("o"));
  multimap.put(new DerivedComparable("bar"),new DerivedComparable("b"));
  multimap.put(new DerivedComparable("bar"),new DerivedComparable("a"));
  multimap.put(new DerivedComparable("bar"),new DerivedComparable("r"));
  assertthat(multimap.keySet()).containsExactly(
      new DerivedComparable("bar"),new DerivedComparable("foo")).inorder();
  assertthat(multimap.values()).containsExactly(
      new DerivedComparable("a"),new DerivedComparable("b"),new DerivedComparable("r"),new DerivedComparable("f"),new DerivedComparable("o")).inorder();
  assertEquals(Ordering.natural(),multimap.keyComparator());
  assertEquals(Ordering.natural(),multimap.valueComparator());
  SerializableTester.reserializeAndAssert(multimap);
}
项目:googles-monorepo-demo    文件TreeMultimapNaturalTest.java   
@GwtIncompatible // SerializableTester
public void testTreeMultimapDerived() {
  TreeMultimap<DerivedComparable,multimap.valueComparator());
  SerializableTester.reserializeAndAssert(multimap);
}
项目:guava-libraries    文件TreeMultimapNaturalTest.java   
@GwtIncompatible("SerializableTester")
public void testTreeMultimapDerived() {
  TreeMultimap<DerivedComparable,multimap.valueComparator());
  SerializableTester.reserializeAndAssert(multimap);
}
项目:guava    文件TreeMultimapNaturalTest.java   
@GwtIncompatible // SerializableTester
public void testTreeMultimapDerived() {
  TreeMultimap<DerivedComparable,new DerivedComparable("r"));
  assertthat(multimap.keySet())
      .containsExactly(new DerivedComparable("bar"),new DerivedComparable("foo"))
      .inorder();
  assertthat(multimap.values())
      .containsExactly(
          new DerivedComparable("a"),new DerivedComparable("o"))
      .inorder();
  assertEquals(Ordering.natural(),multimap.valueComparator());
  SerializableTester.reserializeAndAssert(multimap);
}
项目:guava-mock    文件MultisetsTest.java   
public void testNewTreeMultisetDerived() {
  TreeMultiset<DerivedComparable> set = TreeMultiset.create();
  assertTrue(set.isEmpty());
  set.add(new DerivedComparable("foo"),2);
  set.add(new DerivedComparable("bar"),3);
  assertthat(set).containsExactly(
      new DerivedComparable("bar"),new DerivedComparable("bar"),new DerivedComparable("foo"),new DerivedComparable("foo")).inorder();
}
项目:googles-monorepo-demo    文件MultisetsTest.java   
public void testNewTreeMultisetDerived() {
  TreeMultiset<DerivedComparable> set = TreeMultiset.create();
  assertTrue(set.isEmpty());
  set.add(new DerivedComparable("foo"),new DerivedComparable("foo")).inorder();
}
项目:guava-libraries    文件MultisetsTest.java   
public void testNewTreeMultisetDerived() {
  TreeMultiset<DerivedComparable> set = TreeMultiset.create();
  assertTrue(set.isEmpty());
  set.add(new DerivedComparable("foo"),new DerivedComparable("foo")).inorder();
}
项目:guava    文件MultisetsTest.java   
public void testNewTreeMultisetDerived() {
  TreeMultiset<DerivedComparable> set = TreeMultiset.create();
  assertTrue(set.isEmpty());
  set.add(new DerivedComparable("foo"),3);
  assertthat(set)
      .containsExactly(
          new DerivedComparable("bar"),new DerivedComparable("foo"))
      .inorder();
}

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。