> +    @Rule
> +    public BuildFileRule buildRule = new BuildFileRule();
> +
> +    @Before
>      public void setUp() {
> -        configureProject("src/etc/testcases/taskdefs/available.xml");
> -        executeTarget("setUp");
> +        
> buildRule.configureProject("src/etc/testcases/taskdefs/available.xml");
> +        buildRule.executeTarget("setUp");
>      }
> 
>      // Nothing specified -> Fail
> +    @Test
>      public void test1() {
> -        expectBuildException("test1", "required argument not specified");
> +        try {
> +            buildRule.executeTarget("test1");
> +            fail("Required argument not specified");
> +        } catch (BuildException ex) {
> +            //TODO assert exception message
> +        }
>      }


Some ideas:

buildRule.executeTarget("test1");
==> could the BuildFileRule use a default (test name) for executeTarget?
    buildRule.executeTarget();


//TODO assert exception message
Here the rule ExpectedException would help


Jan


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@ant.apache.org
For additional commands, e-mail: dev-h...@ant.apache.org

Reply via email to