You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ant.apache.org by bo...@apache.org on 2009/01/28 10:59:29 UTC

svn commit: r738428 - /ant/antlibs/antunit/trunk/docs/assertions.html

Author: bodewig
Date: Wed Jan 28 09:59:28 2009
New Revision: 738428

URL: http://svn.apache.org/viewvc?rev=738428&view=rev
Log:
sync docs with antlib

Modified:
    ant/antlibs/antunit/trunk/docs/assertions.html

Modified: ant/antlibs/antunit/trunk/docs/assertions.html
URL: http://svn.apache.org/viewvc/ant/antlibs/antunit/trunk/docs/assertions.html?rev=738428&r1=738427&r2=738428&view=diff
==============================================================================
--- ant/antlibs/antunit/trunk/docs/assertions.html (original)
+++ ant/antlibs/antunit/trunk/docs/assertions.html Wed Jan 28 09:59:28 2009
@@ -28,7 +28,7 @@
     assertions that are specializations of the <a
     href="assert.html">&lt;assertTrue&gt;</a> task.</p>
 
-    <h2><a name="assertFalse">AssertFalse</a></h2>
+    <h2><a name="assertFalse">assertFalse</a></h2>
 
     <h3>Description</h3>
 
@@ -172,6 +172,53 @@
                               name="foo" casesensitive="false"/&gt;
     </pre>
 
+    <h2><a name="assertPropertyContains">assertPropertyContains</a></h2>
+
+    <p>Asserts that a given property is set and holds a certain
+    value as substring.</p>
+
+    <table border="1" cellpadding="2" cellspacing="0">
+        <tr>
+          <td valign="top"><b>Attribute</b></td>
+          <td valign="top"><b>Description</b></td>
+          <td align="center" valign="top"><b>Required</b></td>
+        </tr>
+        <tr>
+          <td valign="top">name</td>
+          <td valign="top">Name of the property.</td>
+          <td valign="top" align="center">Yes</td>
+        </tr>
+        <tr>
+          <td valign="top">value</td>
+          <td valign="top">Expected substring value.</td>
+          <td valign="top" align="center">Yes</td>
+        </tr>
+        <tr>
+          <td valign="top">message</td>
+          <td valign="top">Message for the exception if the condition
+            doesn't hold true. Defaults to "Expected property
+            '<em>name</em>' to contain value '<em>value</em>' but was
+            '<em>value of property name</em>'".</td>
+          <td align="center">No.</td>
+        </tr>
+        <tr>
+          <td valign="top">casesensitive</td>
+          <td valign="top">Perform a case sensitive comparision.
+            Default is true.</td>
+          <td valign="top" align="center">No</td>
+        </tr>
+    </table>
+
+    <h3>Examples</h3>
+
+    <p>Make the build fail with the message "foo doesn't contain bar" if the
+      property foo doesn't contain the value bar regardless of case:</p>
+
+    <pre>
+      &lt;assertPropertyContains message="foo doesn't contain bar" value="bar"
+                              name="foo" casesensitive="false"/&gt;
+    </pre>
+
     <h2><a name="assertFileExists">assertFileExists</a></h2>
 
     <p>Asserts that a given file exists.</p>
@@ -238,7 +285,7 @@
       &lt;assertFileDoesntExist file="${ant.home}/lib/ant.jar"/&gt;
     </pre>
 
-    <h2><a name="assertDestIsUpToDate">assertDestIsUpToDate</a></h2>
+    <h2><a name="assertDestIsUptodate">assertDestIsUptodate</a></h2>
 
     <p>Asserts that a dest file is more recent than the source
       file.</p>
@@ -277,7 +324,7 @@
       &lt;assertDestIsUptodate dest="${ant.file}" src="${ant.home}/lib/ant.jar"/&gt;
     </pre>
 
-    <h2><a name="assertDestIsOutofDate">assertDestIsOutofDate</a></h2>
+    <h2><a name="assertDestIsOutofdate">assertDestIsOutofdate</a></h2>
 
     <p>Asserts that a source file is more recent than the dest
       file.</p>