當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。