当前位置: 首页>>代码示例>>Java>>正文


Java TestSuite类代码示例

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


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

示例1: allTests

import junit.framework.TestSuite; //导入依赖的package包/类
public Test allTests() {
  TestSuite suite = new TestSuite("java.util Maps");
  suite.addTest(testsForCheckedMap());
  suite.addTest(testsForCheckedNavigableMap());
  suite.addTest(testsForCheckedSortedMap());
  suite.addTest(testsForEmptyMap());
  suite.addTest(testsForEmptyNavigableMap());
  suite.addTest(testsForEmptySortedMap());
  suite.addTest(testsForSingletonMap());
  suite.addTest(testsForHashMap());
  suite.addTest(testsForHashtable());
  suite.addTest(testsForLinkedHashMap());
  suite.addTest(testsForSynchronizedNavigableMap());
  suite.addTest(testsForTreeMapNatural());
  suite.addTest(testsForTreeMapWithComparator());
  suite.addTest(testsForUnmodifiableMap());
  suite.addTest(testsForUnmodifiableNavigableMap());
  suite.addTest(testsForUnmodifiableSortedMap());
  suite.addTest(testsForEnumMap());
  suite.addTest(testsForConcurrentHashMap());
  suite.addTest(testsForConcurrentSkipListMapNatural());
  suite.addTest(testsForConcurrentSkipListMapWithComparator());
  return suite;
}
 
开发者ID:paul-hammant,项目名称:googles-monorepo-demo,代码行数:25,代码来源:TestsForMapsInJavaUtil.java

示例2: makeSuiteForTesterClass

import junit.framework.TestSuite; //导入依赖的package包/类
protected TestSuite makeSuiteForTesterClass(Class<? extends AbstractTester<?>> testerClass) {
  final TestSuite candidateTests = new TestSuite(testerClass);
  final TestSuite suite = filterSuite(candidateTests);

  Enumeration<?> allTests = suite.tests();
  while (allTests.hasMoreElements()) {
    Object test = allTests.nextElement();
    if (test instanceof AbstractTester) {
      @SuppressWarnings("unchecked")
      AbstractTester<? super G> tester = (AbstractTester<? super G>) test;
      tester.init(subjectGenerator, name, setUp, tearDown);
    }
  }

  return suite;
}
 
开发者ID:paul-hammant,项目名称:googles-monorepo-demo,代码行数:17,代码来源:FeatureSpecificTestSuiteBuilder.java

示例3: createReserializedSuite

import junit.framework.TestSuite; //导入依赖的package包/类
private TestSuite createReserializedSuite(SortedMultisetTestSuiteBuilder<E> parentBuilder) {
  final TestMultisetGenerator<E> delegate =
      (TestMultisetGenerator<E>) parentBuilder.getSubjectGenerator();

  Set<Feature<?>> features = new HashSet<Feature<?>>();
  features.addAll(parentBuilder.getFeatures());
  features.remove(SERIALIZABLE);
  features.remove(SERIALIZABLE_INCLUDING_VIEWS);

  return SortedMultisetTestSuiteBuilder.using(
          new ForwardingTestMultisetGenerator<E>(delegate) {
            @Override
            public SortedMultiset<E> create(Object... entries) {
              return SerializableTester.reserialize(((SortedMultiset<E>) super.create(entries)));
            }
          })
      .named(parentBuilder.getName() + " reserialized")
      .withFeatures(features)
      .suppressing(parentBuilder.getSuppressedTests())
      .createTestSuite();
}
 
开发者ID:paul-hammant,项目名称:googles-monorepo-demo,代码行数:22,代码来源:SortedMultisetTestSuiteBuilder.java

示例4: iterateTests

