Search in sources :

Example 6 with ListTestSuiteBuilder

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

the class ByteArrayAsListTest method suite.

// suite
@GwtIncompatible
public static Test suite() {
    List<ListTestSuiteBuilder<Byte>> builders = ImmutableList.of(ListTestSuiteBuilder.using(new BytesAsListGenerator()).named("Bytes.asList"), ListTestSuiteBuilder.using(new BytesAsListHeadSubListGenerator()).named("Bytes.asList, head subList"), ListTestSuiteBuilder.using(new BytesAsListTailSubListGenerator()).named("Bytes.asList, tail subList"), ListTestSuiteBuilder.using(new BytesAsListMiddleSubListGenerator()).named("Bytes.asList, middle subList"));
    TestSuite suite = new TestSuite();
    for (ListTestSuiteBuilder<Byte> 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) GwtIncompatible(com.google.common.annotations.GwtIncompatible)

Example 7 with ListTestSuiteBuilder

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

the class CharArrayAsListTest method suite.

// suite
@GwtIncompatible
public static Test suite() {
    List<ListTestSuiteBuilder<Character>> builders = ImmutableList.of(ListTestSuiteBuilder.using(new CharsAsListGenerator()).named("Chars.asList"), ListTestSuiteBuilder.using(new CharsAsListHeadSubListGenerator()).named("Chars.asList, head subList"), ListTestSuiteBuilder.using(new CharsAsListTailSubListGenerator()).named("Chars.asList, tail subList"), ListTestSuiteBuilder.using(new CharsAsListMiddleSubListGenerator()).named("Chars.asList, middle subList"));
    TestSuite suite = new TestSuite();
    for (ListTestSuiteBuilder<Character> 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) GwtIncompatible(com.google.common.annotations.GwtIncompatible)

Example 8 with ListTestSuiteBuilder

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

the class FloatArrayAsListTest method suite.

// suite
@GwtIncompatible
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) GwtIncompatible(com.google.common.annotations.GwtIncompatible)

Example 9 with ListTestSuiteBuilder

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

the class LongArrayAsListTest method suite.

// suite
@GwtIncompatible
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) GwtIncompatible(com.google.common.annotations.GwtIncompatible)

Example 10 with ListTestSuiteBuilder

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

the class ShortArrayAsListTest method suite.

// suite
@GwtIncompatible
public static Test suite() {
    List<ListTestSuiteBuilder<Short>> builders = ImmutableList.of(ListTestSuiteBuilder.using(new ShortsAsListGenerator()).named("Shorts.asList"), ListTestSuiteBuilder.using(new ShortsAsListHeadSubListGenerator()).named("Shorts.asList, head subList"), ListTestSuiteBuilder.using(new ShortsAsListTailSubListGenerator()).named("Shorts.asList, tail subList"), ListTestSuiteBuilder.using(new ShortsAsListMiddleSubListGenerator()).named("Shorts.asList, middle subList"));
    TestSuite suite = new TestSuite();
    for (ListTestSuiteBuilder<Short> 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) GwtIncompatible(com.google.common.annotations.GwtIncompatible)

Aggregations

ListTestSuiteBuilder (com.google.common.collect.testing.ListTestSuiteBuilder)14 TestSuite (junit.framework.TestSuite)14 GwtIncompatible (com.google.common.annotations.GwtIncompatible)7