Search in sources :

Example 1 with MinimalSet

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;
}
Also used : TestStringSetGenerator(com.google.common.collect.testing.TestStringSetGenerator) MinimalSet(com.google.common.collect.testing.MinimalSet) Set(java.util.Set) TestSuite(junit.framework.TestSuite)

Example 2 with MinimalSet

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;
}
Also used : TestStringSetGenerator(com.google.common.collect.testing.TestStringSetGenerator) MinimalSet(com.google.common.collect.testing.MinimalSet) Set(java.util.Set) TestSuite(junit.framework.TestSuite)

Aggregations

MinimalSet (com.google.common.collect.testing.MinimalSet)2 TestStringSetGenerator (com.google.common.collect.testing.TestStringSetGenerator)2 Set (java.util.Set)2 TestSuite (junit.framework.TestSuite)2