import junit.framework.TestSuite; //导入依赖的package包/类
private void iterateTests(TestResult result, StringBuffer times, TestSuite suite, AtomicLong min, AtomicLong max) {
    Enumeration en = suite.tests();
    while (en.hasMoreElements()) {
        Test t = (Test)en.nextElement();
        if (t instanceof Callable) {
            try {
                Long v = (Long)((Callable) t).call();
                long time = v.longValue();
                if (time < min.longValue()) {
                    min.set(time);
                }
                if (time > max.longValue()) {
                    max.set(time);
                }
                // append(t.toString()).append(" value: ")
                times.append("Run: ").append(v).append('\n');
            } catch (Exception ex) {
                result.addError(this, ex);
            }
        }
        if (t instanceof TestSuite) {
            iterateTests(result, times, (TestSuite)t, min, max);
        }
    }
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:26,代码来源:ExpandFolderTest.java

示例5: computeMultimapAsMapGetTestSuite

import junit.framework.TestSuite; //导入依赖的package包/类
TestSuite computeMultimapAsMapGetTestSuite(
    FeatureSpecificTestSuiteBuilder<
            ?, ? extends OneSizeTestContainerGenerator<M, Map.Entry<K, V>>>
        parentBuilder) {
  Set<Feature<?>> features = computeMultimapAsMapGetFeatures(parentBuilder.getFeatures());
  if (Collections.disjoint(features, EnumSet.allOf(CollectionSize.class))) {
    return new TestSuite();
  } else {
    return CollectionTestSuiteBuilder.using(
            new MultimapAsMapGetGenerator<K, V, M>(parentBuilder.getSubjectGenerator()))
        .withFeatures(features)
        .named(parentBuilder.getName() + ".asMap[].get[key]")
        .suppressing(parentBuilder.getSuppressedTests())
        .createTestSuite();
  }
}
 
开发者ID:paul-hammant,项目名称:googles-monorepo-demo,代码行数:17,代码来源:MultimapTestSuiteBuilder.java

示例6: suite

import junit.framework.TestSuite; //导入依赖的package包/类
/**
 * Required by JUnit
 */
public static TestSuite suite() {
  return new OrderedTestSuite(SSTestGenericSourceControl.class,
          new String[]{
                  "test_getChangesSinceHandlesFirstRun",
                  "test_getChangesSince",
                  "test_label",
                  "test_checkoutLatest",
                  "test_syncToChangeList"
          });
}
 
开发者ID:parabuild-ci,项目名称:parabuild-ci,代码行数:14,代码来源:SSTestGenericSourceControl.java

示例7: suite

import junit.framework.TestSuite; //导入依赖的package包/类
public static TestSuite suite() {
    TestSuite result = new TestSuite();
    result.addTest( WebPageTest.suite() );
    result.addTest( WebLinkTest.suite() );
    result.addTest( WebImageTest.suite() );
    result.addTest( HtmlTablesTest.suite() );
    result.addTest( WebFormTest.suite() );
    result.addTest( WebFrameTest.suite() );
    result.addTest( WebWindowTest.suite() );
    result.addTest( RequestTargetTest.suite() );
    result.addTest( FormParametersTest.suite() );
    result.addTest( FormSubmitTest.suite() );
    result.addTest( Base64Test.suite() );
    result.addTest( PseudoServerTest.suite() );
    result.addTest( WebClientTest.suite() );
    result.addTest( MessageBodyRequestTest.suite() );
    result.addTest( WebAppletTest.suite() );
    result.addTest( CookieTest.suite() );
    result.addTest( ParsingTestSuite.suite() );
    result.addTest( NormalizeURLTest.suite() );

    if (HTMLParserFactory.getHTMLParser().getClass().getName().indexOf("NekoHTML") >= 0) result.addTest( NekoEnhancedScriptingTest.suite() );
    addOptionalTestCase( result, "com.meterware.httpunit.XMLPageTest" );
    addOptionalTestCase( result, "com.meterware.httpunit.FileUploadTest" );
    addOptionalTestCase( result, "com.meterware.httpunit.javascript.JavaScriptTestSuite" );
    addOptionalTestCase( result, "com.meterware.servletunit.ServletUnitSuite" );
    return result;
}
 
开发者ID:parabuild-ci,项目名称:parabuild-ci,代码行数:29,代码来源:HttpUnitSuite.java

示例8: createTestSuite

import junit.framework.TestSuite; //导入依赖的package包/类
@Override
public TestSuite createTestSuite() {
  if (!getFeatures().contains(KNOWN_ORDER)) {
    List<Feature<?>> features = Helpers.copyToList(getFeatures());
    features.add(KNOWN_ORDER);
    withFeatures(features);
  }
  return super.createTestSuite();
}
 
开发者ID:zugzug90,项目名称:guava-mock,代码行数:10,代码来源:SortedMapTestSuiteBuilder.java

示例9: suiteForString

import junit.framework.TestSuite; //导入依赖的package包/类
private static TestSuite suiteForString(String name, ByteSinkFactory factory,
    String string, String desc) {
  byte[] bytes = string.getBytes(Charsets.UTF_8);
  TestSuite suite = suiteForBytes(name, factory, desc, bytes);
  CharSinkFactory charSinkFactory = SourceSinkFactories.asCharSinkFactory(factory);
  suite.addTest(CharSinkTester.suiteForString(name + ".asCharSink[Charset]", charSinkFactory,
      string, desc));
  return suite;
}
 
开发者ID:paul-hammant,项目名称:googles-monorepo-demo,代码行数:10,代码来源:ByteSinkTester.java

示例10: computeValuesTestSuite

import junit.framework.TestSuite; //导入依赖的package包/类
TestSuite computeValuesTestSuite(
    FeatureSpecificTestSuiteBuilder<
            ?, ? extends OneSizeTestContainerGenerator<M, Map.Entry<K, V>>>
        parentBuilder) {
  return CollectionTestSuiteBuilder.using(
          new ValuesGenerator<K, V, M>(parentBuilder.getSubjectGenerator()))
      .withFeatures(computeValuesFeatures(parentBuilder.getFeatures()))
      .named(parentBuilder.getName() + ".values")
      .suppressing(parentBuilder.getSuppressedTests())
      .createTestSuite();
}
 
开发者ID:zugzug90,项目名称:guava-mock,代码行数:12,代码来源:MultimapTestSuiteBuilder.java

示例11: suite

import junit.framework.TestSuite; //导入依赖的package包/类
/**
 * Required by JUnit
 */
public static TestSuite suite() {
  return new OrderedTestSuite(SSTestUnittestPPTestLogHandler.class,
          new String[]{
                  "test_process"
          });
}
 
开发者ID:parabuild-ci,项目名称:parabuild-ci,代码行数:10,代码来源:SSTestUnittestPPTestLogHandler.java

示例12: createTestSuite

import junit.framework.TestSuite; //导入依赖的package包/类
@Override
public TestSuite createTestSuite() {
  if (!getFeatures().contains(CollectionFeature.KNOWN_ORDER)) {
    List<Feature<?>> features = Helpers.copyToList(getFeatures());
    features.add(CollectionFeature.KNOWN_ORDER);
    withFeatures(features);
  }
  return super.createTestSuite();
}
 
开发者ID:zugzug90,项目名称:guava-mock,代码行数:10,代码来源:SortedSetTestSuiteBuilder.java

示例13: suite

import junit.framework.TestSuite; //导入依赖的package包/类
/**
 * Required by JUnit
 */
public static TestSuite suite() {
  return new OrderedTestSuite(SSTestSecurityManager.class, new String[]{
          "testFindUsersByEmail",
          "testAssingBuildCreratorBug1440",
          "test_isAllowedToSeeErrors",
          "test_findUsersWithEditRights",
          "test_getUserBuildRights",
          "test_bug1008_securityManagerDoesNotCreateAUserIfItIsInUpperCase",
          "test_getUserResultGroupsReturnEmptyListForAnonymousUser",
          "test_isAnonymousAccessEnabled"
  });
}
 
开发者ID:parabuild-ci,项目名称:parabuild-ci,代码行数:16,代码来源:SSTestSecurityManager.java

示例14: getTestSuiteTests

import junit.framework.TestSuite; //导入依赖的package包/类
private static void getTestSuiteTests(List<VogarTest> out, TestSuite suite) {
    for (Object testsOrSuite : suite.getTestsAndSuites()) {
        if (testsOrSuite instanceof Class) {
            getSuiteMethods(out, (Class<?>) testsOrSuite);
        } else if (testsOrSuite instanceof TestCase) {
            out.add(createForTestCase((TestCase) testsOrSuite));
        } else if (testsOrSuite instanceof TestSuite) {
            getTestSuiteTests(out, (TestSuite) testsOrSuite);
        } else if (testsOrSuite != null) {
            out.add(new ConfigurationError(testsOrSuite.getClass().getName() + "#getClass",
                    new IllegalStateException("Unknown test: " + testsOrSuite)));
        }
    }
}
 
开发者ID:dryganets,项目名称:vogar,代码行数:15,代码来源:Junit3.java

示例15: createSuite

import junit.framework.TestSuite; //导入依赖的package包/类
public static Test createSuite() {
    TestSuite suite = new TestSuite();
    suite.addTest(new InteceptorTest("createNewFile"));
    suite.addTest(new InteceptorTest("createNewFolder"));
    suite.addTest(new InteceptorTest("deleteA_CreateA"));
    suite.addTest(new InteceptorTest("deleteA_CreateAOnDemandLocking"));
    suite.addTest(new InteceptorTest("deleteA_CreateA_RunAtomic"));
    suite.addTest(new InteceptorTest("afterDelete_AfterCreate_194998"));
    return(suite);
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:11,代码来源:InteceptorTest.java


注:本文中的junit.framework.TestSuite类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。