01: package jdepend.framework;
02:
03: import java.io.*;
04:
05: import junit.framework.*;
06:
07: /**
08: * @author <b>Mike Clark</b>
09: * @author Clarkware Consulting, Inc.
10: */
11:
12: public class JDependTestCase extends TestCase {
13:
14: private String homeDir;
15: private String testDir;
16: private String testDataDir;
17: private String buildDir;
18: private String packageSubDir;
19: private String originalUserHome;
20:
21: public JDependTestCase(String name) {
22: super (name);
23: }
24:
25: protected void setUp() {
26:
27: homeDir = System.getProperty("jdepend.home");
28: if (homeDir == null) {
29: fail("Property 'jdepend.home' not defined");
30: }
31: homeDir = homeDir + File.separator;
32: testDir = homeDir + File.separator + "test" + File.separator;
33: testDataDir = testDir + "data" + File.separator;
34: buildDir = homeDir + "build" + File.separator;
35: packageSubDir = "jdepend" + File.separator + "framework"
36: + File.separator;
37: originalUserHome = System.getProperty("user.home");
38: }
39:
40: protected void tearDown() {
41: System.setProperty("user.home", originalUserHome);
42: }
43:
44: public String getHomeDir() {
45: return homeDir;
46: }
47:
48: public String getTestDataDir() {
49: return testDataDir;
50: }
51:
52: public String getTestDir() {
53: return testDir;
54: }
55:
56: public String getBuildDir() {
57: return buildDir;
58: }
59:
60: public String getPackageSubDir() {
61: return packageSubDir;
62: }
63: }
|