1   package junitour.subpackage;
2   
3   import junit.framework.*;
4   import junit.textui.ResultPrinter;
5   
6   import junitour.MyResultPrinter;
7   import junitour.TourTestResult;
8   
9   /**
10   * This is a set of TestCases which never fail
11   *
12   * created: by Hostlowsky, at 03.12.2003
13   * <pre>
14   *
15   * $Log$
16   * Revision 1.2  2004/12/05 04:36:50  hostlows
17   * unused import
18   *
19   * Revision 1.1  2003/12/04 23:45:16  hostlows
20   * new tests
21   *
22   *
23   * </pre>
24   * @author $Author: hostlows $, created by  <a href="mailto:hostlows@users.sf.net">Robert Hostlowsky</a>
25   * @version $Revision: 45 $, $Date: 2004-12-05 05:37:27 +0100 (So, 05 Dez 2004) $
26   */
27  public class FailingTest extends TestCase {
28  
29  	public FailingTest() {
30  	}
31  
32    public void testDefinitlyFails() {
33      fail("This fails!");
34    }
35  
36    public static void main(String[] args) {
37  		runTextUI();
38    //		new junit.swingui.TestRunner().run(ExampleTest.class);
39    //		new junitour.swingui.TestRunner().run(ExampleTest.class);
40  	}
41  
42  	private static void runTextUI() {
43  		ResultPrinter resPrinter = new MyResultPrinter(System.out);
44  		final junit.textui.TestRunner testRunner = new junit.textui.TestRunner(resPrinter) {
45  					protected TestResult createTestResult() {
46  						return new TourTestResult();
47  					}
48  				};
49  		testRunner.doRun(suite());
50  	}
51  
52  	/** creates the testsuite object for this class's test methods.
53     *
54     * @return testsuite for this class
55     */
56    public static TestSuite suite() {
57  		return new TestSuite(FailingTest.class);
58  	}
59  
60  }
61