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


Java TestSuite.addTest方法代码示例

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


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

示例1: moveViaDataObjectSuite

import junit.framework.TestSuite; //导入方法依赖的package包/类
public static Test moveViaDataObjectSuite() {
TestSuite suite = new TestSuite();
       suite.addTest(new InteceptorTest("moveVersionedFile_DO"));
       suite.addTest(new InteceptorTest("moveUnversionedFile_DO"));
       suite.addTest(new InteceptorTest("moveUnversionedFolder_DO"));
       suite.addTest(new InteceptorTest("moveAddedFile2UnversionedFolder_DO"));
       suite.addTest(new InteceptorTest("moveVersionedFile2IgnoredFolder_DO"));
       suite.addTest(new InteceptorTest("moveAddedFile2VersionedFolder_DO"));
       suite.addTest(new InteceptorTest("moveA2B2A_DO"));
       suite.addTest(new InteceptorTest("moveA2B2C_DO"));
       suite.addTest(new InteceptorTest("moveA2B2C2A_DO"));
       suite.addTest(new InteceptorTest("moveA2B_CreateA_DO"));
       suite.addTest(new InteceptorTest("moveVersionedFolder_DO"));
       suite.addTest(new InteceptorTest("moveFileTree_DO"));
       suite.addTest(new InteceptorTest("moveVersionedFile2Repos_DO"));
       suite.addTest(new InteceptorTest("moveVersionedFolder2Repos_DO"));
       suite.addTest(new InteceptorTest("moveFileTree2Repos_DO"));
       suite.addTest(new InteceptorTest("moveA2CB2A_DO"));
       suite.addTest(new InteceptorTest("deleteA_moveB2A2B_DO"));
       suite.addTest(new InteceptorTest("deleteA_moveUnversioned2A_DO"));
       return(suite);
   }
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:23,代码来源:InteceptorTest.java

示例2: TestSuite

import junit.framework.TestSuite; //导入方法依赖的package包/类
/**
 * Returns junit-style testSuite for the given test class, but
 * parameterized by passing extra data to each test.
 */
