项目:guava-mock
文件:TestsForSetsInJavaUtil.java
public Test testsForCheckedNavigableSet() {
return SortedSetTestSuiteBuilder.using(
new TestStringSortedSetGenerator() {
@Override
public NavigableSet<String> create(String[] elements) {
NavigableSet<String> innerSet = new TreeSet<String>();
Collections.addAll(innerSet,elements);
return Collections.checkedNavigableSet(innerSet,String.class);
}
})
.named("checkedNavigableSet/TreeSet,natural")
.withFeatures(
SetFeature.GENERAL_PURPOSE,CollectionFeature.KNOWN_ORDER,CollectionFeature.SERIALIZABLE,CollectionFeature.FAILS_FAST_ON_CONCURRENT_MODIFICATION,CollectionFeature.RESTRICTS_ELEMENTS,CollectionSize.ANY)
.suppressing(suppressForCheckedNavigableSet())
.createTestSuite();
}
项目:guava-mock
文件:TestsForSetsInJavaUtil.java
public Test testsForHashSet() {
return SetTestSuiteBuilder.using(
new TestStringSetGenerator() {
@Override
public Set<String> create(String[] elements) {
return new HashSet<String>(MinimalCollection.of(elements));
}
})
.named("HashSet")
.withFeatures(
SetFeature.GENERAL_PURPOSE,CollectionFeature.ALLOWS_NULL_VALUES,CollectionSize.ANY)
.suppressing(suppressForHashSet())
.createTestSuite();
}
项目:guava-mock
文件:TestsForSetsInJavaUtil.java
public Test testsForLinkedHashSet() {
return SetTestSuiteBuilder.using(
new TestStringSetGenerator() {
@Override
public Set<String> create(String[] elements) {
return new LinkedHashSet<String>(MinimalCollection.of(elements));
}
})
.named("LinkedHashSet")
.withFeatures(
SetFeature.GENERAL_PURPOSE,CollectionSize.ANY)
.suppressing(suppressForLinkedHashSet())
.createTestSuite();
}
项目:guava-mock
文件:TestsForSetsInJavaUtil.java
public Test testsForEnumSet() {
return SetTestSuiteBuilder.using(
new TestEnumSetGenerator() {
@Override
public Set<AnEnum> create(AnEnum[] elements) {
return (elements.length == 0)
? EnumSet.noneOf(AnEnum.class)
: EnumSet.copyOf(MinimalCollection.of(elements));
}
})
.named("EnumSet")
.withFeatures(
SetFeature.GENERAL_PURPOSE,CollectionSize.ANY)
.suppressing(suppressForEnumSet())
.createTestSuite();
}
项目:guava-mock
文件:TestsForSetsInJavaUtil.java
/**
* Tests regular NavigableSet behavior of synchronizedNavigableSet(treeSet);
* does not test the fact that it's synchronized.
*/
public Test testsForSynchronizedNavigableSet() {
return NavigableSetTestSuiteBuilder.using(
new TestStringSortedSetGenerator() {
@Override
public SortedSet<String> create(String[] elements) {
NavigableSet<String> delegate = new TreeSet<>(MinimalCollection.of(elements));
return Collections.synchronizedNavigableSet(delegate);
}
})
.named("synchronizedNavigableSet/TreeSet,CollectionSize.ANY)
.suppressing(suppressForSynchronizedNavigableSet())
.createTestSuite();
}
项目:guava-mock
文件:TestsForSetsInJavaUtil.java
public Test testsForTreeSetNatural() {
return NavigableSetTestSuiteBuilder.using(
new TestStringSortedSetGenerator() {
@Override
public SortedSet<String> create(String[] elements) {
return new TreeSet<String>(MinimalCollection.of(elements));
}
})
.named("TreeSet,CollectionSize.ANY)
.suppressing(suppressForTreeSetNatural())
.createTestSuite();
}
项目:guava-mock
文件:TestsForSetsInJavaUtil.java
public Test testsForTreeSetWithComparator() {
return NavigableSetTestSuiteBuilder.using(
new TestStringSortedSetGenerator() {
@Override
public SortedSet<String> create(String[] elements) {
SortedSet<String> set = new TreeSet<String>(arbitraryNullFriendlyComparator());
Collections.addAll(set,elements);
return set;
}
})
.named("TreeSet,with comparator")
.withFeatures(
SetFeature.GENERAL_PURPOSE,CollectionSize.ANY)
.suppressing(suppressForTreeSetWithComparator())
.createTestSuite();
}
项目:guava-mock
文件:TestsForSetsInJavaUtil.java
public Test testsForCheckedSet() {
return SetTestSuiteBuilder.using(
new TestStringSetGenerator() {
@Override
public Set<String> create(String[] elements) {
Set<String> innerSet = new HashSet<String>();
Collections.addAll(innerSet,elements);
return Collections.checkedSet(innerSet,String.class);
}
})
.named("checkedSet/HashSet")
.withFeatures(
SetFeature.GENERAL_PURPOSE,CollectionSize.ANY)
.suppressing(suppressForCheckedSet())
.createTestSuite();
}
项目:guava-mock
文件:TestsForSetsInJavaUtil.java
public Test testsForCheckedSortedSet() {
return SortedSetTestSuiteBuilder.using(
new TestStringSortedSetGenerator() {
@Override
public SortedSet<String> create(String[] elements) {
SortedSet<String> innerSet = new TreeSet<String>();
Collections.addAll(innerSet,elements);
return Collections.checkedSortedSet(innerSet,String.class);
}
})
.named("checkedSortedSet/TreeSet,CollectionSize.ANY)
.suppressing(suppressForCheckedSortedSet())
.createTestSuite();
}
项目:guava-mock
文件:TestsForSetsInJavaUtil.java
public Test testsForBadlyCollidingHashSet() {
return SetTestSuiteBuilder.using(
new TestCollidingSetGenerator() {
@Override
public Set<Object> create(Object... elements) {
return new HashSet<Object>(MinimalCollection.of(elements));
}
})
.named("badly colliding HashSet")
.withFeatures(
SetFeature.GENERAL_PURPOSE,CollectionSize.SEVERAL)
.suppressing(suppressForHashSet())
.createTestSuite();
}
项目:guava-mock
文件:TestsForSetsInJavaUtil.java
public Test testsForConcurrentSkipListSetNatural() {
return SetTestSuiteBuilder.using(
new TestStringSortedSetGenerator() {
@Override
public SortedSet<String> create(String[] elements) {
return new ConcurrentSkipListSet<String>(MinimalCollection.of(elements));
}
})
.named("ConcurrentSkipListSet,CollectionSize.ANY)
.suppressing(suppressForConcurrentSkipListSetNatural())
.createTestSuite();
}
项目:guava-mock
文件:TestsForSetsInJavaUtil.java
public Test testsForConcurrentSkipListSetWithComparator() {
return SetTestSuiteBuilder.using(
new TestStringSortedSetGenerator() {
@Override
public SortedSet<String> create(String[] elements) {
SortedSet<String> set =
new ConcurrentSkipListSet<String>(arbitraryNullFriendlyComparator());
Collections.addAll(set,elements);
return set;
}
})
.named("ConcurrentSkipListSet,CollectionSize.ANY)
.suppressing(suppressForConcurrentSkipListSetWithComparator())
.createTestSuite();
}
项目:googles-monorepo-demo
文件:TestsForSetsInJavaUtil.java
public Test testsForCheckedNavigableSet() {
return SortedSetTestSuiteBuilder.using(
new TestStringSortedSetGenerator() {
@Override
public NavigableSet<String> create(String[] elements) {
NavigableSet<String> innerSet = new TreeSet<String>();
Collections.addAll(innerSet,CollectionSize.ANY)
.suppressing(suppressForCheckedNavigableSet())
.createTestSuite();
}
项目:googles-monorepo-demo
文件:TestsForSetsInJavaUtil.java
public Test testsForHashSet() {
return SetTestSuiteBuilder.using(
new TestStringSetGenerator() {
@Override
public Set<String> create(String[] elements) {
return new HashSet<String>(MinimalCollection.of(elements));
}
})
.named("HashSet")
.withFeatures(
SetFeature.GENERAL_PURPOSE,CollectionSize.ANY)
.suppressing(suppressForHashSet())
.createTestSuite();
}
项目:googles-monorepo-demo
文件:TestsForSetsInJavaUtil.java
public Test testsForLinkedHashSet() {
return SetTestSuiteBuilder.using(
new TestStringSetGenerator() {
@Override
public Set<String> create(String[] elements) {
return new LinkedHashSet<String>(MinimalCollection.of(elements));
}
})
.named("LinkedHashSet")
.withFeatures(
SetFeature.GENERAL_PURPOSE,CollectionSize.ANY)
.suppressing(suppressForLinkedHashSet())
.createTestSuite();
}
项目:googles-monorepo-demo
文件:TestsForSetsInJavaUtil.java
public Test testsForEnumSet() {
return SetTestSuiteBuilder.using(
new TestEnumSetGenerator() {
@Override
public Set<AnEnum> create(AnEnum[] elements) {
return (elements.length == 0)
? EnumSet.noneOf(AnEnum.class)
: EnumSet.copyOf(MinimalCollection.of(elements));
}
})
.named("EnumSet")
.withFeatures(
SetFeature.GENERAL_PURPOSE,CollectionSize.ANY)
.suppressing(suppressForEnumSet())
.createTestSuite();
}
项目:googles-monorepo-demo
文件:TestsForSetsInJavaUtil.java
/**
* Tests regular NavigableSet behavior of synchronizedNavigableSet(treeSet);
* does not test the fact that it's synchronized.
*/
public Test testsForSynchronizedNavigableSet() {
return NavigableSetTestSuiteBuilder.using(
new TestStringSortedSetGenerator() {
@Override
public SortedSet<String> create(String[] elements) {
NavigableSet<String> delegate = new TreeSet<>(MinimalCollection.of(elements));
return Collections.synchronizedNavigableSet(delegate);
}
})
.named("synchronizedNavigableSet/TreeSet,CollectionSize.ANY)
.suppressing(suppressForSynchronizedNavigableSet())
.createTestSuite();
}
项目:googles-monorepo-demo
文件:TestsForSetsInJavaUtil.java
public Test testsForTreeSetNatural() {
return NavigableSetTestSuiteBuilder.using(
new TestStringSortedSetGenerator() {
@Override
public SortedSet<String> create(String[] elements) {
return new TreeSet<String>(MinimalCollection.of(elements));
}
})
.named("TreeSet,CollectionSize.ANY)
.suppressing(suppressForTreeSetNatural())
.createTestSuite();
}
项目:googles-monorepo-demo
文件:TestsForSetsInJavaUtil.java
public Test testsForTreeSetWithComparator() {
return NavigableSetTestSuiteBuilder.using(
new TestStringSortedSetGenerator() {
@Override
public SortedSet<String> create(String[] elements) {
SortedSet<String> set = new TreeSet<String>(arbitraryNullFriendlyComparator());
Collections.addAll(set,CollectionSize.ANY)
.suppressing(suppressForTreeSetWithComparator())
.createTestSuite();
}
项目:googles-monorepo-demo
文件:TestsForSetsInJavaUtil.java
public Test testsForCheckedSet() {
return SetTestSuiteBuilder.using(
new TestStringSetGenerator() {
@Override
public Set<String> create(String[] elements) {
Set<String> innerSet = new HashSet<String>();
Collections.addAll(innerSet,CollectionSize.ANY)
.suppressing(suppressForCheckedSet())
.createTestSuite();
}
项目:googles-monorepo-demo
文件:TestsForSetsInJavaUtil.java
public Test testsForCheckedSortedSet() {
return SortedSetTestSuiteBuilder.using(
new TestStringSortedSetGenerator() {
@Override
public SortedSet<String> create(String[] elements) {
SortedSet<String> innerSet = new TreeSet<String>();
Collections.addAll(innerSet,CollectionSize.ANY)
.suppressing(suppressForCheckedSortedSet())
.createTestSuite();
}
项目:googles-monorepo-demo
文件:TestsForSetsInJavaUtil.java
public Test testsForBadlyCollidingHashSet() {
return SetTestSuiteBuilder.using(
new TestCollidingSetGenerator() {
@Override
public Set<Object> create(Object... elements) {
return new HashSet<Object>(MinimalCollection.of(elements));
}
})
.named("badly colliding HashSet")
.withFeatures(
SetFeature.GENERAL_PURPOSE,CollectionSize.SEVERAL)
.suppressing(suppressForHashSet())
.createTestSuite();
}
项目:googles-monorepo-demo
文件:TestsForSetsInJavaUtil.java
public Test testsForConcurrentSkipListSetNatural() {
return SetTestSuiteBuilder.using(
new TestStringSortedSetGenerator() {
@Override
public SortedSet<String> create(String[] elements) {
return new ConcurrentSkipListSet<String>(MinimalCollection.of(elements));
}
})
.named("ConcurrentSkipListSet,CollectionSize.ANY)
.suppressing(suppressForConcurrentSkipListSetNatural())
.createTestSuite();
}
项目:googles-monorepo-demo
文件:TestsForSetsInJavaUtil.java
public Test testsForConcurrentSkipListSetWithComparator() {
return SetTestSuiteBuilder.using(
new TestStringSortedSetGenerator() {
@Override
public SortedSet<String> create(String[] elements) {
SortedSet<String> set =
new ConcurrentSkipListSet<String>(arbitraryNullFriendlyComparator());
Collections.addAll(set,CollectionSize.ANY)
.suppressing(suppressForConcurrentSkipListSetWithComparator())
.createTestSuite();
}
项目:guava-libraries
文件:TestsForSetsInJavaUtil.java
public Test testsForHashSet() {
return SetTestSuiteBuilder
.using(new TestStringSetGenerator() {
@Override public Set<String> create(String[] elements) {
return new HashSet<String>(MinimalCollection.of(elements));
}
})
.named("HashSet")
.withFeatures(
SetFeature.GENERAL_PURPOSE,CollectionSize.ANY)
.suppressing(suppressForHashSet())
.createTestSuite();
}
项目:guava-libraries
文件:TestsForSetsInJavaUtil.java
public Test testsForLinkedHashSet() {
return SetTestSuiteBuilder
.using(new TestStringSetGenerator() {
@Override public Set<String> create(String[] elements) {
return new LinkedHashSet<String>(MinimalCollection.of(elements));
}
})
.named("LinkedHashSet")
.withFeatures(
SetFeature.GENERAL_PURPOSE,CollectionSize.ANY)
.suppressing(suppressForLinkedHashSet())
.createTestSuite();
}
项目:guava-libraries
文件:TestsForSetsInJavaUtil.java
public Test testsForEnumSet() {
return SetTestSuiteBuilder
.using(new TestEnumSetGenerator() {
@Override public Set<AnEnum> create(AnEnum[] elements) {
return (elements.length == 0)
? EnumSet.noneOf(AnEnum.class)
: EnumSet.copyOf(MinimalCollection.of(elements));
}
})
.named("EnumSet")
.withFeatures(
SetFeature.GENERAL_PURPOSE,CollectionSize.ANY)
.suppressing(suppressForEnumSet())
.createTestSuite();
}
项目:guava-libraries
文件:TestsForSetsInJavaUtil.java
public Test testsForTreeSetNatural() {
return NavigableSetTestSuiteBuilder
.using(new TestStringSortedSetGenerator() {
@Override public SortedSet<String> create(String[] elements) {
return new TreeSet<String>(MinimalCollection.of(elements));
}
})
.named("TreeSet,CollectionSize.ANY)
.suppressing(suppressForTreeSetNatural())
.createTestSuite();
}
项目:guava-libraries
文件:TestsForSetsInJavaUtil.java
public Test testsForTreeSetWithComparator() {
return NavigableSetTestSuiteBuilder
.using(new TestStringSortedSetGenerator() {
@Override public SortedSet<String> create(String[] elements) {
SortedSet<String> set
= new TreeSet<String>(arbitraryNullFriendlyComparator());
Collections.addAll(set,elements);
return set;
}
})
.named("TreeSet,CollectionSize.ANY)
.suppressing(suppressForTreeSetWithComparator())
.createTestSuite();
}
项目:guava-libraries
文件:TestsForSetsInJavaUtil.java
public Test testsForCheckedSet() {
return SetTestSuiteBuilder
.using(new TestStringSetGenerator() {
@Override public Set<String> create(String[] elements) {
Set<String> innerSet = new HashSet<String>();
Collections.addAll(innerSet,elements);
return Collections.checkedSet(innerSet,String.class);
}
})
.named("checkedSet/HashSet")
.withFeatures(
SetFeature.GENERAL_PURPOSE,CollectionSize.ANY)
.suppressing(suppressForCheckedSet())
.createTestSuite();
}
项目:guava-libraries
文件:TestsForSetsInJavaUtil.java
public Test testsForBadlyCollidingHashSet() {
return SetTestSuiteBuilder
.using(new TestCollidingSetGenerator() {
@Override
public Set<Object> create(Object... elements) {
return new HashSet<Object>(MinimalCollection.of(elements));
}
})
.named("badly colliding HashSet")
.withFeatures(
SetFeature.GENERAL_PURPOSE,CollectionSize.SEVERAL)
.suppressing(suppressForHashSet())
.createTestSuite();
}
项目:guava-libraries
文件:TestsForSetsInJavaUtil.java
public Test testsForConcurrentSkipListSetNatural() {
return SetTestSuiteBuilder
.using(new TestStringSortedSetGenerator() {
@Override public SortedSet<String> create(String[] elements) {
return new ConcurrentSkipListSet<String>(MinimalCollection.of(elements));
}
})
.named("ConcurrentSkipListSet,CollectionSize.ANY)
.suppressing(suppressForConcurrentSkipListSetNatural())
.createTestSuite();
}
项目:guava-libraries
文件:TestsForSetsInJavaUtil.java
public Test testsForConcurrentSkipListSetWithComparator() {
return SetTestSuiteBuilder
.using(new TestStringSortedSetGenerator() {
@Override public SortedSet<String> create(String[] elements) {
SortedSet<String> set
= new ConcurrentSkipListSet<String>(arbitraryNullFriendlyComparator());
Collections.addAll(set,elements);
return set;
}
})
.named("ConcurrentSkipListSet,CollectionSize.ANY)
.suppressing(suppressForConcurrentSkipListSetWithComparator())
.createTestSuite();
}
项目:NetworkParser
文件:GuavaTest.java
public Test testsForHashSet() {
return SetTestSuiteBuilder
.using(new TestStringSetGenerator() {
@SuppressWarnings("unchecked")
@Override public Set<String> create(String[] elements) {
Set<String> list = new HashSet<String>();
list.addAll(MinimalCollection.of(elements));
return list;
}
})
.named("HashSet")
.withFeatures(
SetFeature.GENERAL_PURPOSE,CollectionSize.ANY)
.suppressing(suppressForHashSet())
.createTestSuite();
// CollectionFeature.ALLOWS_NULL_VALUES,// CollectionFeature.SERIALIZABLE,}
项目:NetworkParser
文件:GuavaTest.java
public Test testsForSimpleList() {
return SetTestSuiteBuilder
.using(new TestStringSetGenerator() {
@SuppressWarnings("unchecked")
@Override public Set<String> create(String[] elements) {
// return (Set<String>) new HashSet<String>();
return (Set<String>) new SimpleSet<String>().withList(MinimalCollection.of(elements));
}
})
.named("SimpleList")
.withFeatures(
SetFeature.GENERAL_PURPOSE,}
项目:pareto4j
文件:ParetoHashSetTestSuite.java
public static TestSuite suite() throws Exception {
return SetTestSuiteBuilder.using(new TestStringSetGenerator() {
@Override
protected Set<String> create(String[] elements) {
ParetoHashSet s = new ParetoHashSet();
for (String element : elements) {
s.add(element);
}
return s;
}
})
.named("ParetoHashSetTestSuite")
.withFeatures(SetFeature.GENERAL_PURPOSE,CollectionSize.ANY,CollectionFeature.ALLOWS_NULL_QUERIES,CollectionFeature.REMOVE_OPERATIONS,CollectionFeature.SERIALIZABLE)
.createTestSuite();
}
项目:guava
文件:TestsForSetsInJavaUtil.java
public Test testsForCheckedNavigableSet() {
return SortedSetTestSuiteBuilder.using(
new TestStringSortedSetGenerator() {
@Override
public NavigableSet<String> create(String[] elements) {
NavigableSet<String> innerSet = new TreeSet<>();
Collections.addAll(innerSet,elements);
return Collections.checkedNavigableSet(innerSet,String.class);
}
})
.named("checkedNavigableSet/TreeSet,CollectionSize.ANY)
.suppressing(suppressForCheckedNavigableSet())
.createTestSuite();
}
项目:guava
文件:TestsForSetsInJavaUtil.java
public Test testsForHashSet() {
return SetTestSuiteBuilder.using(
new TestStringSetGenerator() {
@Override
public Set<String> create(String[] elements) {
return new HashSet<>(MinimalCollection.of(elements));
}
})
.named("HashSet")
.withFeatures(
SetFeature.GENERAL_PURPOSE,CollectionSize.ANY)
.suppressing(suppressForHashSet())
.createTestSuite();
}
项目:guava
文件:TestsForSetsInJavaUtil.java
public Test testsForLinkedHashSet() {
return SetTestSuiteBuilder.using(
new TestStringSetGenerator() {
@Override
public Set<String> create(String[] elements) {
return new LinkedHashSet<>(MinimalCollection.of(elements));
}
})
.named("LinkedHashSet")
.withFeatures(
SetFeature.GENERAL_PURPOSE,CollectionSize.ANY)
.suppressing(suppressForLinkedHashSet())
.createTestSuite();
}
项目:guava
文件:TestsForSetsInJavaUtil.java
public Test testsForEnumSet() {
return SetTestSuiteBuilder.using(
new TestEnumSetGenerator() {
@Override
public Set<AnEnum> create(AnEnum[] elements) {
return (elements.length == 0)
? EnumSet.noneOf(AnEnum.class)
: EnumSet.copyOf(MinimalCollection.of(elements));
}
})
.named("EnumSet")
.withFeatures(
SetFeature.GENERAL_PURPOSE,CollectionSize.ANY)
.suppressing(suppressForEnumSet())
.createTestSuite();
}
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。