类com.google.common.collect.testing.TestMapGenerator源码实例Demo

下面列出了怎么用com.google.common.collect.testing.TestMapGenerator的API类实例代码及写法,或者点击链接到github查看源代码。

源代码1 项目: caffeine   文件: MapTestFactory.java
/**
 * Returns a test suite.
 *
 * @param name the name of the cache type under test
 * @param generator the map generator
 * @return a suite of tests
 */
public static Test suite(String name, TestMapGenerator<?, ?> generator) {
  return ConcurrentMapTestSuiteBuilder
      .using(generator)
      .named(name)
      .withFeatures(
          MapFeature.GENERAL_PURPOSE,
          MapFeature.ALLOWS_NULL_ENTRY_QUERIES,
          CollectionFeature.SUPPORTS_ITERATOR_REMOVE,
          CollectionSize.ANY)
      .createTestSuite();
}
 
源代码2 项目: agrona   文件: Int2IntHashMapConformanceTest.java
private static <T> TestSuite mapTestSuite(final TestMapGenerator<T, T> testMapGenerator, final String name)
{
    return new MapTestSuiteBuilder<T, T>()
    {
        {
            usingGenerator(testMapGenerator);
        }
    }.withFeatures(
        MapFeature.GENERAL_PURPOSE,
        CollectionSize.ANY,
        CollectionFeature.SUPPORTS_ITERATOR_REMOVE)
        .named(name)
        .createTestSuite();
}
 
源代码3 项目: agrona   文件: Long2LongHashMapConformanceTest.java
private static <T> TestSuite mapTestSuite(final TestMapGenerator<T, T> testMapGenerator, final String name)
{
    return new MapTestSuiteBuilder<T, T>()
    {
        {
            usingGenerator(testMapGenerator);
        }
    }.withFeatures(
        MapFeature.GENERAL_PURPOSE,
        CollectionSize.ANY,
        CollectionFeature.SUPPORTS_ITERATOR_REMOVE)
        .named(name)
        .createTestSuite();
}
 
private static <T> TestSuite mapTestSuite(final TestMapGenerator<T, T> testMapGenerator, final String name)
{
    return new MapTestSuiteBuilder<T, T>()
    {
        {
            usingGenerator(testMapGenerator);
        }
    }.withFeatures(
        MapFeature.GENERAL_PURPOSE,
        CollectionSize.ANY,
        CollectionFeature.SUPPORTS_ITERATOR_REMOVE)
        .named(name)
        .createTestSuite();
}
 
源代码5 项目: agrona   文件: Object2IntHashMapConformanceTest.java
private static <T> TestSuite mapTestSuite(final TestMapGenerator<T, T> testMapGenerator, final String name)
{
    return new MapTestSuiteBuilder<T, T>()
    {
        {
            usingGenerator(testMapGenerator);
        }
    }.withFeatures(
        MapFeature.GENERAL_PURPOSE,
        CollectionSize.ANY,
        CollectionFeature.SUPPORTS_ITERATOR_REMOVE)
        .named(name)
        .createTestSuite();
}
 
private static <T> TestSuite mapTestSuite(final TestMapGenerator<T, T> testMapGenerator, final String name)
{
    return new MapTestSuiteBuilder<T, T>()
    {
        {
            usingGenerator(testMapGenerator);
        }
    }.withFeatures(
        MapFeature.GENERAL_PURPOSE,
        CollectionSize.ANY,
        CollectionFeature.SUPPORTS_ITERATOR_REMOVE)
        .named(name)
        .createTestSuite();
}
 
源代码7 项目: agrona   文件: Int2ObjectHashMapConformanceTest.java
private static <T> TestSuite mapTestSuite(final TestMapGenerator<T, T> testMapGenerator, final String name)
{
    return new MapTestSuiteBuilder<T, T>()
    {
        {
            usingGenerator(testMapGenerator);
        }
    }.withFeatures(
        MapFeature.GENERAL_PURPOSE,
        CollectionSize.ANY,
        CollectionFeature.SUPPORTS_ITERATOR_REMOVE)
        .named(name)
        .createTestSuite();
}
 
private static <T> TestSuite mapTestSuite(final TestMapGenerator<T, T> testMapGenerator, final String name)
{
    return new MapTestSuiteBuilder<T, T>()
    {
        {
            usingGenerator(testMapGenerator);
        }
    }.withFeatures(
        MapFeature.GENERAL_PURPOSE,
        MapFeature.ALLOWS_NULL_VALUES,
        CollectionSize.ANY,
        CollectionFeature.SUPPORTS_ITERATOR_REMOVE)
        .named(name)
        .createTestSuite();
}
 
private static <T> TestSuite mapTestSuite(final TestMapGenerator<T, T> testMapGenerator, final String name)
{
    return new MapTestSuiteBuilder<T, T>()
    {
        {
            usingGenerator(testMapGenerator);
        }
    }.withFeatures(
        MapFeature.GENERAL_PURPOSE,
        CollectionSize.ANY,
        CollectionFeature.SUPPORTS_ITERATOR_REMOVE)
        .named(name)
        .createTestSuite();
}
 
private static <T> TestSuite mapTestSuite(final TestMapGenerator<T, T> testMapGenerator, final String name)
{
    return new MapTestSuiteBuilder<T, T>()
    {
        {
            usingGenerator(testMapGenerator);
        }
    }.withFeatures(
        MapFeature.GENERAL_PURPOSE,
        MapFeature.ALLOWS_NULL_VALUES,
        CollectionSize.ANY,
        CollectionFeature.SUPPORTS_ITERATOR_REMOVE)
        .named(name)
        .createTestSuite();
}
 
private static <T> TestSuite mapTestSuite(final TestMapGenerator<T, T> testMapGenerator, final String name)
{
    return new MapTestSuiteBuilder<T, T>()
    {
        {
            usingGenerator(testMapGenerator);
        }
    }.withFeatures(
        MapFeature.GENERAL_PURPOSE,
        MapFeature.ALLOWS_NULL_VALUES,
        CollectionSize.ANY,
        CollectionFeature.SUPPORTS_ITERATOR_REMOVE)
        .named(name)
        .createTestSuite();
}
 
 同包方法