FileDocCategorySizeDatePackage
BasenameTest.javaAPI DocApache Ant 1.702581Wed Dec 13 06:16:24 GMT 2006org.apache.tools.ant.taskdefs

BasenameTest

public class BasenameTest extends org.apache.tools.ant.BuildFileTest

Fields Summary
Constructors Summary
public BasenameTest(String name)

        super(name);
    
Methods Summary
public voidsetUp()

        configureProject("src/etc/testcases/taskdefs/basename.xml");
    
public voidtest1()

        expectBuildException("test1", "required attribute missing");
    
public voidtest2()

        expectBuildException("test2", "required attribute missing");
    
public voidtest3()

        expectBuildException("test3", "required attribute missing");
    
public voidtest4()

        executeTarget("test4");
        String checkprop = project.getProperty("file.w.suf");
        assertEquals("foo.txt", checkprop);
    
public voidtest5()

        executeTarget("test5");
        String checkprop = project.getProperty("file.wo.suf");
        assertEquals("foo", checkprop);
    
public voidtestMultipleDots()

        executeTarget("testMultipleDots");
        String checkprop = project.getProperty("file.wo.suf");
        assertEquals("foo.bar", checkprop);
    
public voidtestNoDots()

        executeTarget("testNoDots");
        String checkprop = project.getProperty("file.wo.suf");
        assertEquals("foo.bar", checkprop);
    
public voidtestValueEqualsSuffixWithDot()

        executeTarget("testValueEqualsSuffixWithDot");
        String checkprop = project.getProperty("file.wo.suf");
        assertEquals("", checkprop);
    
public voidtestValueEqualsSuffixWithoutDot()

        executeTarget("testValueEqualsSuffixWithoutDot");
        String checkprop = project.getProperty("file.wo.suf");
        assertEquals("", checkprop);