Example usage for junit.framework TestResult shouldStop

List of usage examples for junit.framework TestResult shouldStop

Introduction

In this page you can find the example usage for junit.framework TestResult shouldStop.

Prototype

public synchronized boolean shouldStop() 

Source Link

Document

Checks whether the test run should stop

Usage

From source file:edu.uci.ics.pregelix.example.jobrun.RunJobTestSuite.java

/**
 * Runs the tests and collects their result in a TestResult.
 *//*from ww  w.  ja  v a  2s  .  co  m*/
@Override
public void run(TestResult result) {
    try {
        int testCount = countTestCases();
        for (int i = 0; i < testCount; i++) {
            // cleanupStores();
            Test each = this.testAt(i);
            if (result.shouldStop())
                break;
            runTest(each, result);
        }
        tearDown();
    } catch (Exception e) {
        throw new IllegalStateException(e);
    }
}