use of com.google.common.collect.testing.MinimalSet in project guava by hceylan.
the class ForwardingSetTest method suite.
public static Test suite() {
TestSuite suite = new TestSuite();
suite.addTestSuite(ForwardingSetTest.class);
suite.addTest(SetTestSuiteBuilder.using(new TestStringSetGenerator() {
@Override
protected Set<String> create(String[] elements) {
return new StandardImplForwardingSet<String>(Sets.newLinkedHashSet(asList(elements)));
}
}).named("ForwardingSet[LinkedHashSet] with standard implementations").withFeatures(CollectionSize.ANY, CollectionFeature.ALLOWS_NULL_VALUES, CollectionFeature.GENERAL_PURPOSE).createTestSuite());
suite.addTest(SetTestSuiteBuilder.using(new TestStringSetGenerator() {
@Override
protected Set<String> create(String[] elements) {
return new StandardImplForwardingSet<String>(MinimalSet.of(elements));
}
}).named("ForwardingSet[MinimalSet] with standard implementations").withFeatures(CollectionSize.ANY, CollectionFeature.ALLOWS_NULL_VALUES).createTestSuite());
return suite;
}
use of com.google.common.collect.testing.MinimalSet in project guava by google.
the class ForwardingSetTest method suite.
public static Test suite() {
TestSuite suite = new TestSuite();
suite.addTestSuite(ForwardingSetTest.class);
suite.addTest(SetTestSuiteBuilder.using(new TestStringSetGenerator() {
@Override
protected Set<String> create(String[] elements) {
return new StandardImplForwardingSet<>(Sets.newLinkedHashSet(asList(elements)));
}
}).named("ForwardingSet[LinkedHashSet] with standard implementations").withFeatures(CollectionSize.ANY, CollectionFeature.ALLOWS_NULL_VALUES, CollectionFeature.GENERAL_PURPOSE).createTestSuite());
suite.addTest(SetTestSuiteBuilder.using(new TestStringSetGenerator() {
@Override
protected Set<String> create(String[] elements) {
return new StandardImplForwardingSet<>(MinimalSet.of(elements));
}
}).named("ForwardingSet[MinimalSet] with standard implementations").withFeatures(CollectionSize.ANY, CollectionFeature.ALLOWS_NULL_VALUES).createTestSuite());
return suite;
}
Aggregations