本文整理汇总了Java中com.google.common.collect.testing.TestStringCollectionGenerator类的典型用法代码示例。如果您正苦于以下问题:Java TestStringCollectionGenerator类的具体用法?Java TestStringCollectionGenerator怎么用?Java TestStringCollectionGenerator使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
TestStringCollectionGenerator类属于com.google.common.collect.testing包,在下文中一共展示了TestStringCollectionGenerator类的18个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: testsForFilter
点赞 3
import com.google.common.collect.testing.TestStringCollectionGenerator; //导入依赖的package包/类
@GwtIncompatible // suite
private static Test testsForFilter() {
return CollectionTestSuiteBuilder.using(
new TestStringCollectionGenerator() {
@Override public Collection<String> create(String[] elements) {
List<String> unfiltered = newArrayList();
unfiltered.add("yyy");
Collections.addAll(unfiltered, elements);
unfiltered.add("zzz");
return Collections2.filter(unfiltered, NOT_YYY_ZZZ);
}
})
.named("Collections2.filter")
.withFeatures(
CollectionFeature.SUPPORTS_ADD,
CollectionFeature.SUPPORTS_REMOVE,
CollectionFeature.ALLOWS_NULL_VALUES,
CollectionFeature.KNOWN_ORDER,
CollectionSize.ANY)
.createTestSuite();
}
开发者ID:zugzug90,
项目名称:guava-mock,
代码行数:22,
代码来源:Collections2Test.java
示例2: testsForFilterAll
点赞 3
import com.google.common.collect.testing.TestStringCollectionGenerator; //导入依赖的package包/类
@GwtIncompatible // suite
private static Test testsForFilterAll() {
return CollectionTestSuiteBuilder.using(
new TestStringCollectionGenerator() {
@Override public Collection<String> create(String[] elements) {
List<String> unfiltered = newArrayList();
Collections.addAll(unfiltered, elements);
return Collections2.filter(unfiltered, NOT_YYY_ZZZ);
}
})
.named("Collections2.filter")
.withFeatures(
CollectionFeature.SUPPORTS_ADD,
CollectionFeature.SUPPORTS_REMOVE,
CollectionFeature.ALLOWS_NULL_VALUES,
CollectionFeature.KNOWN_ORDER,
CollectionSize.ANY)
.createTestSuite();
}
开发者ID:zugzug90,
项目名称:guava-mock,
代码行数:20,
代码来源:Collections2Test.java
示例3: testsForFilterLinkedList
点赞 3
import com.google.common.collect.testing.TestStringCollectionGenerator; //导入依赖的package包/类
@GwtIncompatible // suite
private static Test testsForFilterLinkedList() {
return CollectionTestSuiteBuilder.using(
new TestStringCollectionGenerator() {
@Override public Collection<String> create(String[] elements) {
List<String> unfiltered = newLinkedList();
unfiltered.add("yyy");
Collections.addAll(unfiltered, elements);
unfiltered.add("zzz");
return Collections2.filter(unfiltered, NOT_YYY_ZZZ);
}
})
.named("Collections2.filter")
.withFeatures(
CollectionFeature.SUPPORTS_ADD,
CollectionFeature.SUPPORTS_REMOVE,
CollectionFeature.ALLOWS_NULL_VALUES,
CollectionFeature.KNOWN_ORDER,
CollectionSize.ANY)
.createTestSuite();
}
开发者ID:zugzug90,
项目名称:guava-mock,
代码行数:22,
代码来源:Collections2Test.java
示例4: testsForFilterNoNulls
点赞 3
import com.google.common.collect.testing.TestStringCollectionGenerator; //导入依赖的package包/类
@GwtIncompatible // suite
private static Test testsForFilterNoNulls() {
return CollectionTestSuiteBuilder.using(
new TestStringCollectionGenerator() {
@Override public Collection<String> create(String[] elements) {
List<String> unfiltered = newArrayList();
unfiltered.add("yyy");
unfiltered.addAll(ImmutableList.copyOf(elements));
unfiltered.add("zzz");
return Collections2.filter(unfiltered, LENGTH_1);
}
})
.named("Collections2.filter, no nulls")
.withFeatures(
CollectionFeature.SUPPORTS_ADD,
CollectionFeature.SUPPORTS_REMOVE,
CollectionFeature.ALLOWS_NULL_QUERIES,
CollectionFeature.KNOWN_ORDER,
CollectionSize.ANY)
.createTestSuite();
}
开发者ID:zugzug90,
项目名称:guava-mock,
代码行数:22,
代码来源:Collections2Test.java
示例5: testsForFilterFiltered
点赞 3
import com.google.common.collect.testing.TestStringCollectionGenerator; //导入依赖的package包/类
@GwtIncompatible // suite
private static Test testsForFilterFiltered() {
return CollectionTestSuiteBuilder.using(
new TestStringCollectionGenerator() {
@Override public Collection<String> create(String[] elements) {
List<String> unfiltered = newArrayList();
unfiltered.add("yyy");
unfiltered.addAll(ImmutableList.copyOf(elements));
unfiltered.add("zzz");
unfiltered.add("abc");
return Collections2.filter(
Collections2.filter(unfiltered, LENGTH_1), NOT_YYY_ZZZ);
}
})
.named("Collections2.filter, filtered input")
.withFeatures(
CollectionFeature.SUPPORTS_ADD,
CollectionFeature.SUPPORTS_REMOVE,
CollectionFeature.KNOWN_ORDER,
CollectionFeature.ALLOWS_NULL_QUERIES,
CollectionSize.ANY)
.createTestSuite();
}
开发者ID:zugzug90,
项目名称:guava-mock,
代码行数:24,
代码来源:Collections2Test.java
示例6: testsForTransform
点赞 3
import com.google.common.collect.testing.TestStringCollectionGenerator; //导入依赖的package包/类
@GwtIncompatible // suite
private static Test testsForTransform() {
return CollectionTestSuiteBuilder.using(
new TestStringCollectionGenerator() {
@Override public Collection<String> create(String[] elements) {
List<String> list = newArrayList();
for (String element : elements) {
list.add((element == null) ? null : "q" + element);
}
return Collections2.transform(list, REMOVE_FIRST_CHAR);
}
})
.named("Collections2.transform")
.withFeatures(
CollectionFeature.REMOVE_OPERATIONS,
CollectionFeature.ALLOWS_NULL_VALUES,
CollectionFeature.KNOWN_ORDER,
CollectionSize.ANY)
.createTestSuite();
}
开发者ID:zugzug90,
项目名称:guava-mock,
代码行数:21,
代码来源:Collections2Test.java
示例7: testsForFilter
点赞 3
import com.google.common.collect.testing.TestStringCollectionGenerator; //导入依赖的package包/类
@GwtIncompatible("suite")
private static Test testsForFilter() {
return CollectionTestSuiteBuilder.using(
new TestStringCollectionGenerator() {
@Override public Collection<String> create(String[] elements) {
List<String> unfiltered = newArrayList();
unfiltered.add("yyy");
Collections.addAll(unfiltered, elements);
unfiltered.add("zzz");
return Collections2.filter(unfiltered, NOT_YYY_ZZZ);
}
})
.named("Collections2.filter")
.withFeatures(
CollectionFeature.SUPPORTS_ADD,
CollectionFeature.SUPPORTS_REMOVE,
CollectionFeature.ALLOWS_NULL_VALUES,
CollectionFeature.KNOWN_ORDER,
CollectionSize.ANY)
.createTestSuite();
}
开发者ID:sander120786,
项目名称:guava-libraries,
代码行数:22,
代码来源:Collections2Test.java
示例8: testsForFilterAll
点赞 3
import com.google.common.collect.testing.TestStringCollectionGenerator; //导入依赖的package包/类
@GwtIncompatible("suite")
private static Test testsForFilterAll() {
return CollectionTestSuiteBuilder.using(
new TestStringCollectionGenerator() {
@Override public Collection<String> create(String[] elements) {
List<String> unfiltered = newArrayList();
Collections.addAll(unfiltered, elements);
return Collections2.filter(unfiltered, NOT_YYY_ZZZ);
}
})
.named("Collections2.filter")
.withFeatures(
CollectionFeature.SUPPORTS_ADD,
CollectionFeature.SUPPORTS_REMOVE,
CollectionFeature.ALLOWS_NULL_VALUES,
CollectionFeature.KNOWN_ORDER,
CollectionSize.ANY)
.createTestSuite();
}
开发者ID:sander120786,
项目名称:guava-libraries,
代码行数:20,
代码来源:Collections2Test.java
示例9: testsForFilterLinkedList
点赞 3
import com.google.common.collect.testing.TestStringCollectionGenerator; //导入依赖的package包/类
@GwtIncompatible("suite")
private static Test testsForFilterLinkedList() {
return CollectionTestSuiteBuilder.using(
new TestStringCollectionGenerator() {
@Override public Collection<String> create(String[] elements) {
List<String> unfiltered = newLinkedList();
unfiltered.add("yyy");
Collections.addAll(unfiltered, elements);
unfiltered.add("zzz");
return Collections2.filter(unfiltered, NOT_YYY_ZZZ);
}
})
.named("Collections2.filter")
.withFeatures(
CollectionFeature.SUPPORTS_ADD,
CollectionFeature.SUPPORTS_REMOVE,
CollectionFeature.ALLOWS_NULL_VALUES,
CollectionFeature.KNOWN_ORDER,
CollectionSize.ANY)
.createTestSuite();
}
开发者ID:sander120786,
项目名称:guava-libraries,
代码行数:22,
代码来源:Collections2Test.java
示例10: testsForFilterNoNulls
点赞 3
import com.google.common.collect.testing.TestStringCollectionGenerator; //导入依赖的package包/类
@GwtIncompatible("suite")
private static Test testsForFilterNoNulls() {
return CollectionTestSuiteBuilder.using(
new TestStringCollectionGenerator() {
@Override public Collection<String> create(String[] elements) {
List<String> unfiltered = newArrayList();
unfiltered.add("yyy");
unfiltered.addAll(ImmutableList.copyOf(elements));
unfiltered.add("zzz");
return Collections2.filter(unfiltered, LENGTH_1);
}
})
.named("Collections2.filter, no nulls")
.withFeatures(
CollectionFeature.SUPPORTS_ADD,
CollectionFeature.SUPPORTS_REMOVE,
CollectionFeature.ALLOWS_NULL_QUERIES,
CollectionFeature.KNOWN_ORDER,
CollectionSize.ANY)
.createTestSuite();
}
开发者ID:sander120786,
项目名称:guava-libraries,
代码行数:22,
代码来源:Collections2Test.java
示例11: testsForFilterFiltered
点赞 3
import com.google.common.collect.testing.TestStringCollectionGenerator; //导入依赖的package包/类
@GwtIncompatible("suite")
private static Test testsForFilterFiltered() {
return CollectionTestSuiteBuilder.using(
new TestStringCollectionGenerator() {
@Override public Collection<String> create(String[] elements) {
List<String> unfiltered = newArrayList();
unfiltered.add("yyy");
unfiltered.addAll(ImmutableList.copyOf(elements));
unfiltered.add("zzz");
unfiltered.add("abc");
return Collections2.filter(
Collections2.filter(unfiltered, LENGTH_1), NOT_YYY_ZZZ);
}
})
.named("Collections2.filter, filtered input")
.withFeatures(
CollectionFeature.SUPPORTS_ADD,
CollectionFeature.SUPPORTS_REMOVE,
CollectionFeature.KNOWN_ORDER,
CollectionFeature.ALLOWS_NULL_QUERIES,
CollectionSize.ANY)
.createTestSuite();
}
开发者ID:sander120786,
项目名称:guava-libraries,
代码行数:24,
代码来源:Collections2Test.java
示例12: testsForTransform
点赞 3
import com.google.common.collect.testing.TestStringCollectionGenerator; //导入依赖的package包/类
@GwtIncompatible("suite")
private static Test testsForTransform() {
return CollectionTestSuiteBuilder.using(
new TestStringCollectionGenerator() {
@Override public Collection<String> create(String[] elements) {
List<String> list = newArrayList();
for (String element : elements) {
list.add((element == null) ? null : "q" + element);
}
return Collections2.transform(list, REMOVE_FIRST_CHAR);
}
})
.named("Collections2.transform")
.withFeatures(
CollectionFeature.REMOVE_OPERATIONS,
CollectionFeature.ALLOWS_NULL_VALUES,
CollectionFeature.KNOWN_ORDER,
CollectionSize.ANY)
.createTestSuite();
}
开发者ID:sander120786,
项目名称:guava-libraries,
代码行数:21,
代码来源:Collections2Test.java
示例13: testsForFilter
点赞 3
import com.google.common.collect.testing.TestStringCollectionGenerator; //导入依赖的package包/类
@GwtIncompatible // suite
private static Test testsForFilter() {
return CollectionTestSuiteBuilder.using(
new TestStringCollectionGenerator() {
@Override
public Collection<String> create(String[] elements) {
List<String> unfiltered = newArrayList();
unfiltered.add("yyy");
Collections.addAll(unfiltered, elements);
unfiltered.add("zzz");
return Collections2.filter(unfiltered, NOT_YYY_ZZZ);
}
})
.named("Collections2.filter")
.withFeatures(
CollectionFeature.SUPPORTS_ADD,
CollectionFeature.SUPPORTS_REMOVE,
CollectionFeature.ALLOWS_NULL_VALUES,
CollectionFeature.KNOWN_ORDER,
CollectionSize.ANY)
.createTestSuite();
}
开发者ID:google,
项目名称:guava,
代码行数:23,
代码来源:Collections2Test.java
示例14: testsForFilterAll
点赞 3
import com.google.common.collect.testing.TestStringCollectionGenerator; //导入依赖的package包/类
@GwtIncompatible // suite
private static Test testsForFilterAll() {
return CollectionTestSuiteBuilder.using(
new TestStringCollectionGenerator() {
@Override
public Collection<String> create(String[] elements) {
List<String> unfiltered = newArrayList();
Collections.addAll(unfiltered, elements);
return Collections2.filter(unfiltered, NOT_YYY_ZZZ);
}
})
.named("Collections2.filter")
.withFeatures(
CollectionFeature.SUPPORTS_ADD,
CollectionFeature.SUPPORTS_REMOVE,
CollectionFeature.ALLOWS_NULL_VALUES,
CollectionFeature.KNOWN_ORDER,
CollectionSize.ANY)
.createTestSuite();
}
开发者ID:google,
项目名称:guava,
代码行数:21,
代码来源:Collections2Test.java
示例15: testsForFilterLinkedList
点赞 3
import com.google.common.collect.testing.TestStringCollectionGenerator; //导入依赖的package包/类
@GwtIncompatible // suite
private static Test testsForFilterLinkedList() {
return CollectionTestSuiteBuilder.using(
new TestStringCollectionGenerator() {
@Override
public Collection<String> create(String[] elements) {
List<String> unfiltered = newLinkedList();
unfiltered.add("yyy");
Collections.addAll(unfiltered, elements);
unfiltered.add("zzz");
return Collections2.filter(unfiltered, NOT_YYY_ZZZ);
}
})
.named("Collections2.filter")
.withFeatures(
CollectionFeature.SUPPORTS_ADD,
CollectionFeature.SUPPORTS_REMOVE,
CollectionFeature.ALLOWS_NULL_VALUES,
CollectionFeature.KNOWN_ORDER,
CollectionSize.ANY)
.createTestSuite();
}
开发者ID:google,
项目名称:guava,
代码行数:23,
代码来源:Collections2Test.java
示例16: testsForFilterNoNulls
点赞 3
import com.google.common.collect.testing.TestStringCollectionGenerator; //导入依赖的package包/类
@GwtIncompatible // suite
private static Test testsForFilterNoNulls() {
return CollectionTestSuiteBuilder.using(
new TestStringCollectionGenerator() {
@Override
public Collection<String> create(String[] elements) {
List<String> unfiltered = newArrayList();
unfiltered.add("yyy");
unfiltered.addAll(ImmutableList.copyOf(elements));
unfiltered.add("zzz");
return Collections2.filter(unfiltered, LENGTH_1);
}
})
.named("Collections2.filter, no nulls")
.withFeatures(
CollectionFeature.SUPPORTS_ADD,
CollectionFeature.SUPPORTS_REMOVE,
CollectionFeature.ALLOWS_NULL_QUERIES,
CollectionFeature.KNOWN_ORDER,
CollectionSize.ANY)
.createTestSuite();
}
开发者ID:google,
项目名称:guava,
代码行数:23,
代码来源:Collections2Test.java
示例17: testsForFilterFiltered
点赞 3
import com.google.common.collect.testing.TestStringCollectionGenerator; //导入依赖的package包/类
@GwtIncompatible // suite
private static Test testsForFilterFiltered() {
return CollectionTestSuiteBuilder.using(
new TestStringCollectionGenerator() {
@Override
public Collection<String> create(String[] elements) {
List<String> unfiltered = newArrayList();
unfiltered.add("yyy");
unfiltered.addAll(ImmutableList.copyOf(elements));
unfiltered.add("zzz");
unfiltered.add("abc");
return Collections2.filter(Collections2.filter(unfiltered, LENGTH_1), NOT_YYY_ZZZ);
}
})
.named("Collections2.filter, filtered input")
.withFeatures(
CollectionFeature.SUPPORTS_ADD,
CollectionFeature.SUPPORTS_REMOVE,
CollectionFeature.KNOWN_ORDER,
CollectionFeature.ALLOWS_NULL_QUERIES,
CollectionSize.ANY)
.createTestSuite();
}
开发者ID:google,
项目名称:guava,
代码行数:24,
代码来源:Collections2Test.java
示例18: testsForTransform
点赞 3
import com.google.common.collect.testing.TestStringCollectionGenerator; //导入依赖的package包/类
@GwtIncompatible // suite
private static Test testsForTransform() {
return CollectionTestSuiteBuilder.using(
new TestStringCollectionGenerator() {
@Override
public Collection<String> create(String[] elements) {
List<String> list = newArrayList();
for (String element : elements) {
list.add((element == null) ? null : "q" + element);
}
return Collections2.transform(list, REMOVE_FIRST_CHAR);
}
})
.named("Collections2.transform")
.withFeatures(
CollectionFeature.REMOVE_OPERATIONS,
CollectionFeature.ALLOWS_NULL_VALUES,
CollectionFeature.KNOWN_ORDER,
CollectionSize.ANY)
.createTestSuite();
}
开发者ID:google,
项目名称:guava,
代码行数:22,
代码来源:Collections2Test.java