ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hi...@apache.org
Subject svn commit: r1028015 - /ant/ivy/core/trunk/test/java/org/apache/ivy/ant/IvyResourcesTest.java
Date Wed, 27 Oct 2010 15:59:00 GMT
Author: hibou
Date: Wed Oct 27 15:59:00 2010
New Revision: 1028015

URL: http://svn.apache.org/viewvc?rev=1028015&view=rev
Log:
fix the compilation of the unit test

Modified:
    ant/ivy/core/trunk/test/java/org/apache/ivy/ant/IvyResourcesTest.java

Modified: ant/ivy/core/trunk/test/java/org/apache/ivy/ant/IvyResourcesTest.java
URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/test/java/org/apache/ivy/ant/IvyResourcesTest.java?rev=1028015&r1=1028014&r2=1028015&view=diff
==============================================================================
--- ant/ivy/core/trunk/test/java/org/apache/ivy/ant/IvyResourcesTest.java (original)
+++ ant/ivy/core/trunk/test/java/org/apache/ivy/ant/IvyResourcesTest.java Wed Oct 27 15:59:00
2010
@@ -82,11 +82,10 @@ public class IvyResourcesTest extends Te
     }
 
     public void testSimple() throws Exception {
-        IvyDependency dependency = new IvyDependency();
+        IvyDependency dependency = resources.createDependency();
         dependency.setOrg("org1");
         dependency.setName("mod1.2");
         dependency.setRev("2.0");
-        resources.addDependency(dependency);
 
         resources.iterator();
 
@@ -96,17 +95,15 @@ public class IvyResourcesTest extends Te
     }
 
     public void testMultiple() throws Exception {
-        IvyDependency dependency = new IvyDependency();
+        IvyDependency dependency = resources.createDependency();
         dependency.setOrg("org1");
         dependency.setName("mod1.2");
         dependency.setRev("2.0");
-        resources.addDependency(dependency);
 
-        dependency = new IvyDependency();
+        dependency = resources.createDependency();
         dependency.setOrg("org2");
         dependency.setName("mod2.3");
         dependency.setRev("0.7");
-        resources.addDependency(dependency);
 
         resources.iterator();
 
@@ -129,18 +126,16 @@ public class IvyResourcesTest extends Te
     }
 
     public void testMultipleWithConf() throws Exception {
-        IvyDependency dependency = new IvyDependency();
+        IvyDependency dependency = resources.createDependency();
         dependency.setOrg("org1");
         dependency.setName("mod1.2");
         dependency.setRev("2.0");
-        resources.addDependency(dependency);
 
-        dependency = new IvyDependency();
+        dependency = resources.createDependency();
         dependency.setOrg("org2");
         dependency.setName("mod2.2");
         dependency.setRev("0.10");
         dependency.setConf("A");
-        resources.addDependency(dependency);
 
         resources.iterator();
 
@@ -159,18 +154,16 @@ public class IvyResourcesTest extends Te
     }
 
     public void testMultipleWithConf2() throws Exception {
-        IvyDependency dependency = new IvyDependency();
+        IvyDependency dependency = resources.createDependency();
         dependency.setOrg("org1");
         dependency.setName("mod1.2");
         dependency.setRev("2.0");
-        resources.addDependency(dependency);
 
-        dependency = new IvyDependency();
+        dependency = resources.createDependency();
         dependency.setOrg("org2");
         dependency.setName("mod2.2");
         dependency.setRev("0.10");
         dependency.setConf("B");
-        resources.addDependency(dependency);
 
         resources.iterator();
 
@@ -189,13 +182,11 @@ public class IvyResourcesTest extends Te
     }
 
     public void testFail() throws Exception {
-        IvyDependency dependency = new IvyDependency();
-
+        IvyDependency dependency = resources.createDependency();
         dependency.setOrg("org1");
         dependency.setName("noexisting");
         dependency.setRev("2.0");
 
-        resources.addDependency(dependency);
         try {
             resources.iterator();
             fail("A fail resolved should have raised a build exception");



Mime
View raw message