项目:guava-mock
文件:ImmutableMapTest.java
@Override protected void assertMoreInvariants(Map<K,V> map) {
// Todo: can these be moved to MapInterfaceTest?
for (Entry<K,V> entry : map.entrySet()) {
assertEquals(entry.getKey() + "=" + entry.getValue(),entry.toString());
}
assertEquals("{" + joiner.join(map.entrySet()) + "}",map.toString());
assertEquals("[" + joiner.join(map.entrySet()) + "]",map.entrySet().toString());
assertEquals("[" + joiner.join(map.keySet()) + "]",map.keySet().toString());
assertEquals("[" + joiner.join(map.values()) + "]",map.values().toString());
assertEquals(MinimalSet.from(map.entrySet()),map.entrySet());
assertEquals(Sets.newHashSet(map.keySet()),map.keySet());
}
@Override protected void assertMoreInvariants(Map<K,map.keySet());
}
项目:miniguava
文件:ImmutableMapTest.java
@Override protected void assertMoreInvariants(Map<K,map.entrySet());
assertEquals(new HashSet<K>(map.keySet()),map.keySet());
}
项目:guava-libraries
文件:ImmutableMapTest.java
@Override protected void assertMoreInvariants(Map<K,map.keySet());
}
项目:guava-mock
文件:SetEqualsTester.java
@CollectionSize.Require(absent = CollectionSize.ZERO)
public void testEquals_otherSetWithDifferentElements() {
Collection<E> elements = getSampleElements(getNumElements() - 1);
elements.add(getSubjectGenerator().samples().e3());
assertFalse(
"A Set should not equal another Set containing different elements.",getSet().equals(MinimalSet.from(elements)));
}
项目:guava-mock
文件:SetEqualsTester.java
@CollectionSize.Require(absent = CollectionSize.ZERO)
@CollectionFeature.Require(ALLOWS_NULL_VALUES)
public void testEquals_containingNull() {
Collection<E> elements = getSampleElements(getNumElements() - 1);
elements.add(null);
collection = getSubjectGenerator().create(elements.toArray());
assertTrue(
"A Set should equal any other Set containing the same elements,"
+ " even if some elements are null.",getSet().equals(MinimalSet.from(elements)));
}
项目:guava-mock
文件:SetEqualsTester.java
@CollectionSize.Require(absent = CollectionSize.ZERO)
public void testEquals_otherContainsNull() {
Collection<E> elements = getSampleElements(getNumElements() - 1);
elements.add(null);
Set<E> other = MinimalSet.from(elements);
assertFalse(
"Two Sets should not be equal if exactly one of them contains null.",getSet().equals(other));
}
项目:guava-mock
文件:SetEqualsTester.java
@CollectionSize.Require(absent = CollectionSize.ZERO)
public void testEquals_smallerSet() {
Collection<E> fewerElements = getSampleElements(getNumElements() - 1);
assertFalse(
"Sets of different sizes should not be equal.",getSet().equals(MinimalSet.from(fewerElements)));
}
@CollectionSize.Require(absent = CollectionSize.ZERO)
public void testEquals_otherSetWithDifferentElements() {
Collection<E> elements = getSampleElements(getNumElements() - 1);
elements.add(getSubjectGenerator().samples().e3());
assertFalse(
"A Set should not equal another Set containing different elements.",getSet().equals(MinimalSet.from(elements)));
}
@CollectionSize.Require(absent = CollectionSize.ZERO)
@CollectionFeature.Require(ALLOWS_NULL_VALUES)
public void testEquals_containingNull() {
Collection<E> elements = getSampleElements(getNumElements() - 1);
elements.add(null);
collection = getSubjectGenerator().create(elements.toArray());
assertTrue(
"A Set should equal any other Set containing the same elements,getSet().equals(MinimalSet.from(elements)));
}
@CollectionSize.Require(absent = CollectionSize.ZERO)
public void testEquals_otherContainsNull() {
Collection<E> elements = getSampleElements(getNumElements() - 1);
elements.add(null);
Set<E> other = MinimalSet.from(elements);
assertFalse(
"Two Sets should not be equal if exactly one of them contains null.",getSet().equals(other));
}
@CollectionSize.Require(absent = CollectionSize.ZERO)
public void testEquals_smallerSet() {
Collection<E> fewerElements = getSampleElements(getNumElements() - 1);
assertFalse(
"Sets of different sizes should not be equal.",getSet().equals(MinimalSet.from(fewerElements)));
}
项目:guava-libraries
文件:SetEqualsTester.java
@CollectionSize.Require(absent = CollectionSize.ZERO)
public void testEquals_otherSetWithDifferentElements() {
Collection<E> elements = getSampleElements(getNumElements() - 1);
elements.add(getSubjectGenerator().samples().e3());
assertFalse(
"A Set should not equal another Set containing different elements.",getSet().equals(MinimalSet.from(elements))
);
}
项目:guava-libraries
文件:SetEqualsTester.java
@CollectionSize.Require(absent = CollectionSize.ZERO)
@CollectionFeature.Require(ALLOWS_NULL_VALUES)
public void testEquals_containingNull() {
Collection<E> elements = getSampleElements(getNumElements() - 1);
elements.add(null);
collection = getSubjectGenerator().create(elements.toArray());
assertTrue("A Set should equal any other Set containing the same elements,"
+ " even if some elements are null.",getSet().equals(MinimalSet.from(elements)));
}
项目:guava-libraries
文件:SetEqualsTester.java
@CollectionSize.Require(absent = CollectionSize.ZERO)
public void testEquals_otherContainsNull() {
Collection<E> elements = getSampleElements(getNumElements() - 1);
elements.add(null);
Set<E> other = MinimalSet.from(elements);
assertFalse(
"Two Sets should not be equal if exactly one of them contains null.",getSet().equals(other));
}
项目:guava
文件:SetEqualsTester.java
@CollectionSize.Require(absent = CollectionSize.ZERO)
public void testEquals_otherSetWithDifferentElements() {
Collection<E> elements = getSampleElements(getNumElements() - 1);
elements.add(getSubjectGenerator().samples().e3());
assertFalse(
"A Set should not equal another Set containing different elements.",getSet().equals(MinimalSet.from(elements)));
}
项目:guava
文件:SetEqualsTester.java
@CollectionSize.Require(absent = CollectionSize.ZERO)
@CollectionFeature.Require(ALLOWS_NULL_VALUES)
public void testEquals_containingNull() {
Collection<E> elements = getSampleElements(getNumElements() - 1);
elements.add(null);
collection = getSubjectGenerator().create(elements.toArray());
assertTrue(
"A Set should equal any other Set containing the same elements,getSet().equals(MinimalSet.from(elements)));
}
项目:guava
文件:SetEqualsTester.java
@CollectionSize.Require(absent = CollectionSize.ZERO)
public void testEquals_otherContainsNull() {
Collection<E> elements = getSampleElements(getNumElements() - 1);
elements.add(null);
Set<E> other = MinimalSet.from(elements);
assertFalse(
"Two Sets should not be equal if exactly one of them contains null.",getSet().equals(other));
}
项目:guava
文件:SetEqualsTester.java
@CollectionSize.Require(absent = CollectionSize.ZERO)
public void testEquals_smallerSet() {
Collection<E> fewerElements = getSampleElements(getNumElements() - 1);
assertFalse(
"Sets of different sizes should not be equal.",getSet().equals(MinimalSet.from(fewerElements)));
}
项目:guava
文件:ImmutableMapTest.java
@Override
protected void assertMoreInvariants(Map<K,map.keySet());
}
项目:guava-mock
文件:ListEqualsTester.java
public void testEquals_set() {
assertFalse("A List should never equal a Set.",getList().equals(MinimalSet.from(getList())));
}
项目:guava-mock
文件:SetEqualsTester.java
public void testEquals_otherSetWithSameElements() {
assertTrue(
"A Set should equal any other Set containing the same elements.",getSet().equals(MinimalSet.from(getSampleElements())));
}
项目:guava-mock
文件:SetEqualsTester.java
public void testEquals_largerSet() {
Collection<E> moreElements = getSampleElements(getNumElements() + 1);
assertFalse(
"Sets of different sizes should not be equal.",getSet().equals(MinimalSet.from(moreElements)));
}
public void testEquals_set() {
assertFalse("A List should never equal a Set.",getList().equals(MinimalSet.from(getList())));
}
public void testEquals_otherSetWithSameElements() {
assertTrue(
"A Set should equal any other Set containing the same elements.",getSet().equals(MinimalSet.from(getSampleElements())));
}
public void testEquals_largerSet() {
Collection<E> moreElements = getSampleElements(getNumElements() + 1);
assertFalse(
"Sets of different sizes should not be equal.",getSet().equals(MinimalSet.from(moreElements)));
}
项目:guava-libraries
文件:ListEqualsTester.java
public void testEquals_set() {
assertFalse("A List should never equal a Set.",getList().equals(MinimalSet.from(getList())));
}
项目:guava-libraries
文件:SetEqualsTester.java
public void testEquals_otherSetWithSameElements() {
assertTrue(
"A Set should equal any other Set containing the same elements.",getSet().equals(MinimalSet.from(getSampleElements())));
}
项目:guava-libraries
文件:SetEqualsTester.java
@CollectionSize.Require(absent = CollectionSize.ZERO)
public void testEquals_smallerSet() {
Collection<E> fewerElements = getSampleElements(getNumElements() - 1);
assertFalse("Sets of different sizes should not be equal.",getSet().equals(MinimalSet.from(fewerElements)));
}
项目:guava-libraries
文件:SetEqualsTester.java
public void testEquals_largerSet() {
Collection<E> moreElements = getSampleElements(getNumElements() + 1);
assertFalse("Sets of different sizes should not be equal.",getSet().equals(MinimalSet.from(moreElements)));
}
项目:guava
文件:ListEqualsTester.java
public void testEquals_set() {
assertFalse("A List should never equal a Set.",getList().equals(MinimalSet.from(getList())));
}
项目:guava
文件:SetEqualsTester.java
public void testEquals_otherSetWithSameElements() {
assertTrue(
"A Set should equal any other Set containing the same elements.",getSet().equals(MinimalSet.from(getSampleElements())));
}
项目:guava
文件:SetEqualsTester.java
public void testEquals_largerSet() {
Collection<E> moreElements = getSampleElements(getNumElements() + 1);
assertFalse(
"Sets of different sizes should not be equal.",getSet().equals(MinimalSet.from(moreElements)));
}
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。