1 16 17 package org.apache.axis2; 18 19 import junit.framework.TestCase; 20 21 import java.io.File ; 22 23 26 public abstract class AbstractTestCase 27 extends TestCase { 28 protected String testDir = "test" + File.separator; 29 protected String sampleDir = "samples" + File.separator; 30 protected String outDir = "target" + File.separator + "generated" + File.separator + "samples" + File.separator; 31 protected String tempDir = "target" + File.separator + "generated" + File.separator + "temp"; 32 protected String testResourceDir = "test-resources"; 33 34 35 39 public String basedir = System.getProperty("basedir"); 40 41 44 public AbstractTestCase(String testName) { 45 super(testName); 46 if (basedir == null) { 47 basedir = new File (".").getAbsolutePath(); 48 } 49 testDir = new File (basedir, testDir).getAbsolutePath(); 50 sampleDir = new File (basedir, sampleDir).getAbsolutePath(); 51 outDir = new File (basedir, outDir).getAbsolutePath(); 52 tempDir = new File (basedir, tempDir).getAbsolutePath(); 53 } 54 55 56 public File getTestResourceFile(String relativePath) { 57 return new File (testResourceDir, relativePath); 58 } 59 } 60 61 | Popular Tags |