• 如果您觉得本站非常有看点,那么赶紧使用Ctrl+D 收藏吧

Java SetCreationTester类的典型用法和代码示例

java 1次浏览

本文整理汇总了Java中com.google.common.collect.testing.testers.SetCreationTester的典型用法代码示例。如果您正苦于以下问题:Java SetCreationTester类的具体用法?Java SetCreationTester怎么用?Java SetCreationTester使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。

SetCreationTester类属于com.google.common.collect.testing.testers包,在下文中一共展示了SetCreationTester类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: getTesters

点赞 3

import com.google.common.collect.testing.testers.SetCreationTester; //导入依赖的package包/类
@Override
protected List<Class<? extends AbstractTester>> getTesters() {
  List<Class<? extends AbstractTester>> testers = Helpers.copyToList(super.getTesters());

  testers.add(CollectionSerializationEqualTester.class);
  testers.add(SetAddAllTester.class);
  testers.add(SetAddTester.class);
  testers.add(SetCreationTester.class);
  testers.add(SetHashCodeTester.class);
  testers.add(SetEqualsTester.class);
  testers.add(SetRemoveTester.class);
  // SetRemoveAllTester doesn't exist because, Sets not permitting
  // duplicate elements, there are no tests for Set.removeAll() that aren't
  // covered by CollectionRemoveAllTester.
  return testers;
}
 

开发者ID:zugzug90,
项目名称:guava-mock,
代码行数:17,
代码来源:SetTestSuiteBuilder.java

示例2: getTesters

点赞 3

import com.google.common.collect.testing.testers.SetCreationTester; //导入依赖的package包/类
@Override protected List<Class<? extends AbstractTester>> getTesters() {
  List<Class<? extends AbstractTester>> testers
      = Helpers.copyToList(super.getTesters());
  
  testers.add(CollectionSerializationEqualTester.class);
  testers.add(SetAddAllTester.class);
  testers.add(SetAddTester.class);
  testers.add(SetCreationTester.class);
  testers.add(SetHashCodeTester.class);
  testers.add(SetEqualsTester.class);
  testers.add(SetRemoveTester.class);
  // SetRemoveAllTester doesn't exist because, Sets not permitting
  // duplicate elements, there are no tests for Set.removeAll() that aren't
  // covered by CollectionRemoveAllTester.
  return testers;
}
 

开发者ID:sander120786,
项目名称:guava-libraries,
代码行数:17,
代码来源:SetTestSuiteBuilder.java

示例3: createDerivedSuites

点赞 2

import com.google.common.collect.testing.testers.SetCreationTester; //导入依赖的package包/类
createDerivedSuites(
        FeatureSpecificTestSuiteBuilder<?,
            ? extends OneSizeTestContainerGenerator<BiMap<K, V>, Entry<K, V>>> parentBuilder) {
  List<TestSuite> derived = super.createDerivedSuites(parentBuilder);
  // TODO(cpovirk): consider using this approach (derived suites instead of extension) in
  // ListTestSuiteBuilder, etc.?
  derived.add(MapTestSuiteBuilder
      .using(new MapGenerator<K, V>(parentBuilder.getSubjectGenerator()))
      .withFeatures(parentBuilder.getFeatures())
      .named(parentBuilder.getName() + " [Map]")
      .suppressing(parentBuilder.getSuppressedTests())
      .suppressing(SetCreationTester.class.getMethods())
         // BiMap.entrySet() duplicate-handling behavior is too confusing for SetCreationTester
      .createTestSuite());
  /*
   * TODO(cpovirk): the Map tests duplicate most of this effort by using a
   * CollectionTestSuiteBuilder on values(). It would be nice to avoid that
   */
  derived.add(SetTestSuiteBuilder
      .using(new BiMapValueSetGenerator<K, V>(parentBuilder.getSubjectGenerator()))
      .withFeatures(computeValuesSetFeatures(parentBuilder.getFeatures()))
      .named(parentBuilder.getName() + " values [Set]")
      .suppressing(parentBuilder.getSuppressedTests())
      .suppressing(SetCreationTester.class.getMethods())
        // BiMap.values() duplicate-handling behavior is too confusing for SetCreationTester
      .createTestSuite());
  if (!parentBuilder.getFeatures().contains(NoRecurse.INVERSE)) {
    derived.add(BiMapTestSuiteBuilder
        .using(new InverseBiMapGenerator<K, V>(parentBuilder.getSubjectGenerator()))
        .withFeatures(computeInverseFeatures(parentBuilder.getFeatures()))
        .named(parentBuilder.getName() + " inverse")
        .suppressing(parentBuilder.getSuppressedTests())
        .createTestSuite());
  }

  return derived;
}
 

开发者ID:sander120786,
项目名称:guava-libraries,
代码行数:38,
代码来源:BiMapTestSuiteBuilder.java

示例4: createDerivedSuites

点赞 2

import com.google.common.collect.testing.testers.SetCreationTester; //导入依赖的package包/类
@Override
protected List<TestSuite> createDerivedSuites(
    FeatureSpecificTestSuiteBuilder<
            ?, ? extends OneSizeTestContainerGenerator<BiMap<K, V>, Entry<K, V>>>
        parentBuilder) {
  List<TestSuite> derived = super.createDerivedSuites(parentBuilder);
  // TODO(cpovirk): consider using this approach (derived suites instead of extension) in
  // ListTestSuiteBuilder, etc.?
  derived.add(
      MapTestSuiteBuilder.using(new MapGenerator<K, V>(parentBuilder.getSubjectGenerator()))
          .withFeatures(parentBuilder.getFeatures())
          .named(parentBuilder.getName() + " [Map]")
          .suppressing(parentBuilder.getSuppressedTests())
          .suppressing(SetCreationTester.class.getMethods())
          // BiMap.entrySet() duplicate-handling behavior is too confusing for SetCreationTester
          .createTestSuite());
  /*
   * TODO(cpovirk): the Map tests duplicate most of this effort by using a
   * CollectionTestSuiteBuilder on values(). It would be nice to avoid that
   */
  derived.add(
      SetTestSuiteBuilder.using(
              new BiMapValueSetGenerator<K, V>(parentBuilder.getSubjectGenerator()))
          .withFeatures(computeValuesSetFeatures(parentBuilder.getFeatures()))
          .named(parentBuilder.getName() + " values [Set]")
          .suppressing(parentBuilder.getSuppressedTests())
          .suppressing(SetCreationTester.class.getMethods())
          // BiMap.values() duplicate-handling behavior is too confusing for SetCreationTester
          .createTestSuite());
  if (!parentBuilder.getFeatures().contains(NoRecurse.INVERSE)) {
    derived.add(
        BiMapTestSuiteBuilder.using(
                new InverseBiMapGenerator<K, V>(parentBuilder.getSubjectGenerator()))
            .withFeatures(computeInverseFeatures(parentBuilder.getFeatures()))
            .named(parentBuilder.getName() + " inverse")
            .suppressing(parentBuilder.getSuppressedTests())
            .createTestSuite());
  }

  return derived;
}
 

开发者ID:zugzug90,
项目名称:guava-mock,
代码行数:42,
代码来源:BiMapTestSuiteBuilder.java


版权声明:本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系管理员进行删除。
喜欢 (0)