Java Code Examples for com.google.common.collect.testing.testers.MapReplaceTester

The following are top voted examples for showing how to use com.google.common.collect.testing.testers.MapReplaceTester. These examples are extracted from open source projects. You can vote up the examples you like and your votes will be used in our system to generate more good examples.
Example 1
Project: JCTools   File: NonBlockingHashMapTest.java   Source Code and License 6 votes vote down vote up
private static <T> TestSuite mapTestSuite(TestMapGenerator<T, T> testMapGenerator, String name)
{
    return new MapTestSuiteBuilder<T, T>()
    {
        {
            usingGenerator(testMapGenerator);
        }

        @Override
        protected List<Class<? extends AbstractTester>> getTesters()
        {
            List<Class<? extends AbstractTester>> testers = new ArrayList<>(super.getTesters());
            // NonBlockingHashMap doesn't support null in putIfAbsent and provides putIfAbsentAllowsNull instead
            testers.remove(MapReplaceEntryTester.class);
            testers.remove(MapReplaceTester.class);
            return testers;
        }
    }.withFeatures(
        MapFeature.GENERAL_PURPOSE,
        CollectionSize.ANY,
        CollectionFeature.SUPPORTS_ITERATOR_REMOVE)
        .named(name)
        .createTestSuite();
}
 
Example 2
Project: guava-mock   File: MapTestSuiteBuilder.java   Source Code and License 5 votes vote down vote up
@SuppressWarnings("unchecked") // Class parameters must be raw.
@Override
protected List<Class<? extends AbstractTester>> getTesters() {
  return Arrays.<Class<? extends AbstractTester>>asList(
      MapClearTester.class,
      MapComputeTester.class,
      MapComputeIfAbsentTester.class,
      MapComputeIfPresentTester.class,
      MapContainsKeyTester.class,
      MapContainsValueTester.class,
      MapCreationTester.class,
      MapEntrySetTester.class,
      MapEqualsTester.class,
      MapForEachTester.class,
      MapGetTester.class,
      MapGetOrDefaultTester.class,
      MapHashCodeTester.class,
      MapIsEmptyTester.class,
      MapMergeTester.class,
      MapPutTester.class,
      MapPutAllTester.class,
      MapPutIfAbsentTester.class,
      MapRemoveTester.class,
      MapRemoveEntryTester.class,
      MapReplaceTester.class,
      MapReplaceAllTester.class,
      MapReplaceEntryTester.class,
      MapSerializationTester.class,
      MapSizeTester.class,
      MapToStringTester.class);
}
 
Example 3
Project: googles-monorepo-demo   File: MapTestSuiteBuilder.java   Source Code and License 5 votes vote down vote up
@SuppressWarnings("unchecked") // Class parameters must be raw.
@Override
protected List<Class<? extends AbstractTester>> getTesters() {
  return Arrays.<Class<? extends AbstractTester>>asList(
      MapClearTester.class,
      MapComputeTester.class,
      MapComputeIfAbsentTester.class,
      MapComputeIfPresentTester.class,
      MapContainsKeyTester.class,
      MapContainsValueTester.class,
      MapCreationTester.class,
      MapEntrySetTester.class,
      MapEqualsTester.class,
      MapForEachTester.class,
      MapGetTester.class,
      MapGetOrDefaultTester.class,
      MapHashCodeTester.class,
      MapIsEmptyTester.class,
      MapMergeTester.class,
      MapPutTester.class,
      MapPutAllTester.class,
      MapPutIfAbsentTester.class,
      MapRemoveTester.class,
      MapRemoveEntryTester.class,
      MapReplaceTester.class,
      MapReplaceAllTester.class,
      MapReplaceEntryTester.class,
      MapSerializationTester.class,
      MapSizeTester.class,
      MapToStringTester.class);
}
 
Example 4
Project: guava   File: MapTestSuiteBuilder.java   Source Code and License 5 votes vote down vote up
@SuppressWarnings("unchecked") // Class parameters must be raw.
@Override
protected List<Class<? extends AbstractTester>> getTesters() {
  return Arrays.<Class<? extends AbstractTester>>asList(
      MapClearTester.class,
      MapComputeTester.class,
      MapComputeIfAbsentTester.class,
      MapComputeIfPresentTester.class,
      MapContainsKeyTester.class,
      MapContainsValueTester.class,
      MapCreationTester.class,
      MapEntrySetTester.class,
      MapEqualsTester.class,
      MapForEachTester.class,
      MapGetTester.class,
      MapGetOrDefaultTester.class,
      MapHashCodeTester.class,
      MapIsEmptyTester.class,
      MapMergeTester.class,
      MapPutTester.class,
      MapPutAllTester.class,
      MapPutIfAbsentTester.class,
      MapRemoveTester.class,
      MapRemoveEntryTester.class,
      MapReplaceTester.class,
      MapReplaceAllTester.class,
      MapReplaceEntryTester.class,
      MapSerializationTester.class,
      MapSizeTester.class,
      MapToStringTester.class);
}