You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ant.apache.org by jl...@apache.org on 2013/12/07 09:08:56 UTC

svn commit: r1548809 - in /ant/easyant/core/trunk/src/test/java/org/apache/easyant/tasks: FakeInputHandler.java SearchModuleTest.java

Author: jlboudart
Date: Sat Dec  7 08:08:55 2013
New Revision: 1548809

URL: http://svn.apache.org/r1548809
Log:
Extract FakeInputHandler

Added:
    ant/easyant/core/trunk/src/test/java/org/apache/easyant/tasks/FakeInputHandler.java
Modified:
    ant/easyant/core/trunk/src/test/java/org/apache/easyant/tasks/SearchModuleTest.java

Added: ant/easyant/core/trunk/src/test/java/org/apache/easyant/tasks/FakeInputHandler.java
URL: http://svn.apache.org/viewvc/ant/easyant/core/trunk/src/test/java/org/apache/easyant/tasks/FakeInputHandler.java?rev=1548809&view=auto
==============================================================================
--- ant/easyant/core/trunk/src/test/java/org/apache/easyant/tasks/FakeInputHandler.java (added)
+++ ant/easyant/core/trunk/src/test/java/org/apache/easyant/tasks/FakeInputHandler.java Sat Dec  7 08:08:55 2013
@@ -0,0 +1,40 @@
+/*
+ *  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.
+ *
+ */
+package org.apache.easyant.tasks;
+
+import org.apache.tools.ant.BuildException;
+import org.apache.tools.ant.input.InputHandler;
+import org.apache.tools.ant.input.InputRequest;
+
+public class FakeInputHandler implements InputHandler {
+
+    private String input = "";
+
+    public void handleInput(InputRequest request) throws BuildException {
+        request.setInput(input);
+    }
+
+    public String getInput() {
+        return input;
+    }
+
+    public void setInput(String input) {
+        this.input = input;
+    }
+
+}
\ No newline at end of file

Modified: ant/easyant/core/trunk/src/test/java/org/apache/easyant/tasks/SearchModuleTest.java
URL: http://svn.apache.org/viewvc/ant/easyant/core/trunk/src/test/java/org/apache/easyant/tasks/SearchModuleTest.java?rev=1548809&r1=1548808&r2=1548809&view=diff
==============================================================================
--- ant/easyant/core/trunk/src/test/java/org/apache/easyant/tasks/SearchModuleTest.java (original)
+++ ant/easyant/core/trunk/src/test/java/org/apache/easyant/tasks/SearchModuleTest.java Sat Dec  7 08:08:55 2013
@@ -28,11 +28,8 @@ import org.apache.easyant.core.EasyAntMa
 import org.apache.easyant.core.ant.ProjectUtils;
 import org.apache.easyant.core.ivy.IvyInstanceHelper;
 import org.apache.ivy.ant.IvyConfigure;
-import org.apache.tools.ant.BuildException;
 import org.apache.tools.ant.Location;
 import org.apache.tools.ant.Project;
-import org.apache.tools.ant.input.InputHandler;
-import org.apache.tools.ant.input.InputRequest;
 import org.junit.Before;
 import org.junit.Rule;
 import org.junit.Test;
@@ -157,22 +154,4 @@ public class SearchModuleTest {
         assertThat(searchModule.getProject().getProperty("mysearch.rev"), is("0.1"));
     }
 
-    public static class FakeInputHandler implements InputHandler {
-
-        private String input = "";
-
-        public void handleInput(InputRequest request) throws BuildException {
-            request.setInput(input);
-        }
-
-        public String getInput() {
-            return input;
-        }
-
-        public void setInput(String input) {
-            this.input = input;
-        }
-
-    }
-
 }