Code example for TestResult

Methods: endTest, runProtected, startTest

0
        } 
    } 
 
    protected void run(final TestResult result, final Method testMethod) {
        Test test = createTest(testMethod);
        result.startTest(test);
        Protectable p= new Protectable() {
            public void protect() throws Throwable { 
                runTestMethod(testMethod);
            } 
        }; 
        result.runProtected(test, p);
        result.endTest(test);
    } 
     
 
    protected Test createTest(final Method testMethod){
        Test test = new NamedTest(testMethod);
        return test;
    }