1 package fr.jayasoft.ivy.ant; 2 3 import java.io.File ; 4 5 import junit.framework.TestCase; 6 7 import org.apache.tools.ant.Project; 8 import org.apache.tools.ant.taskdefs.Delete; 9 10 public class IvyRepositoryReportTest extends TestCase { 11 private File _cache; 12 private IvyRepositoryReport _report; 13 14 protected void setUp() throws Exception { 15 createCache(); 16 Project project = new Project(); 17 project.setProperty("ivy.conf.file", "test/repositories/ivyconf-1.xml"); 18 19 _report = new IvyRepositoryReport(); 20 _report.setProject(project); 21 _report.setCache(_cache); 22 } 23 24 private void createCache() { 25 _cache = new File ("build/cache"); 26 _cache.mkdirs(); 27 } 28 29 protected void tearDown() throws Exception { 30 cleanCache(); 31 } 32 33 private void cleanCache() { 34 Delete del = new Delete(); 35 del.setProject(new Project()); 36 del.setDir(_cache); 37 del.execute(); 38 } 39 40 public void test() {} 41 42 } 71 | Popular Tags |