ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jan Matèrne (jhm) <apa...@materne.de>
Subject AW: svn commit: r1588563 [4/16] - in /ant/core/trunk: ./ manual/ manual/Types/ src/etc/testcases/taskdefs/ src/etc/testcases/taskdefs/optional/ src/etc/testcases/taskdefs/optional/antlr/ src/etc/testcases/taskdefs/optional/depend/ src/etc/testcases/taskde
Date Sat, 19 Apr 2014 10:10:13 GMT
> +    @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-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Mime
View raw message