1 package com.melloware.jukes;
2
3 import java.io.File;
4
5 import junit.framework.TestCase;
6
7 /**
8 * Abstract base class for test cases.
9 *
10 * @author <a href="jason@zenplex.com">Jason van Zyl</a>
11 */
12 public abstract class AbstractTestCase
13 extends TestCase
14 {
15 /**
16 * Basedir for all file I/O. Important when running tests from
17 * the reactor.
18 */
19 public String basedir = System.getProperty("basedir");
20
21 /**
22 * Constructor.
23 */
24 public AbstractTestCase(String testName)
25 {
26 super(testName);
27 }
28
29 /**
30 * Get test input file.
31 *
32 * @param path Path to test input file.
33 */
34 public String getTestFile(String path)
35 {
36 return new File(basedir,path).getAbsolutePath();
37 }
38 }
39