AbstractMultisetSetCountTester.java 文件源码

java
阅读 57 收藏 0 点赞 0 评论 0

项目:guava-mock 作者:
private void assertSetCount(E element, int count) {
  setCountCheckReturnValue(element, count);

  assertEquals(
      "multiset.count() should return the value passed to setCount()",
      count,
      getMultiset().count(element));

  int size = 0;
  for (Multiset.Entry<E> entry : getMultiset().entrySet()) {
    size += entry.getCount();
  }
  assertEquals(
      "multiset.size() should be the sum of the counts of all entries",
      size,
      getMultiset().size());
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号