use of com.google.common.collect.testing.MinimalCollection in project guava by google.
the class ForwardingCollectionTest method suite.
public static Test suite() {
TestSuite suite = new TestSuite();
suite.addTestSuite(ForwardingCollectionTest.class);
suite.addTest(CollectionTestSuiteBuilder.using(new TestStringCollectionGenerator() {
@Override
protected Collection<String> create(String[] elements) {
return new StandardImplForwardingCollection<String>(Lists.newLinkedList(asList(elements)));
}
}).named("ForwardingCollection[LinkedList] with standard implementations").withFeatures(CollectionSize.ANY, CollectionFeature.ALLOWS_NULL_VALUES, CollectionFeature.GENERAL_PURPOSE).createTestSuite());
suite.addTest(CollectionTestSuiteBuilder.using(new TestStringCollectionGenerator() {
@Override
protected Collection<String> create(String[] elements) {
return new StandardImplForwardingCollection<String>(MinimalCollection.of(elements));
}
}).named("ForwardingCollection[MinimalCollection] with standard" + " implementations").withFeatures(CollectionSize.ANY, CollectionFeature.ALLOWS_NULL_VALUES).createTestSuite());
return suite;
}
use of com.google.common.collect.testing.MinimalCollection in project guava by hceylan.
the class ForwardingCollectionTest method suite.
public static Test suite() {
TestSuite suite = new TestSuite();
suite.addTestSuite(ForwardingCollectionTest.class);
suite.addTest(CollectionTestSuiteBuilder.using(new TestStringCollectionGenerator() {
@Override
protected Collection<String> create(String[] elements) {
return new StandardImplForwardingCollection<String>(Lists.newLinkedList(asList(elements)));
}
}).named("ForwardingCollection[LinkedList] with standard implementations").withFeatures(CollectionSize.ANY, CollectionFeature.ALLOWS_NULL_VALUES, CollectionFeature.GENERAL_PURPOSE).createTestSuite());
suite.addTest(CollectionTestSuiteBuilder.using(new TestStringCollectionGenerator() {
@Override
protected Collection<String> create(String[] elements) {
return new StandardImplForwardingCollection<String>(MinimalCollection.of(elements));
}
}).named("ForwardingCollection[MinimalCollection] with standard" + " implementations").withFeatures(CollectionSize.ANY, CollectionFeature.ALLOWS_NULL_VALUES).createTestSuite());
return suite;
}
Aggregations