ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Pascal Schumacher <pascalschumac...@gmx.net>
Subject AntUnit - Using assertResourceExists to check URL
Date Thu, 07 Jun 2012 20:31:01 GMT
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

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message