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