Author: bodewig
Date: Thu May  1 09:57:49 2014
New Revision: 1591586

URL: http://svn.apache.org/r1591586
Log:
PR 53383 add new assertions that really work with non-file resoucres

Added:
    ant/antlibs/antunit/trunk/src/tests/antunit/assertResourceContains-test.xml
      - copied, changed from r1591570, 
ant/antlibs/antunit/trunk/src/tests/antunit/assertResourceExists-test.xml
Modified:
    ant/antlibs/antunit/trunk/changes.xml
    ant/antlibs/antunit/trunk/docs/assertions.html
    
ant/antlibs/antunit/trunk/src/main/org/apache/ant/antunit/ResourceExists.java
    ant/antlibs/antunit/trunk/src/main/org/apache/ant/antunit/antlib.xml
    ant/antlibs/antunit/trunk/src/tests/antunit/assertResourceExists-test.xml
    ant/antlibs/antunit/trunk/src/tests/antunit/resourceexists-test.xml

Modified: ant/antlibs/antunit/trunk/changes.xml
URL: 
http://svn.apache.org/viewvc/ant/antlibs/antunit/trunk/changes.xml?rev=1591586&r1=1591585&r2=1591586&view=diff
==============================================================================
--- ant/antlibs/antunit/trunk/changes.xml (original)
+++ ant/antlibs/antunit/trunk/changes.xml Thu May  1 09:57:49 2014
@@ -38,6 +38,14 @@
   </properties>
 
   <release version="1.3" date="not-released">
+    <action type="add" issue="53383">
+      New assertion assertRefResourceExists,
+      assertRefResourceDoesntExist, assertRefResourceContains,
+      assertRefResourceDoesntContain, assertNestedResourceExists,
+      assertNestedResourceDoesntExist have been added.  These new
+      assertions work for non-filesystem resources unlike their
+      existing cousins of AntUnit 1.2.
+    </action>
   </release>
 
   <release version="1.2" date="2011-08-16">

Modified: ant/antlibs/antunit/trunk/docs/assertions.html
URL: 
http://svn.apache.org/viewvc/ant/antlibs/antunit/trunk/docs/assertions.html?rev=1591586&r1=1591585&r2=1591586&view=diff
==============================================================================
--- ant/antlibs/antunit/trunk/docs/assertions.html (original)
+++ ant/antlibs/antunit/trunk/docs/assertions.html Thu May  1 09:57:49 2014
@@ -289,9 +289,12 @@
 
     <p><em>Since AntUnit 1.2</em></p>
 
-    <p>Asserts that a given resource exists.  This is a
-      generalization of assertFileExists and allows to test for
-      arbitrary resources.</p>
+    <p>Asserts that a given resource exists.  This was intended as a
+      generalization of <code>assertFileExists</code> but still really
+      only works for file resources.
+      Use <code>assertNestedResourceExists</code>
+      or <code>assertRefResourceExists</code> for non-filesystem
+      resources.</p>
 
     <table border="1" cellpadding="2" cellspacing="0">
         <tr>
@@ -337,13 +340,94 @@
       &lt;/au:assertTrue&gt;
     </pre>
 
