Ejemplo n.º 1
0
  @GwtIncompatible // suite
  public static Test suite() {
    TestSuite suite = new TestSuite();

    suite.addTestSuite(MapTests.class);
    suite.addTestSuite(InverseMapTests.class);
    suite.addTestSuite(CreationTests.class);
    suite.addTestSuite(BiMapSpecificTests.class);

    suite.addTest(
        BiMapTestSuiteBuilder.using(new ImmutableBiMapGenerator())
            .named("ImmutableBiMap")
            .withFeatures(
                CollectionSize.ANY,
                CollectionFeature.SERIALIZABLE,
                CollectionFeature.KNOWN_ORDER,
                MapFeature.REJECTS_DUPLICATES_AT_CREATION,
                MapFeature.ALLOWS_ANY_NULL_QUERIES)
            .suppressing(BiMapInverseTester.getInverseSameAfterSerializingMethods())
            .createTestSuite());
    suite.addTest(
        BiMapTestSuiteBuilder.using(new ImmutableBiMapCopyOfGenerator())
            .named("ImmutableBiMap.copyOf[Map]")
            .withFeatures(
                CollectionSize.ANY,
                CollectionFeature.SERIALIZABLE,
                CollectionFeature.KNOWN_ORDER,
                MapFeature.ALLOWS_ANY_NULL_QUERIES)
            .suppressing(BiMapInverseTester.getInverseSameAfterSerializingMethods())
            .createTestSuite());
    suite.addTest(
        BiMapTestSuiteBuilder.using(new ImmutableBiMapCopyOfEntriesGenerator())
            .named("ImmutableBiMap.copyOf[Iterable<Entry>]")
            .withFeatures(
                CollectionSize.ANY,
                CollectionFeature.SERIALIZABLE,
                CollectionFeature.KNOWN_ORDER,
                MapFeature.REJECTS_DUPLICATES_AT_CREATION,
                MapFeature.ALLOWS_ANY_NULL_QUERIES)
            .suppressing(BiMapInverseTester.getInverseSameAfterSerializingMethods())
            .createTestSuite());

    return suite;
  }
Ejemplo n.º 2
0
 @GwtIncompatible // suite
 public static Test suite() {
   TestSuite suite = new TestSuite();
   suite.addTest(
       BiMapTestSuiteBuilder.using(new ConstrainedBiMapGenerator())
           .named("Maps.constrainedBiMap[HashBiMap]")
           .withFeatures(
               CollectionSize.ANY,
               CollectionFeature.SUPPORTS_ITERATOR_REMOVE,
               MapFeature.ALLOWS_NULL_KEYS,
               MapFeature.ALLOWS_NULL_VALUES,
               MapFeature.ALLOWS_ANY_NULL_QUERIES,
               MapFeature.GENERAL_PURPOSE,
               MapFeature.REJECTS_DUPLICATES_AT_CREATION)
           .createTestSuite());
   suite.addTestSuite(ConstrainedBiMapTest.class);
   return suite;
 }