001: /**************************************************************************/
002: /* NICE Testsuite */
003: /* A testsuite for the Nice programming language */
004: /* (c) Alex Greif 2002 */
005: /* */
006: /* This program is free software; you can redistribute it and/or modify */
007: /* it under the terms of the GNU General Public License as published by */
008: /* the Free Software Foundation; either version 2 of the License, or */
009: /* (at your option) any later version. */
010: /* */
011: /**************************************************************************/package nice.tools.testsuite.output;
012:
013: import java.io.*;
014: import java.util.*;
015:
016: import nice.tools.testsuite.*;
017:
018: /**
019: * The output Interface. The start..() and end..() methods are sort of
020: * events callbacks, that can be called while runtime. Classes that implement tis interface
021: * can decide which events to implement and in what format the messages should be logged.
022: *
023: * @author Alex Greif <a href="mailto:alex.greif@web.de">alex.greif@web.de</a>
024: * @version $Id: Output.java,v 1.7 2002/09/07 21:05:04 agreif Exp $
025: */
026: public interface Output {
027:
028: /**
029: * Called when the application starts up.
030: *
031: */
032: public void startApplication();
033:
034: /**
035: * Called when the application terminates.
036: *
037: */
038: public void endApplication();
039:
040: /**
041: * Called when the testsuite starts to perform its testcases..
042: *
043: * @param testSuite TODO
044: */
045: public void startTestSuite(TestSuite testSuite);
046:
047: /**
048: * Called when the testsuite finishes to perform its testcases..
049: *
050: */
051: public void endTestSuite();
052:
053: /**
054: * Called when the testcase starts to perform.
055: *
056: * @param testCase TODO
057: */
058: public void startTestCase(TestCase testCase);
059:
060: /**
061: * Called when the testcase is performed.
062: *
063: * @param succeeded TODO
064: */
065: public void endTestCase(boolean succeeded);
066:
067: /**
068: * Logs a statement to this Appender.
069: *
070: * @param statement TODO
071: */
072: public void log(String statement);
073:
074: /**
075: * Logs a statement with the given prefix in angled braces.
076: *
077: * @param prefix TODO
078: * @param statement TODO
079: */
080: public void log(String prefix, String statement);
081:
082: /**
083: * Logs a statement to this output and flushes the writer.
084: *
085: * @param statement TODO
086: */
087: public void logAndFlush(String statement);
088:
089: /**
090: * Logs a statement with the given prefix in angled braces and flushes the writer.
091: *
092: * @param prefix TODO
093: * @param statement TODO
094: */
095: public void logAndFlush(String prefix, String statement);
096:
097: /**
098: * Closes the underlying writer.
099: *
100: */
101: public void close();
102:
103: }
|