+    <h2><a name="assertRefResourceExists">assertRefResourceExists</a></h2>
+
+    <p><em>Since AntUnit 1.3</em></p>
+
+    <p>Asserts that a resource given by its id exists.</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">refid</td>
+          <td valign="top">Reference to a resource defined inside the 
project.</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
+            resource '<em>refid</em>' to exist".</td>
+          <td align="center">No.</td>
+        </tr>
+    </table>
+
+    <h3>Examples</h3>
+
+    <p>Make the build fail if the resource ${ant.home}/lib/ant.jar doesn't
+      exist:</p>
+
+    <pre>
+      &lt;file file="${ant.home}/lib/ant.jar" id="ant.jar"/&gt;
+      &lt;assertRefResourceExists refid="ant.jar"/&gt;
+    </pre>
+
+    <h3>Ant 1.7.x Note</h3>
+
+    <p><code>assertRefResourceExists</code> relies on Ant 1.8.0 or later,
+      it doesn't work with Ant 1.7.x.</p>
+
+    <h2><a 
name="assertNestedResourceExists">assertNestedResourceExists</a></h2>
+
+    <p><em>Since AntUnit 1.3</em></p>
+
+    <p>Asserts that a resource given as nested element exists.</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">message</td>
+          <td valign="top">Message for the exception if the condition
+            doesn't hold true.  Defaults to "Expected resource to exist".</td>
+          <td align="center">No.</td>
+        </tr>
+    </table>
+
+    <h3>Examples</h3>
+
+    <p>Make the build fail if the resource ${ant.home}/lib/ant.jar doesn't
+      exist:</p>
+
+    <pre>
+      &lt;assertNestedResourceExists&gt;
+        &lt;file file="${ant.home}/lib/ant.jar"/&gt;
+      &lt;/assertNestedResourceExists&gt;
+    </pre>
+
+    <h3>Ant 1.7.x Note</h3>
+
+    <p><code>assertNestedResourceExists</code> relies on Ant 1.8.0 or later,
+      it doesn't work with Ant 1.7.x.</p>
+
     <h2><a name="assertResourceDoesntExist">assertResourceDoesntExist</a></h2>
 
     <p><em>Since AntUnit 1.2</em></p>
 
-    <p>Asserts that a given resource does not exist.  This is a
-      generalization of assertFileDoesntExist and allows to test for
-      arbitrary resources.</p>
+    <p>Asserts that a given resource does not exist.  This was
+      intended as a generalization
+      of <code>assertFileDoesntExist</code> but still really only
+      works for file resources.
+      Use <code>assertNestedResourceDoesntExist</code>
+      or <code>assertRefResourceDoesntExist</code> for non-filesystem
+      resources.</p>
 
     <table border="1" cellpadding="2" cellspacing="0">
         <tr>
@@ -389,6 +473,84 @@
       &lt;/au:assertFalse&gt;
     </pre>
 
+    <h2><a 
name="assertRefResourceDoesntExist">assertRefResourceDoesntExist</a></h2>
+
+    <p><em>Since AntUnit 1.3</em></p>
+
+    <p>Asserts that a resource given by its id exists.</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">refid</td>
+          <td valign="top">Reference to a resource defined inside the 
project.</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 "Didn't expect
+            resource '<em>refid</em>' to exist".</td>
+          <td align="center">No.</td>
+        </tr>
+    </table>
+
+    <h3>Examples</h3>
+
+    <p>Make the build fail if the resource ${ant.home}/lib/ant.jar
+      exists:</p>
+
+    <pre>
+      &lt;file file="${ant.home}/lib/ant.jar" id="ant.jar"/&gt;
+      &lt;assertRefResourceDoesntExist refid="ant.jar"/&gt;
+    </pre>
+
+    <h3>Ant 1.7.x Note</h3>
+
+    <p><code>assertRefResourceDoesntExist</code> relies on Ant 1.8.0 or later,
+      it doesn't work with Ant 1.7.x.</p>
+
+    <h2><a 
name="assertNestedResourceDoesntExist">assertNestedResourceDoesntExist</a></h2>
+
+    <p><em>Since AntUnit 1.3</em></p>
+
+    <p>Asserts that a resource given as nested element exists.</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">message</td>
+          <td valign="top">Message for the exception if the condition
+            doesn't hold true.  Defaults to "Didn't expect
+            resource to exist".</td>
+          <td align="center">No.</td>
+        </tr>
+    </table>
+
+    <h3>Examples</h3>
+
+    <p>Make the build fail if the resource ${ant.home}/lib/ant.jar
+      exists:</p>
+
+    <pre>
+      &lt;assertNestedResourceDoesntExist&gt;
+        &lt;file file="${ant.home}/lib/ant.jar"/&gt;
+      &lt;/assertNestedResourceDoesntExist&gt;
+    </pre>
+
+    <h3>Ant 1.7.x Note</h3>
+
+    <p><code>assertNestedResourceDoesntExist</code> relies on Ant 1.8.0 or 
later,
+      it doesn't work with Ant 1.7.x.</p>
+
     <h2><a name="assertDestIsUptodate">assertDestIsUptodate</a></h2>
 
     <p>Asserts that a dest file is more recent than the source
