Search in sources :

Example 16 with ListTestSuiteBuilder

use of com.google.common.collect.testing.ListTestSuiteBuilder in project guava by hceylan.

the class FloatArrayAsListTest method suite.

public static Test suite() {
    List<ListTestSuiteBuilder<Float>> builders = ImmutableList.of(ListTestSuiteBuilder.using(new FloatsAsListGenerator()).named("Floats.asList"), ListTestSuiteBuilder.using(new FloatsAsListHeadSubListGenerator()).named("Floats.asList, head subList"), ListTestSuiteBuilder.using(new FloatsAsListTailSubListGenerator()).named("Floats.asList, tail subList"), ListTestSuiteBuilder.using(new FloatsAsListMiddleSubListGenerator()).named("Floats.asList, middle subList"));
    TestSuite suite = new TestSuite();
    for (ListTestSuiteBuilder<Float> builder : builders) {
        suite.addTest(builder.withFeatures(CollectionSize.ONE, CollectionSize.SEVERAL, CollectionFeature.RESTRICTS_ELEMENTS, ListFeature.SUPPORTS_SET).createTestSuite());
    }
    return suite;
}
Also used : ListTestSuiteBuilder(com.google.common.collect.testing.ListTestSuiteBuilder) TestSuite(junit.framework.TestSuite)

Example 17 with ListTestSuiteBuilder

use of com.google.common.collect.testing.ListTestSuiteBuilder in project guava by hceylan.

the class LongArrayAsListTest method suite.

public static Test suite() {
    List<ListTestSuiteBuilder<Long>> builders = ImmutableList.of(ListTestSuiteBuilder.using(new LongsAsListGenerator()).named("Longs.asList"), ListTestSuiteBuilder.using(new LongsAsListHeadSubListGenerator()).named("Longs.asList, head subList"), ListTestSuiteBuilder.using(new LongsAsListTailSubListGenerator()).named("Longs.asList, tail subList"), ListTestSuiteBuilder.using(new LongsAsListMiddleSubListGenerator()).named("Longs.asList, middle subList"));
    TestSuite suite = new TestSuite();
    for (ListTestSuiteBuilder<Long> builder : builders) {
        suite.addTest(builder.withFeatures(CollectionSize.ONE, CollectionSize.SEVERAL, CollectionFeature.RESTRICTS_ELEMENTS, ListFeature.SUPPORTS_SET).createTestSuite());
    }
    return suite;
}
Also used : ListTestSuiteBuilder(com.google.common.collect.testing.ListTestSuiteBuilder) TestSuite(junit.framework.TestSuite)

Aggregations

ListTestSuiteBuilder (com.google.common.collect.testing.ListTestSuiteBuilder)17 TestSuite (junit.framework.TestSuite)17 GwtIncompatible (com.google.common.annotations.GwtIncompatible)10 AtomicInteger (java.util.concurrent.atomic.AtomicInteger)1 AtomicLong (java.util.concurrent.atomic.AtomicLong)1