Since AntUnit 1.2
-Asserts that a given resource exists. This is a - generalization of assertFileExists and allows to test for - arbitrary resources.
+Asserts that a given resource exists. This was intended as a
+ generalization of assertFileExists but still really
+ only works for file resources.
+ Use assertNestedResourceExists
+ or assertRefResourceExists for non-filesystem
+ resources.
| Attribute | +Description | +Required | +
| refid | +Reference to a resource defined inside the project. | +Yes | +
| message | +Message for the exception if the condition + doesn't hold true. Defaults to "Expected + resource 'refid' to exist". | +No. | +
Make the build fail if the resource ${ant.home}/lib/ant.jar doesn't + exist:
+ +
+ <file file="${ant.home}/lib/ant.jar" id="ant.jar"/>
+ <assertRefResourceExists refid="ant.jar"/>
+
+
+ assertRefResourceExists relies on Ant 1.8.0 or later,
+ it doesn't work with Ant 1.7.x.
Since AntUnit 1.3
+ +Asserts that a resource given as nested element exists.
+ +| Attribute | +Description | +Required | +
| message | +Message for the exception if the condition + doesn't hold true. Defaults to "Expected resource to exist". | +No. | +
Make the build fail if the resource ${ant.home}/lib/ant.jar doesn't + exist:
+ +
+ <assertNestedResourceExists>
+ <file file="${ant.home}/lib/ant.jar"/>
+ </assertNestedResourceExists>
+
+
+ assertNestedResourceExists relies on Ant 1.8.0 or later,
+ it doesn't work with Ant 1.7.x.
Since AntUnit 1.2
-Asserts that a given resource does not exist. This is a - generalization of assertFileDoesntExist and allows to test for - arbitrary resources.
+Asserts that a given resource does not exist. This was
+ intended as a generalization
+ of assertFileDoesntExist but still really only
+ works for file resources.
+ Use assertNestedResourceDoesntExist
+ or assertRefResourceDoesntExist for non-filesystem
+ resources.
| Attribute | +Description | +Required | +
| refid | +Reference to a resource defined inside the project. | +Yes | +
| message | +Message for the exception if the condition + doesn't hold true. Defaults to "Didn't expect + resource 'refid' to exist". | +No. | +
Make the build fail if the resource ${ant.home}/lib/ant.jar + exists:
+ +
+ <file file="${ant.home}/lib/ant.jar" id="ant.jar"/>
+ <assertRefResourceDoesntExist refid="ant.jar"/>
+
+
+ assertRefResourceDoesntExist relies on Ant 1.8.0 or later,
+ it doesn't work with Ant 1.7.x.
Since AntUnit 1.3
+ +Asserts that a resource given as nested element exists.
+ +| Attribute | +Description | +Required | +
| message | +Message for the exception if the condition + doesn't hold true. Defaults to "Didn't expect + resource to exist". | +No. | +
Make the build fail if the resource ${ant.home}/lib/ant.jar + exists:
+ +
+ <assertNestedResourceDoesntExist>
+ <file file="${ant.home}/lib/ant.jar"/>
+ </assertNestedResourceDoesntExist>
+
+
+ assertNestedResourceDoesntExist relies on Ant 1.8.0 or later,
+ it doesn't work with Ant 1.7.x.
Asserts that a dest file is more recent than the source @@ -786,7 +948,10 @@
Asserts that a resource's content includes a given string.
+Asserts that a resource's content includes a given string.
+ This task anly really works for filesystem resources.
+ Use assertRefResourceContains when using non-file
+ resources.
Since AntUnit 1.3
+ +Asserts that a resource's content includes a given string.
+ +| Attribute | +Description | +Required | +
| refid | +Reference to a resource defined inside the project. | +Yes | +
| value | +The text to search for. | +Yes | +
| casesensitive | ++ Perform a case sensitive match. + Default is true. + | +No. | +
| message | +Message for the exception if the condition + doesn't hold true. Defaults to "Expected resource + 'refeid' to contain value 'value'." | +No. | +
Asserts that a resource's content doesn't include a given string.
+Asserts that a resource's content doesn't include a given string.
+ This task anly really works for filesystem resources.
+ Use assertRefResourceDoesntContain when using non-file
+ resources.
Since AntUnit 1.3
+ +Asserts that a resource's content doesn't include a given string.
+ +| Attribute | +Description | +Required | +
| refid | +Reference to a resource defined inside the project. | +Yes | +
| value | +The text to search for. | +Yes | +
| casesensitive | ++ Perform a case sensitive match. + Default is true. + | +No. | +
| message | +Message for the exception if the condition + doesn't hold true. Defaults to "Didn't expect resource + 'refid' to contain value 'value'". | +No. | +