@@ -786,7 +948,10 @@
 
     <h2><a name="assertResourceContains">assertResourceContains</a></h2>
 
-    <p>Asserts that a resource's content includes a given string.</p>
+    <p>Asserts that a resource's content includes a given string.
+      This task anly really works for filesystem resources.
+      Use <code>assertRefResourceContains</code> when using non-file
+      resources.</p>
 
     <table border="1" cellpadding="2" cellspacing="0">
       <tr>
@@ -822,9 +987,51 @@
       </tr>
     </table>
 
+    <h2><a name="assertRefResourceContains">assertRefResourceContains</a></h2>
+
+    <p><em>Since AntUnit 1.3</em></p>
+
+    <p>Asserts that a resource's content includes a given string.</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">refid</td>
+        <td valign="top">Reference to a resource defined inside the 
project.</td>
+        <td valign="top" align="center">Yes</td>
+      </tr>
+      <tr>
+        <td valign="top">value</td>
+        <td valign="top">The text to search for.</td>
+        <td valign="top" align="center">Yes</td>
+      </tr>
+        <tr>
+          <td valign="top">casesensitive</td>
+          <td valign="top">
+            Perform a case sensitive match.
+            Default is true.
+          </td>
+          <td align="center">No.</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 resource
+          '<em>refeid</em>' to contain value '<em>value</em>'."</td>
+        <td align="center">No.</td>
+      </tr>
+    </table>
+
     <h2><a 
name="assertResourceDoesntContain">assertResourceDoesntContain</a></h2>
 
-    <p>Asserts that a resource's content doesn't include a given string.</p>
+    <p>Asserts that a resource's content doesn't include a given string.
+      This task anly really works for filesystem resources.
+      Use <code>assertRefResourceDoesntContain</code> when using non-file
+      resources.</p>
 
     <table border="1" cellpadding="2" cellspacing="0">
       <tr>
@@ -860,6 +1067,45 @@
       </tr>
     </table>
 
+    <h2><a 
name="assertRefResourceDoesntContain">assertRefResourceDoesntContain</a></h2>
+
+    <p><em>Since AntUnit 1.3</em></p>
+
+    <p>Asserts that a resource's content doesn't include a given string.</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">refid</td>
+        <td valign="top">Reference to a resource defined inside the 
project.</td>
+        <td valign="top" align="center">Yes</td>
+      </tr>
+      <tr>
+        <td valign="top">value</td>
+        <td valign="top">The text to search for.</td>
+        <td valign="top" align="center">Yes</td>
+      </tr>
+        <tr>
+          <td valign="top">casesensitive</td>
+          <td valign="top">
+            Perform a case sensitive match.
+            Default is true.
+          </td>
+          <td align="center">No.</td>
+        </tr>
+      <tr>
+        <td valign="top">message</td>
+        <td valign="top">Message for the exception if the condition
+          doesn't hold true.  Defaults to "Didn't expect resource
+          '<em>refid</em>' to contain value '<em>value</em>'".</td>
+        <td align="center">No.</td>
+      </tr>
+    </table>
+
     <hr/>
   </body>
 </html>

Modified: 
ant/antlibs/antunit/trunk/src/main/org/apache/ant/antunit/ResourceExists.java
URL: 
http://svn.apache.org/viewvc/ant/antlibs/antunit/trunk/src/main/org/apache/ant/antunit/ResourceExists.java?rev=1591586&r1=1591585&r2=1591586&view=diff
==============================================================================
--- 
ant/antlibs/antunit/trunk/src/main/org/apache/ant/antunit/ResourceExists.java 
(original)
+++ 
ant/antlibs/antunit/trunk/src/main/org/apache/ant/antunit/ResourceExists.java 
Thu May  1 09:57:49 2014
@@ -24,6 +24,7 @@ import org.apache.tools.ant.BuildExcepti
 import org.apache.tools.ant.ProjectComponent;
 import org.apache.tools.ant.taskdefs.condition.Condition;
 import org.apache.tools.ant.types.Resource;
