1 17 18 package org.apache.tools.ant.taskdefs; 19 20 import org.apache.tools.ant.BuildFileTest; 21 import org.apache.tools.ant.util.FileUtils; 22 23 import java.io.IOException ; 24 25 27 public class BUnzip2Test extends BuildFileTest { 28 29 public BUnzip2Test(String name) { 30 super(name); 31 } 32 33 public void setUp() { 34 configureProject("src/etc/testcases/taskdefs/bunzip2.xml"); 35 executeTarget("prepare"); 36 } 37 38 public void tearDown() { 39 executeTarget("cleanup"); 40 } 41 42 public void testRealTest() throws java.io.IOException { 43 FileUtils fileUtils = FileUtils.newFileUtils(); 44 executeTarget("realTest"); 45 assertTrue("File content mismatch after bunzip2", 46 fileUtils.contentEquals(project.resolveFile("expected/asf-logo-huge.tar"), 47 project.resolveFile("asf-logo-huge.tar"))); 48 } 49 } 50 | Popular Tags |