FileDocCategorySizeDatePackage
FacadeTaskHelperTest.javaAPI DocApache Ant 1.702194Wed Dec 13 06:16:20 GMT 2006org.apache.tools.ant.util.facade

FacadeTaskHelperTest

public class FacadeTaskHelperTest extends TestCase
since
Ant 1.5

Fields Summary
Constructors Summary
public FacadeTaskHelperTest(String name)

        super(name);
    
Methods Summary
public voidtestHasBeenSet()

        FacadeTaskHelper fth = new FacadeTaskHelper("foo");
        assertTrue("nothing set", !fth.hasBeenSet());
        fth.setMagicValue(null);
        assertTrue("magic has not been set", !fth.hasBeenSet());
        fth.setMagicValue("foo");
        assertTrue("magic has been set", fth.hasBeenSet());
        fth.setMagicValue(null);
        assertTrue(!fth.hasBeenSet());
        fth.setImplementation("baz");
        assertTrue("set explicitly", fth.hasBeenSet());
    
public voidtestPrecedenceRules()

        FacadeTaskHelper fth = new FacadeTaskHelper("foo");
        assertEquals("foo", fth.getImplementation());

        fth.setMagicValue("bar");
        assertEquals("bar", fth.getImplementation());

        fth = new FacadeTaskHelper("foo", "bar");
        assertEquals("bar", fth.getImplementation());

        fth = new FacadeTaskHelper("foo", null);
        assertEquals("foo", fth.getImplementation());

        fth = new FacadeTaskHelper("foo");
        fth.setMagicValue("bar");
        fth.setImplementation("baz");
        assertEquals("baz", fth.getImplementation());