01: /* JUnitUtils.java
02: *
03: * DDSteps - Data Driven JUnit Test Steps
04: * Copyright (C) 2005 Jayway AB
05: * www.ddsteps.org
06: *
07: * This library is free software; you can redistribute it and/or
08: * modify it under the terms of the GNU Lesser General Public
09: * License version 2.1 as published by the Free Software Foundation.
10: *
11: * This library is distributed in the hope that it will be useful,
12: * but WITHOUT ANY WARRANTY; without even the implied warranty of
13: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14: * Lesser General Public License for more details.
15: *
16: * You should have received a copy of the GNU Lesser General Public
17: * License along with this library; if not, visit
18: * http://www.opensource.org/licenses/lgpl-license.php
19: */
20: package org.ddsteps.junit;
21:
22: import junit.framework.Test;
23: import junit.framework.TestCase;
24:
25: /**
26: * Utilities for JUnit, typically copied from JUnit stuff that could not be reached.
27: *
28: * @author adamskogman
29: * @version $Id: JUnitUtils.java,v 1.1 2005/12/03 12:51:40 adamskogman Exp $
30: */
31: public class JUnitUtils {
32:
33: /**
34: * Returns a test which will fail and log a warning message.'
35: *
36: * @author JUnit
37: * @param message The warning message
38: * @return A TestCase
39: */
40: public static Test warning(final String message) {
41: return new TestCase("warning") {
42: protected void runTest() {
43: fail(message);
44: }
45: };
46: }
47:
48: }
|