You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Pascal Schumacher <pa...@gmx.net> on 2012/06/07 22:31:01 UTC

AntUnit - Using assertResourceExists to check URL

Hello everybody,

according to the AntUnit 1.2 documentation

"assertResourceExists
Asserts that a given resource exists. This is a generalization of 
assertFileExists and allows to test for arbitrary resources."

it should be possible to check if a URL exists. But I can't figure out 
how to do it. I tried two ways:

<au:assertResourceExists resource="http://ant.apache.org/index.html"/>

BUILD FAILED
D:\development\eclipse-projects\AntUnitTest\build.xml:6: Expected 
resource 'http://ant.apache.org/index.html' to exist

<au:assertResourceExists>
<url url="http://ant.apache.org/index.html" />
</au:assertResourceExists>

BUILD FAILED
D:\development\eclipse-projects\AntUnitTest\build.xml:8: unsupported 
element url

How do I do this correctly?

Thanks and kind regards,
Pascal

Re: AntUnit - Using assertResourceExists to check URL

Posted by Stefan Bodewig <bo...@apache.org>.
On 2012-06-08, Pascal Schumacher wrote:

> I opened a bugzilla issue:
> https://issues.apache.org/bugzilla/show_bug.cgi?id=53383

Great, thanks

       Stefan

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Re: AntUnit - Using assertResourceExists to check URL

Posted by Pascal Schumacher <Pa...@gmx.net>.
Hello Stefan,

thanks for the quick response. :-)

I opened a bugzilla issue: https://issues.apache.org/bugzilla/show_bug.cgi?id=53383

Pascal

-- 
Empfehlen Sie GMX DSL Ihren Freunden und Bekannten und wir
belohnen Sie mit bis zu 50,- Euro! https://freundschaftswerbung.gmx.de

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Re: AntUnit - Using assertResourceExists to check URL

Posted by Stefan Bodewig <bo...@apache.org>.
On 2012-06-07, Pascal Schumacher wrote:

> Hello everybody,

> according to the AntUnit 1.2 documentation

> "assertResourceExists
> Asserts that a given resource exists. This is a generalization of
> assertFileExists and allows to test for arbitrary resources."

> it should be possible to check if a URL exists. But I can't figure out
> how to do it. I tried two ways:

> <au:assertResourceExists resource="http://ant.apache.org/index.html"/>

In general assertResourceExists only works for Ant 1.8.x as it needs
some changes to IntrospectionHelper.  See
<https://issues.apache.org/bugzilla/show_bug.cgi?id=52332>

In this particular case it doesn't wok for 1.8.4 either.  This is a
bug.  Could you please open a bugzilla issue for it?

Stefan

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org