Package bdjunit.framework

Examples of bdjunit.framework.TestResult


   static public Container getUiTarget() {
       return TestRunnerBase.uiTarget;
   }
            
    public TestResult doRun(Test suite) {
        TestResult result= new TestResult();
        //result.addListener(this.testListener);
        result.addListener(this);
        suite.run(result);
        // Tests Result
        if (result.failureCount() == 0 && result.errorCount() == 0)
        {   // all tests OK
            fStrBuf.append("\nOK");
            fStrBuf.append("\n");
            fStrBuf.append("Tests:" + suite.countTestCases());           
            setTextLabel(fStrBuf.toString());     
        }
        else
        {   // report failure and error
            fStrBuf.append("\n");
            fStrBuf.append("Tests: " + suite.countTestCases() + " ");
            fStrBuf.append("Failures: " + result.failureCount() + " ");
            fStrBuf.append("Errors: " + result.errorCount() + " ");           
            setTextLabel(fStrBuf.toString());           
        }
       
        return result;
    }
View Full Code Here


        DVBLogTestRunner runner = new DVBLogTestRunner();
        return runner.doRun(test);
    }
   
    public TestResult doRun(Test suite) {
        TestResult result= new TestResult();
        //result.addListener(this.testListener);
        result.addListener(this);
        suite.run(result);
        // Tests Result
        StringBuffer fStrBuf = new StringBuffer();
        if (result.failureCount() == 0 && result.errorCount() == 0)
        {   // all tests OK
            fStrBuf.append("OK");
            fStrBuf.append("\n");
            fStrBuf.append("Tests:" + suite.countTestCases());           
            log(fStrBuf.toString());
        }
        else
        {   // report failure and error
            fStrBuf.append("Tests: " + suite.countTestCases() + " ");
            fStrBuf.append("Failures: " + result.failureCount() + " ");
            fStrBuf.append("Errors: " + result.errorCount() + " ");           
            log(fStrBuf.toString());
        }
       
        return result;
    }
View Full Code Here

        SystemOutTestRunner runner = new SystemOutTestRunner();
        return runner.doRun(test);
    }
      
    public TestResult doRun(Test suite) {
        TestResult result= new TestResult();
        result.addListener(this);
        suite.run(result);
        // Tests Result
        StringBuffer strBuf = new StringBuffer();
        if (result.failureCount() == 0 && result.errorCount() == 0) {
            // all tests OK
            strBuf.append("OK");
            strBuf.append("\n");
            strBuf.append("Tests:" + suite.countTestCases());           
            System.out.println(strBuf.toString());
        }
        else {
            // report failure and error
            strBuf.append("Tests: " + suite.countTestCases() + " ");
            strBuf.append("Failures: " + result.failureCount() + " ");
            strBuf.append("Errors: " + result.errorCount() + " ");           
            System.out.println(strBuf.toString());
        }
       
        return result;
    }
View Full Code Here

TOP

Related Classes of bdjunit.framework.TestResult

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.