public static <ExtraData> Test parameterizedTestSuite
    (Class<? extends JSR166TestCase> testClass,
     Class<ExtraData> dataClass,
     ExtraData data) {
    try {
        TestSuite suite = new TestSuite();
        Constructor c =
            testClass.getDeclaredConstructor(dataClass, String.class);
        for (String methodName : testMethodNames(testClass))
            suite.addTest((Test) c.newInstance(data, methodName));
        return suite;
    } catch (Exception e) {
        throw new Error(e);
    }
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:20,代码来源:JSR166TestCase.java

示例3: addSuites

import junit.framework.TestSuite; //导入方法依赖的package包/类
private static void addSuites(TestSuite topLevel, File testDir, String[] excludes, int optimizationLevel)
{
    File[] subdirs = testDir.listFiles(ShellTest.DIRECTORY_FILTER);
    Arrays.sort(subdirs);
    for (int i = 0; i < subdirs.length; i++)
    {
        File subdir = subdirs[i];
        String name = subdir.getName();
        if (TestUtils.matches(excludes, name)) {
            continue;
        }
        TestSuite testSuite = new TestSuite(name);
        addCategories(testSuite, subdir, name + "/", excludes, optimizationLevel);
        topLevel.addTest(testSuite);
    }
}
 
开发者ID:middle2tw,项目名称:whackpad,代码行数:17,代码来源:StandardTests.java

示例4: suite

import junit.framework.TestSuite; //导入方法依赖的package包/类
public static Test suite()
throws IOException, ServerAcl.AclFormatException {

    TestSuite newSuite = new TestSuite();

    newSuite.addTest(new TestAcl("testDefaultWithNames"));
    newSuite.addTest(new TestAcl("testDefaultWithIPs"));
    newSuite.addTest(new TestAcl("testDenyAllWithNames"));
    newSuite.addTest(new TestAcl("testDenyAllWithIPs"));
    newSuite.addTest(new TestAcl("testLocalhostOnlyWithNames"));
    newSuite.addTest(new TestAcl("testLocalhostOnlyWithIPs"));
    newSuite.addTest(new TestAcl("testNoLocalhostOnlyWithNames"));
    newSuite.addTest(new TestAcl("testNoLocalhostOnlyWithIPs"));
    newSuite.addTest(new TestAcl("testLocalNetOnlyWithNames"));
    newSuite.addTest(new TestAcl("testLocalNetOnlyWithIPs"));
    newSuite.addTest(new TestAcl("testNoLocalNetOnlyWithNames"));
    newSuite.addTest(new TestAcl("testNoLocalNetOnlyWithIPs"));

    return newSuite;
}
 
开发者ID:Julien35,项目名称:dev-courses,代码行数:21,代码来源:TestAcl.java

示例5: realSuite

import junit.framework.TestSuite; //导入方法依赖的package包/类
public TestSuite realSuite()
{
    TestSuite suite = new TestSuite();

    suite.addTest(createTestCase("testGetArray"));
    suite.addTest(createTestCase("testSubsequence"));
    suite.addTest(createTestCase("testSubsequenceSubArray"));
    suite.addTest(createTestCase("testReadOnly"));
    suite.addTest(createTestCase("testCopyFrom"));
    suite.addTest(createTestCase("testCopyFromSelf"));
    suite.addTest(createTestCase("testCopyFromBig"));
    suite.addTest(createTestCase("testIterator"));
    suite.addTest(createTestCase("testIteratorBig"));
    suite.addTest(createTestCase("testSubsequenceIterator"));
    suite.addTest(createTestCase("testUnsupportedIterator"));
    suite.addTest(createTestCase("testGenericIterator"));

    return suite;
}
 
开发者ID:mtommila,项目名称:apfloat,代码行数:20,代码来源:RawtypeDataStorageTestCase.java

示例6: 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:zugzug90,项目名称:guava-mock,代码行数:10,代码来源:ByteSinkTester.java

示例7: tests

import junit.framework.TestSuite; //导入方法依赖的package包/类
static TestSuite tests(String name, CharSourceFactory factory, boolean testAsByteSource) {
  TestSuite suite = new TestSuite(name);
  for (Map.Entry<String, String> entry : TEST_STRINGS.entrySet()) {
    if (testAsByteSource) {
      suite.addTest(suiteForBytes(factory,
          entry.getValue().getBytes(Charsets.UTF_8), name, entry.getKey(), true));
    } else {
      suite.addTest(suiteForString(factory, entry.getValue(), name, entry.getKey()));
    }
  }
  return suite;
}
 
开发者ID:paul-hammant,项目名称:googles-monorepo-demo,代码行数:13,代码来源:CharSourceTester.java

示例8: allTests

import junit.framework.TestSuite; //导入方法依赖的package包/类
public Test allTests() {
  TestSuite suite = new TestSuite("java.util Lists");
  suite.addTest(testsForEmptyList());
  suite.addTest(testsForSingletonList());
  suite.addTest(testsForArraysAsList());
  suite.addTest(testsForArrayList());
  suite.addTest(testsForLinkedList());
  suite.addTest(testsForCopyOnWriteArrayList());
  suite.addTest(testsForUnmodifiableList());
  suite.addTest(testsForCheckedList());
  suite.addTest(testsForAbstractList());
  suite.addTest(testsForAbstractSequentialList());
  suite.addTest(testsForVector());
  return suite;
}
 
开发者ID:zugzug90,项目名称:guava-mock,代码行数:16,代码来源:TestsForListsInJavaUtil.java

示例9: suite

import junit.framework.TestSuite; //导入方法依赖的package包/类
public static TestSuite suite() {
    TestSuite testSuite = new TestSuite(AcceptanceTestCaseXSD.class.getName());
    
    for (String strMethodName : m_aTestMethods) {
        testSuite.addTest(new AcceptanceTestCaseXSD(strMethodName));
    }
    
    return testSuite;
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:10,代码来源:AcceptanceTestCaseXSD.java

示例10: addTest

import junit.framework.TestSuite; //导入方法依赖的package包/类
private static void addTest(TestSuite suite, Test t) {
    if (t instanceof HttpClientTestBase) {
        suite.addTest(new ProxyTestDecorator((HttpClientTestBase) t));
    } else if (t instanceof TestSuite) {
        Enumeration en = ((TestSuite) t).tests();
        while (en.hasMoreElements()) {
            addTest(suite, (Test) en.nextElement());
        }
    }
}
 
开发者ID:jenkinsci,项目名称:lib-commons-httpclient,代码行数:11,代码来源:ProxyTestDecorator.java

示例11: getAttributeSuite

import junit.framework.TestSuite; //导入方法依赖的package包/类
public static Test getAttributeSuite() {
    TestSuite suite = new TestSuite();
    suite.addTest(new InteceptorTest("getWrongAttribute"));
    suite.addTest(new InteceptorTest("getRemoteLocationAttribute"));
    suite.addTest(new InteceptorTest("getIsManaged"));
    return(suite);
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:8,代码来源:InteceptorTest.java

示例12: deleteSuite

import junit.framework.TestSuite; //导入方法依赖的package包/类
public static Test deleteSuite() {
TestSuite suite = new TestSuite();
       suite.addTest(new InteceptorTest("deleteCreateChangeCase_issue_157373"));
       suite.addTest(new InteceptorTest("deleteNotVersionedFile"));
       suite.addTest(new InteceptorTest("deleteVersionedFileExternally"));
       suite.addTest(new InteceptorTest("deleteVersionedFile"));
       suite.addTest(new InteceptorTest("deleteVersionedFolder"));
       suite.addTest(new InteceptorTest("deleteNotVersionedFolder"));
       suite.addTest(new InteceptorTest("deleteWCRoot"));
       suite.addTest(new InteceptorTest("deleteVersionedFileTree"));
       suite.addTest(new InteceptorTest("deleteNotVersionedFileTree"));
       return(suite);
   }
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:14,代码来源:InteceptorTest.java

示例13: addCategories

import junit.framework.TestSuite; //导入方法依赖的package包/类
private static void addCategories(TestSuite suite, File suiteDir, String prefix, String[] excludes, int optimizationLevel)
{
    File[] subdirs = suiteDir.listFiles(ShellTest.DIRECTORY_FILTER);
    Arrays.sort(subdirs);
    for (int i = 0; i < subdirs.length; i++)
    {
        File subdir = subdirs[i];
        String name = subdir.getName();
        TestSuite testCategory = new TestSuite(name);
        addTests(testCategory, subdir, prefix + name + "/", excludes, optimizationLevel);
        suite.addTest(testCategory);
    }
}
 
开发者ID:middle2tw,项目名称:whackpad,代码行数:14,代码来源:StandardTests.java

示例14: allTests

import junit.framework.TestSuite; //导入方法依赖的package包/类
public Test allTests() {
  TestSuite suite = new TestSuite();
  suite.addTest(testsForArrayDeque());
  suite.addTest(testsForLinkedList());
  suite.addTest(testsForArrayBlockingQueue());
  suite.addTest(testsForCheckedQueue());
  suite.addTest(testsForConcurrentLinkedDeque());
  suite.addTest(testsForConcurrentLinkedQueue());
  suite.addTest(testsForLinkedBlockingDeque());
  suite.addTest(testsForLinkedBlockingQueue());
  suite.addTest(testsForPriorityBlockingQueue());
  suite.addTest(testsForPriorityQueue());
  return suite;
}
 
开发者ID:zugzug90,项目名称:guava-mock,代码行数:15,代码来源:TestsForQueuesInJavaUtil.java

示例15: suiteForString

import junit.framework.TestSuite; //导入方法依赖的package包/类
static TestSuite suiteForString(ByteSourceFactory factory, String string,
    String name, String desc) {
  TestSuite suite = suiteForBytes(
      factory, string.getBytes(Charsets.UTF_8), name, desc, true);
  CharSourceFactory charSourceFactory = SourceSinkFactories.asCharSourceFactory(factory);
  suite.addTest(CharSourceTester.suiteForString(charSourceFactory, string,
      name + ".asCharSource[Charset]", desc));
  return suite;
}
 
开发者ID:paul-hammant,项目名称:googles-monorepo-demo,代码行数:10,代码来源:ByteSourceTester.java


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