ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jlboud...@apache.org
Subject ant-easyant-core git commit: fix EASYANT-72 Test SearchModuleTest.shouldFindExistingModuleWithRegexpParameter fails (thanks to Jérôme Leroux)
Date Fri, 06 Feb 2015 19:28:44 GMT
Repository: ant-easyant-core
Updated Branches:
  refs/heads/master 0d30d6fa0 -> 930f05e54


fix EASYANT-72 Test SearchModuleTest.shouldFindExistingModuleWithRegexpParameter fails (thanks
to Jérôme Leroux)


Project: http://git-wip-us.apache.org/repos/asf/ant-easyant-core/repo
Commit: http://git-wip-us.apache.org/repos/asf/ant-easyant-core/commit/930f05e5
Tree: http://git-wip-us.apache.org/repos/asf/ant-easyant-core/tree/930f05e5
Diff: http://git-wip-us.apache.org/repos/asf/ant-easyant-core/diff/930f05e5

Branch: refs/heads/master
Commit: 930f05e5470a026e806234f10435392f0d26152a
Parents: 0d30d6f
Author: Jean-Louis Boudart <jeanlouis.boudart@gmail.com>
Authored: Fri Feb 6 20:28:39 2015 +0100
Committer: Jean-Louis Boudart <jeanlouis.boudart@gmail.com>
Committed: Fri Feb 6 20:28:39 2015 +0100

----------------------------------------------------------------------
 .../apache/easyant/tasks/SearchModuleTest.java  | 22 +++++++++---------
 .../plugins/anothercompany/README.md            |  3 +++
 .../simpleplugin/ants/simpleplugin-0.1.ant      | 19 ++++++++++++++++
 .../simpleplugin/ivys/ivy-0.1.xml               | 24 ++++++++++++++++++++
 4 files changed, 57 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ant-easyant-core/blob/930f05e5/src/test/java/org/apache/easyant/tasks/SearchModuleTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/easyant/tasks/SearchModuleTest.java b/src/test/java/org/apache/easyant/tasks/SearchModuleTest.java
index ee17f59..53bfce5 100644
--- a/src/test/java/org/apache/easyant/tasks/SearchModuleTest.java
+++ b/src/test/java/org/apache/easyant/tasks/SearchModuleTest.java
@@ -17,13 +17,6 @@
  */
 package org.apache.easyant.tasks;
 
-import static org.hamcrest.CoreMatchers.is;
-import static org.junit.Assert.assertThat;
-
-import java.io.File;
-import java.io.IOException;
-import java.net.URISyntaxException;
-
 import org.apache.easyant.core.EasyAntMagicNames;
 import org.apache.easyant.core.ant.ProjectUtils;
 import org.apache.easyant.core.ivy.IvyInstanceHelper;
@@ -36,11 +29,18 @@ import org.junit.Test;
 import org.junit.rules.ExpectedException;
 import org.junit.rules.TemporaryFolder;
 
+import java.io.File;
+import java.io.IOException;
+import java.net.URISyntaxException;
+
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertThat;
+
 public class SearchModuleTest {
 
-    private SearchModule searchModule = new SearchModule();
+    private final SearchModule searchModule = new SearchModule();
 
-    private FakeInputHandler fakeInputHandler = new FakeInputHandler();
+    private final FakeInputHandler fakeInputHandler = new FakeInputHandler();
 
     @Rule
     public TemporaryFolder folder = new TemporaryFolder();
@@ -129,13 +129,13 @@ public class SearchModuleTest {
 
     @Test
     public void shouldFindExistingModuleWithRegexpParameter() {
-        searchModule.setOrganisation("mycompany");
+        searchModule.setOrganisation("anothercompany");
         searchModule.setModule("*");
         searchModule.setRevision("*");
         searchModule.setPropertyPrefix("mysearch");
         fakeInputHandler.setInput("0");
         searchModule.execute();
-        assertThat(searchModule.getProject().getProperty("mysearch.org"), is("mycompany"));
+        assertThat(searchModule.getProject().getProperty("mysearch.org"), is("anothercompany"));
         assertThat(searchModule.getProject().getProperty("mysearch.module"), is("simpleplugin"));
         assertThat(searchModule.getProject().getProperty("mysearch.rev"), is("0.1"));
     }

http://git-wip-us.apache.org/repos/asf/ant-easyant-core/blob/930f05e5/src/test/resources/repositories/plugins/anothercompany/README.md
----------------------------------------------------------------------
diff --git a/src/test/resources/repositories/plugins/anothercompany/README.md b/src/test/resources/repositories/plugins/anothercompany/README.md
new file mode 100644
index 0000000..a86e250
--- /dev/null
+++ b/src/test/resources/repositories/plugins/anothercompany/README.md
@@ -0,0 +1,3 @@
+# Notes
+This organization must include only one module: `simpleplugin`.
+The test `SearchModuleTest` assumes this.

http://git-wip-us.apache.org/repos/asf/ant-easyant-core/blob/930f05e5/src/test/resources/repositories/plugins/anothercompany/simpleplugin/ants/simpleplugin-0.1.ant
----------------------------------------------------------------------
diff --git a/src/test/resources/repositories/plugins/anothercompany/simpleplugin/ants/simpleplugin-0.1.ant
b/src/test/resources/repositories/plugins/anothercompany/simpleplugin/ants/simpleplugin-0.1.ant
new file mode 100644
index 0000000..ecee383
--- /dev/null
+++ b/src/test/resources/repositories/plugins/anothercompany/simpleplugin/ants/simpleplugin-0.1.ant
@@ -0,0 +1,19 @@
+<!--
+   Licensed to the Apache Software Foundation (ASF) under one or more
+   contributor license agreements.  See the NOTICE file distributed with
+   this work for additional information regarding copyright ownership.
+   The ASF licenses this file to You under the Apache License, Version 2.0
+   (the "License"); you may not use this file except in compliance with
+   the License.  You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
+-->
+<project name="anothercompany#simpleplugin">
+    <echo>a simple plugin</echo>
+</project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ant-easyant-core/blob/930f05e5/src/test/resources/repositories/plugins/anothercompany/simpleplugin/ivys/ivy-0.1.xml
----------------------------------------------------------------------
diff --git a/src/test/resources/repositories/plugins/anothercompany/simpleplugin/ivys/ivy-0.1.xml
b/src/test/resources/repositories/plugins/anothercompany/simpleplugin/ivys/ivy-0.1.xml
new file mode 100644
index 0000000..8cd69b9
--- /dev/null
+++ b/src/test/resources/repositories/plugins/anothercompany/simpleplugin/ivys/ivy-0.1.xml
@@ -0,0 +1,24 @@
+<!--
+   Licensed to the Apache Software Foundation (ASF) under one or more
+   contributor license agreements.  See the NOTICE file distributed with
+   this work for additional information regarding copyright ownership.
+   The ASF licenses this file to You under the Apache License, Version 2.0
+   (the "License"); you may not use this file except in compliance with
+   the License.  You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
+-->
+<ivy-module version="2.0">
+    <info organisation="anothercompany" module="simpleplugin" revision="0.1" status="integration">
+        <description>a simple plugin</description>
+    </info>
+    <publications>
+        <artifact type="ant"/>
+    </publications>
+</ivy-module>


Mime
View raw message