當前位置: 首頁>>代碼示例>>Java>>正文


Java TestResult.failures方法代碼示例

本文整理匯總了Java中junit.framework.TestResult.failures方法的典型用法代碼示例。如果您正苦於以下問題:Java TestResult.failures方法的具體用法?Java TestResult.failures怎麽用?Java TestResult.failures使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在junit.framework.TestResult的用法示例。


在下文中一共展示了TestResult.failures方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: main

import junit.framework.TestResult; //導入方法依賴的package包/類
public static void main(String[] argv) {

        TestResult result = new TestResult();
        TestCase   testA  = new TestMerge("testMerge1");
        TestCase   testB  = new TestMerge("testMerge2");
        TestCase   testC  = new TestMerge("testMerge3");
        TestCase   testD  = new TestMerge("testMerge4");
        TestCase   testE  = new TestMerge("testMerge5");
        TestCase   testF  = new TestMerge("testMerge6");
        TestCase   testG  = new TestMerge("testMerge7");
        TestCase   testH  = new TestMerge("testMerge8");
        TestCase   testI  = new TestMerge("testMerge9");

        testA.run(result);
        testB.run(result);
        testC.run(result);
        testD.run(result);
        testE.run(result);
        testF.run(result);
        testG.run(result);
        testH.run(result);
        testI.run(result);
        System.out.println("TestMerge error count: " + result.failureCount());

        Enumeration e = result.failures();

        while (e.hasMoreElements()) {
            System.out.println(e.nextElement());
        }
    }
 
開發者ID:tiweGH,項目名稱:OpenDiabetes,代碼行數:31,代碼來源:TestMerge.java

示例2: main

import junit.framework.TestResult; //導入方法依賴的package包/類
public static void main(String[] argv) {

        TestResult result        = new TestResult();
        TestCase   testKeepAlive = new TestHTTPKeepAlive("testKeepAlive");

        testKeepAlive.run(result);
        System.out.println("TestKeepAlive error count: "
                           + result.failureCount());

        Enumeration e = result.failures();

        while (e.hasMoreElements()) {
            System.out.println(e.nextElement());
        }
    }
 
開發者ID:tiweGH,項目名稱:OpenDiabetes,代碼行數:16,代碼來源:TestHTTPKeepAlive.java

示例3: main

import junit.framework.TestResult; //導入方法依賴的package包/類
public static void main(String[] argv) {

        TestResult result = new TestResult();
        TestCase   testA  = new TestMultiInsert("testMultiInsert");

        testA.run(result);
        System.out.println("TestMultiInsert error count: " + result.failureCount());
        Enumeration e = result.failures();
        while(e.hasMoreElements()) System.out.println(e.nextElement());
    }
 
開發者ID:tiweGH,項目名稱:OpenDiabetes,代碼行數:11,代碼來源:TestMultiInsert.java

示例4: main

import junit.framework.TestResult; //導入方法依賴的package包/類
public static void main(String [] args) {
    TestResult tr = new TestResult();
    Test t = suite();
    t.run(tr);
    System.out.println(tr.errorCount());
    Enumeration e = tr.failures();
    while (e.hasMoreElements()) {
        ((TestFailure)e.nextElement ()).thrownException().printStackTrace();
    }
    System.out.println(tr.failureCount());
}
 
開發者ID:gemxd,項目名稱:gemfirexd-oss,代碼行數:12,代碼來源:NullableUniqueConstraintTest.java

示例5: runWithResult

import junit.framework.TestResult; //導入方法依賴的package包/類
public void runWithResult() {

        TestResult result   = run();
        String     testName = this.getClass().getName();

        if (testName.startsWith("org.hsqldb.test.")) {
            testName = testName.substring(16);
        }

        testName += "." + getName();

        int failureCount = result.failureCount();

        System.out.println(testName + " failure count: " + failureCount);

        java.util.Enumeration failures = result.failures();

        while (failures.hasMoreElements()) {
            System.err.println(failures.nextElement());
        }
    }
 
開發者ID:tiweGH,項目名稱:OpenDiabetes,代碼行數:22,代碼來源:TestBase.java


注:本文中的junit.framework.TestResult.failures方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。