<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package javaunittest;

import java.util.ArrayList;

/**
 *
 * @author Jackie Ng
 */
public abstract class AbstractTestSuite {

    protected int _passes;

    protected ArrayList&lt;Exception&gt; _failures;

    protected AbstractTestSuite(){
        _passes=  0;
        _failures = new ArrayList&lt;Exception&gt;();
    }

    public int getPasses() { return _passes; }

    public ArrayList&lt;Exception&gt; getFailures() { return _failures; }

    protected abstract void setup();

    protected abstract void teardown();

    protected abstract void runTests();

    public void execute() {
        setup();
        try {
            runTests();
        } finally {
            teardown();
        }
    }
}
</pre></body></html>