incubator-easyant-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jlboud...@apache.org
Subject svn commit: r1406307 - in /incubator/easyant/core/trunk/src/test/java/org/apache/easyant/core/ant: ./ ModuleIvyProjectHelperTest.java
Date Tue, 06 Nov 2012 20:24:50 GMT
Author: jlboudart
Date: Tue Nov  6 20:24:50 2012
New Revision: 1406307

URL: http://svn.apache.org/viewvc?rev=1406307&view=rev
Log:
Add basic test for ModuleIvyProjectHelper

Added:
    incubator/easyant/core/trunk/src/test/java/org/apache/easyant/core/ant/
    incubator/easyant/core/trunk/src/test/java/org/apache/easyant/core/ant/ModuleIvyProjectHelperTest.java

Added: incubator/easyant/core/trunk/src/test/java/org/apache/easyant/core/ant/ModuleIvyProjectHelperTest.java
URL: http://svn.apache.org/viewvc/incubator/easyant/core/trunk/src/test/java/org/apache/easyant/core/ant/ModuleIvyProjectHelperTest.java?rev=1406307&view=auto
==============================================================================
--- incubator/easyant/core/trunk/src/test/java/org/apache/easyant/core/ant/ModuleIvyProjectHelperTest.java
(added)
+++ incubator/easyant/core/trunk/src/test/java/org/apache/easyant/core/ant/ModuleIvyProjectHelperTest.java
Tue Nov  6 20:24:50 2012
@@ -0,0 +1,33 @@
+package org.apache.easyant.core.ant;
+
+import java.io.File;
+import java.net.URISyntaxException;
+
+import org.apache.easyant.core.EasyAntMagicNames;
+import org.apache.tools.ant.Project;
+import org.apache.tools.ant.ProjectHelper;
+import org.apache.tools.ant.ProjectHelperRepository;
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Test;
+
+public class ModuleIvyProjectHelperTest {
+    @Before
+    public void setUp() {
+        // ProjectHelperRepository.getInstance().registerProjectHelper("org.apache.easyant.core.ant.EasyAntProjectHelper");
+
+        ProjectHelperRepository.getInstance().registerProjectHelper(
+                "org.apache.easyant.core.ant.ModuleIvyProjectHelper");
+    }
+
+    @Test
+    public void shouldHandleModuleIvyFile() throws URISyntaxException {
+        File f = new File(this.getClass().getResource("../standardJavaProject.ivy").toURI());
+        Project p = new Project();
+        p.setNewProperty(EasyAntMagicNames.IGNORE_USER_IVYSETTINGS, "true");
+        p.setNewProperty(EasyAntMagicNames.GLOBAL_EASYANT_IVYSETTINGS,
+                this.getClass().getResource("/ivysettings-test.xml").toString());
+        ProjectHelper.configureProject(p, f);
+        Assert.assertNotNull(p.getTargets().get("clean"));
+    }
+}



Mime
View raw message