+import org.apache.tools.ant.types.ResourceCollection;
 
 /**
  * A condition that tests whether a given resource exists.
@@ -32,6 +33,7 @@ import org.apache.tools.ant.types.Resour
  */
 public class ResourceExists extends ProjectComponent implements Condition {
     private Resource resource;
+    private String refid;
 
     /**
      * The resource to check as attribute.
@@ -40,13 +42,20 @@ public class ResourceExists extends Proj
      * nested element.</p>
      */
     public void setResource(Resource r) {
-        if (resource != null) {
-            throw new BuildException("Only one resource can be tested.");
-        }
+        onlyOne();
         resource = r;
     }
 
     /**
+     * The resource to check as a refid.
+     * @since AntUnit 1.3
+     */
+    public void setRefid(String refid) {
+        onlyOne();
+        this.refid = refid;
+    }
+
+    /**
      * The resource to check as nested element.
      *
      * <p>Exactly one resource must be specfied either as attribute or
@@ -57,9 +66,39 @@ public class ResourceExists extends Proj
     }
 
     public boolean eval() {
-        if (resource == null) {
+        if (resource == null && refid == null) {
             throw new BuildException("You must specify a resource.");
         }
-        return resource.isExists();
+        Resource r = resource != null ? resource : expandRefId();
+        return r.isExists();
+    }
+
+    private void onlyOne() {
+        if (resource != null || refid != null) {
+            throw new BuildException("Only one resource can be tested.");
+        }
+    }
+
+    // logic stolen from Ant's ResourceContains condition
+    private Resource expandRefId() {
+        if (getProject() == null) {
+            throw new BuildException("Cannot retrieve refid; project unset");
+        }
+        Object o = getProject().getReference(refid);
+        if (!(o instanceof Resource)) {
+            if (o instanceof ResourceCollection) {
+                ResourceCollection rc = (ResourceCollection) o;
+                if (rc.size() == 1) {
+                    o = rc.iterator().next();
+                } else {
+                    throw new BuildException("Referred resource collection 
must"
+                                             + " contain exactly one 
resource.");
+                }
+            } else {
+                throw new BuildException("'" + refid + "' is not a resource 
but "
+                                         + String.valueOf(o));
+            }
+        }
+        return (Resource) o;
     }
 }

Modified: ant/antlibs/antunit/trunk/src/main/org/apache/ant/antunit/antlib.xml
URL: 
http://svn.apache.org/viewvc/ant/antlibs/antunit/trunk/src/main/org/apache/ant/antunit/antlib.xml?rev=1591586&r1=1591585&r2=1591586&view=diff
==============================================================================
--- ant/antlibs/antunit/trunk/src/main/org/apache/ant/antunit/antlib.xml 
(original)
+++ ant/antlibs/antunit/trunk/src/main/org/apache/ant/antunit/antlib.xml Thu 
May  1 09:57:49 2014
@@ -197,6 +197,81 @@ under the License.
     </sequential>
   </macrodef>
 
+  <macrodef name="assertNestedResourceExists" backtrace="false">
+    <attribute name="message" default="Expected resource to exist"/>
+    <element name="nested-resource" implicit="true"/>
+    <sequential>
+      <au:fail message="@{message}">
+        <au:resourceExists>
+          <nested-resource/>
+        </au:resourceExists>
+      </au:fail>
+    </sequential>
+  </macrodef>
+
+  <macrodef name="assertNestedResourceDoesntExist" backtrace="false">
+    <attribute name="message" default="Didn't expect resource to exist"/>
+    <element name="nested-resource" implicit="true"/>
+    <sequential>
+      <au:assertFalse message="@{message}">
+        <au:resourceExists>
+          <nested-resource/>
+        </au:resourceExists>
+      </au:assertFalse>
+    </sequential>
+  </macrodef>
+
+  <macrodef name="assertRefResourceExists" backtrace="false">
+    <attribute name="refid"/>
+    <attribute name="message"
+               default="Expected resource '@{refid}' to exist"/>
+    <sequential>
+      <au:fail message="@{message}">
+        <au:resourceExists refid="@{refid}"/>
+      </au:fail>
+    </sequential>
+  </macrodef>
+
+  <macrodef name="assertRefResourceDoesntExist" backtrace="false">
+    <attribute name="refid"/>
+    <attribute name="message"
+               default="Didn't expect resource '@{refid}' to exist"/>
+    <sequential>
+      <au:assertFalse message="@{message}">
+        <au:resourceExists refid="@{refid}"/>
+      </au:assertFalse>
+    </sequential>
+  </macrodef>
+
+  <macrodef name="assertRefResourceContains">
+    <attribute name="refid"/>
+    <attribute name="value"/>
+    <attribute name="casesensitive" default="true"/>
+    <attribute name="message"
+              default="Expected resource '@{refid}' to contain value 
'@{value}'"/>
+    <sequential>
+      <au:assertRefResourceExists refid="@{refid}"/>
+      <au:fail message="@{message}">
+       <resourcecontains refid="@{refid}" substring="@{value}"
+                          casesensitive="@{casesensitive}"/>
+      </au:fail>
+    </sequential>
+  </macrodef>
+
+  <macrodef name="assertRefResourceDoesntContain">
+    <attribute name="refid"/>
+    <attribute name="value"/>
+    <attribute name="casesensitive" default="true"/>
+    <attribute name="message"
+              default="Didn't expect resource '@{refid}' to contain value 
'@{value}'"/>
+    <sequential>
+      <au:assertFalse message="@{message}">
+       <resourcecontains refid="@{refid}" substring="@{value}"
+                          casesensitive="@{casesensitive}"/>
+      </au:assertFalse>
+    </sequential>
+  </macrodef>
+
   <macrodef name="assertDestIsUptodate" backtrace="false">
     <attribute name="src"/>
     <attribute name="dest"/>

Copied: 
ant/antlibs/antunit/trunk/src/tests/antunit/assertResourceContains-test.xml 
(from r1591570, 
ant/antlibs/antunit/trunk/src/tests/antunit/assertResourceExists-test.xml)
URL: 
http://svn.apache.org/viewvc/ant/antlibs/antunit/trunk/src/tests/antunit/assertResourceContains-test.xml?p2=ant/antlibs/antunit/trunk/src/tests/antunit/assertResourceContains-test.xml&p1=ant/antlibs/antunit/trunk/src/tests/antunit/assertResourceExists-test.xml&r1=1591570&r2=1591586&rev=1591586&view=diff
==============================================================================
--- ant/antlibs/antunit/trunk/src/tests/antunit/assertResourceExists-test.xml 
(original)
+++ ant/antlibs/antunit/trunk/src/tests/antunit/assertResourceContains-test.xml 
Thu May  1 09:57:49 2014
@@ -19,15 +19,16 @@
 
   <import file="antunit-base.xml"/>
 
-  <target name="NOtestURL"
+  <url url="http://ant.apache.org/index.html"; id="antsite"/>
+
+  <target name="testURLUsingRef"
           
description="https://issues.apache.org/bugzilla/show_bug.cgi?id=53383";>
-    <au:assertResourceExists resource="http://ant.apache.org/index.html"/>
+    <au:assertRefResourceContains refid="antsite" value="Apache Ant"/>
   </target>
 
-  <target name="NOtestURLUsingRef"
+  <target name="testURLUsingRef-no"
           
description="https://issues.apache.org/bugzilla/show_bug.cgi?id=53383";>
-    <url url="http://ant.apache.org/index.html"; id="antsite"/>
-    <au:assertResourceExists resource="${ant.refid:antsite}"/>
+    <au:assertRefResourceDoesntContain refid="antsite" value="Foo"/>
   </target>
 
 </project>

Modified: 
ant/antlibs/antunit/trunk/src/tests/antunit/assertResourceExists-test.xml
URL: 
http://svn.apache.org/viewvc/ant/antlibs/antunit/trunk/src/tests/antunit/assertResourceExists-test.xml?rev=1591586&r1=1591585&r2=1591586&view=diff
==============================================================================
--- ant/antlibs/antunit/trunk/src/tests/antunit/assertResourceExists-test.xml 
(original)
+++ ant/antlibs/antunit/trunk/src/tests/antunit/assertResourceExists-test.xml 
Thu May  1 09:57:49 2014
@@ -19,15 +19,30 @@
 
   <import file="antunit-base.xml"/>
 
-  <target name="NOtestURL"
+  <target name="testURL"
           
description="https://issues.apache.org/bugzilla/show_bug.cgi?id=53383";>
-    <au:assertResourceExists resource="http://ant.apache.org/index.html"/>
+    <au:assertNestedResourceExists>
+      <url url="http://ant.apache.org/index.html"/>
+    </au:assertNestedResourceExists>
   </target>
 
-  <target name="NOtestURLUsingRef"
+  <target name="testURLUsingRef"
           
description="https://issues.apache.org/bugzilla/show_bug.cgi?id=53383";>
     <url url="http://ant.apache.org/index.html"; id="antsite"/>
-    <au:assertResourceExists resource="${ant.refid:antsite}"/>
+    <au:assertRefResourceExists refid="antsite"/>
+  </target>
+
+  <target name="testURL-no"
+          
description="https://issues.apache.org/bugzilla/show_bug.cgi?id=53383";>
+    <au:assertNestedResourceDoesntExist>
+      <url url="http://ant.apache.org/foo.html"/>
+    </au:assertNestedResourceDoesntExist>
+  </target>
+
+  <target name="testURLUsingRef-no"
+          
description="https://issues.apache.org/bugzilla/show_bug.cgi?id=53383";>
+    <url url="http://ant.apache.org/foo.html"; id="antsite-foo"/>
+    <au:assertRefResourceDoesntExist refid="antsite-foo"/>
   </target>
 
 </project>

Modified: ant/antlibs/antunit/trunk/src/tests/antunit/resourceexists-test.xml
URL: 
http://svn.apache.org/viewvc/ant/antlibs/antunit/trunk/src/tests/antunit/resourceexists-test.xml?rev=1591586&r1=1591585&r2=1591586&view=diff
==============================================================================
--- ant/antlibs/antunit/trunk/src/tests/antunit/resourceexists-test.xml 
(original)
+++ ant/antlibs/antunit/trunk/src/tests/antunit/resourceexists-test.xml Thu May 
 1 09:57:49 2014
@@ -27,6 +27,20 @@
     </au:assertTrue>
   </target>
 
+  <target name="test-refid-file">
+    <file file="resourceexists-test.xml" id="id1"/>
+    <au:assertTrue>
+      <au:resourceExists refid="id1"/>
+    </au:assertTrue>
+  </target>
+
+  <target name="test-refid-fileset">
+    <fileset file="resourceexists-test.xml" id="id2"/>
+    <au:assertTrue>
+      <au:resourceExists refid="id2"/>
+    </au:assertTrue>
+  </target>
+
   <target name="test-no">
     <au:assertFalse>
       <au:resourceExists>
@@ -43,12 +57,6 @@
     </au:assertTrue>
   </target>
 
-  <target name="NOtestURLAttribute">
-    <au:assertTrue>
-      <au:resourceExists resource="http://ant.apache.org/index.html"/>
-    </au:assertTrue>
-  </target>
-
   <target name="testURLAttributeUsingRef">
     <url url="http://ant.apache.org/index.html"; id="antsite"/>
     <au:assertTrue>


Reply via email to