Title: [waffle-scm] [719] trunk/waffle-core/src/test/java/org/codehaus/waffle/action: Renamed testmodel controller.

Diff

Modified: trunk/waffle-core/src/test/java/org/codehaus/waffle/action/AbstractMethodDefinitionFinderTest.java (718 => 719)

--- trunk/waffle-core/src/test/java/org/codehaus/waffle/action/AbstractMethodDefinitionFinderTest.java	2008-06-17 14:09:09 UTC (rev 718)
+++ trunk/waffle-core/src/test/java/org/codehaus/waffle/action/AbstractMethodDefinitionFinderTest.java	2008-06-17 14:12:27 UTC (rev 719)
@@ -24,7 +24,7 @@
 import org.codehaus.waffle.context.ContextContainer;
 import org.codehaus.waffle.context.RequestLevelContainer;
 import org.codehaus.waffle.i18n.MessagesContext;
-import org.codehaus.waffle.testmodel.SampleForMethodFinder;
+import org.codehaus.waffle.testmodel.FakeControllerWithMethodDefinitions;
 import org.jmock.Expectations;
 import org.jmock.Mockery;
 import org.jmock.integration.junit4.JMock;
@@ -192,12 +192,12 @@
         // Mock StringTransmuter
         final StringTransmuter stringTransmuter = mockery.mock(StringTransmuter.class);
 
-        SampleForMethodFinder sampleForMethodFinder = new SampleForMethodFinder();
+        FakeControllerWithMethodDefinitions sampleForMethodFinder = new FakeControllerWithMethodDefinitions();
         MethodDefinitionFinder methodDefinitionFinder = newMethodDefinitionFinder(null, null, methodNameResolver,
                 stringTransmuter);
         MethodDefinition methodDefinition = methodDefinitionFinder.find(sampleForMethodFinder, request, response);
 
-        Method expectedMethod = SampleForMethodFinder.class.getMethod("noArgumentMethod");
+        Method expectedMethod = FakeControllerWithMethodDefinitions.class.getMethod("noArgumentMethod");
         assertEquals(expectedMethod, methodDefinition.getMethod());
     }
 
@@ -230,12 +230,12 @@
         // Mock StringTransmuter
         final StringTransmuter stringTransmuter = mockery.mock(StringTransmuter.class);
 
-        SampleForMethodFinder sampleForMethodFinder = new SampleForMethodFinder();
+        FakeControllerWithMethodDefinitions sampleForMethodFinder = new FakeControllerWithMethodDefinitions();
         MethodDefinitionFinder methodDefinitionFinder = newMethodDefinitionFinder(null, argumentResolver,
                 methodNameResolver, stringTransmuter);
         MethodDefinition methodDefinition = methodDefinitionFinder.find(sampleForMethodFinder, request, response);
 
-        Method expectedMethod = SampleForMethodFinder.class.getMethod("methodTwo", List.class);
+        Method expectedMethod = FakeControllerWithMethodDefinitions.class.getMethod("methodTwo", List.class);
         assertEquals(expectedMethod, methodDefinition.getMethod());
     }
 
@@ -262,13 +262,13 @@
         // Mock ArgumentResolver
         final ArgumentResolver argumentResolver = mockery.mock(ArgumentResolver.class);
 
-        SampleForMethodFinder sampleForMethodFinder = new SampleForMethodFinder();
+        FakeControllerWithMethodDefinitions sampleForMethodFinder = new FakeControllerWithMethodDefinitions();
         MethodDefinitionFinder methodDefinitionFinder = newMethodDefinitionFinder(null, argumentResolver,
                 methodNameResolver, stringTransmuter);
 
         MethodDefinition definition = methodDefinitionFinder.find(sampleForMethodFinder, request, response);
 
-        Method methodExpected = SampleForMethodFinder.class.getMethod("noAmbiguityWhenMethodNotPublic",
+        Method methodExpected = FakeControllerWithMethodDefinitions.class.getMethod("noAmbiguityWhenMethodNotPublic",
                 HttpServletRequest.class);
         assertEquals(methodExpected, definition.getMethod());
     }
@@ -294,7 +294,7 @@
         // Mock StringTransmuter
         final StringTransmuter stringTransmuter = mockery.mock(StringTransmuter.class);
 
-        SampleForMethodFinder sampleForMethodFinder = new SampleForMethodFinder();
+        FakeControllerWithMethodDefinitions sampleForMethodFinder = new FakeControllerWithMethodDefinitions();
         MethodDefinitionFinder methodDefinitionFinder = newMethodDefinitionFinder(null, null, methodNameResolver,
                 stringTransmuter);
 
@@ -321,12 +321,12 @@
         // Mock StringTransmuter
         final StringTransmuter stringTransmuter = mockery.mock(StringTransmuter.class);
 
-        SampleForMethodFinder sampleForMethodFinder = new SampleForMethodFinder();
+        FakeControllerWithMethodDefinitions sampleForMethodFinder = new FakeControllerWithMethodDefinitions();
         MethodDefinitionFinder methodDefinitionFinder = newMethodDefinitionFinder(null, null, methodNameResolver,
                 stringTransmuter);
         MethodDefinition methodDefinition = methodDefinitionFinder.find(sampleForMethodFinder, request, response);
 
-        Method expectedMethod = SampleForMethodFinder.class.getMethod("methodDependsOnRequest",
+        Method expectedMethod = FakeControllerWithMethodDefinitions.class.getMethod("methodDependsOnRequest",
                 HttpServletRequest.class);
 
         assertEquals(expectedMethod, methodDefinition.getMethod());
@@ -352,12 +352,12 @@
         // Mock StringTransmuter
         final StringTransmuter stringTransmuter = mockery.mock(StringTransmuter.class);
 
-        SampleForMethodFinder sampleForMethodFinder = new SampleForMethodFinder();
+        FakeControllerWithMethodDefinitions sampleForMethodFinder = new FakeControllerWithMethodDefinitions();
         MethodDefinitionFinder methodDefinitionFinder = newMethodDefinitionFinder(null, null, methodNameResolver,
                 stringTransmuter);
         MethodDefinition methodDefinition = methodDefinitionFinder.find(sampleForMethodFinder, request, response);
 
-        Method expectedMethod = SampleForMethodFinder.class.getMethod("methodDependsOnResponse",
+        Method expectedMethod = FakeControllerWithMethodDefinitions.class.getMethod("methodDependsOnResponse",
                 HttpServletResponse.class);
 
         assertEquals(expectedMethod, methodDefinition.getMethod());
@@ -398,13 +398,13 @@
             }
         });
 
-        SampleForMethodFinder sampleForMethodFinder = new SampleForMethodFinder();
+        FakeControllerWithMethodDefinitions sampleForMethodFinder = new FakeControllerWithMethodDefinitions();
 
         MethodDefinitionFinder methodDefinitionFinder = newMethodDefinitionFinder(null, argumentResolver,
                 methodNameResolver, stringTransmuter);
         MethodDefinition methodDefinition = methodDefinitionFinder.find(sampleForMethodFinder, request, response);
 
-        Method expectedMethod = SampleForMethodFinder.class.getMethod("methodDependsOnRequestAndInteger",
+        Method expectedMethod = FakeControllerWithMethodDefinitions.class.getMethod("methodDependsOnRequestAndInteger",
                 HttpServletRequest.class, int.class);
 
         assertEquals(expectedMethod, methodDefinition.getMethod());
@@ -439,12 +439,12 @@
         // Mock StringTransmuter
         final StringTransmuter stringTransmuter = mockery.mock(StringTransmuter.class);
 
-        SampleForMethodFinder sampleForMethodFinder = new SampleForMethodFinder();
+        FakeControllerWithMethodDefinitions sampleForMethodFinder = new FakeControllerWithMethodDefinitions();
         MethodDefinitionFinder methodDefinitionFinder = newMethodDefinitionFinder(null, null, methodNameResolver,
                 stringTransmuter);
         MethodDefinition methodDefinition = methodDefinitionFinder.find(sampleForMethodFinder, request, response);
 
-        Method expectedMethod = SampleForMethodFinder.class.getMethod("methodDependsOnSession", HttpSession.class);
+        Method expectedMethod = FakeControllerWithMethodDefinitions.class.getMethod("methodDependsOnSession", HttpSession.class);
 
         assertEquals(expectedMethod, methodDefinition.getMethod());
     }
@@ -490,12 +490,12 @@
         // Mock StringTransmuter
         final StringTransmuter stringTransmuter = mockery.mock(StringTransmuter.class);
 
-        SampleForMethodFinder sampleForMethodFinder = new SampleForMethodFinder();
+        FakeControllerWithMethodDefinitions sampleForMethodFinder = new FakeControllerWithMethodDefinitions();
         MethodDefinitionFinder methodDefinitionFinder = newMethodDefinitionFinder(null, argumentResolver, methodNameResolver,
                 stringTransmuter);
         MethodDefinition methodDefinition = methodDefinitionFinder.find(sampleForMethodFinder, request, response);
 
-        Method expectedMethod = SampleForMethodFinder.class.getMethod("methodDependsOnMessagesContext",
+        Method expectedMethod = FakeControllerWithMethodDefinitions.class.getMethod("methodDependsOnMessagesContext",
                 MessagesContext.class);
 
         assertEquals(expectedMethod, methodDefinition.getMethod());
@@ -524,12 +524,12 @@
         // Mock StringTransmuter
         final StringTransmuter stringTransmuter = mockery.mock(StringTransmuter.class);
 
-        SampleForMethodFinder sampleForMethodFinder = new SampleForMethodFinder();
+        FakeControllerWithMethodDefinitions sampleForMethodFinder = new FakeControllerWithMethodDefinitions();
         MethodDefinitionFinder methodDefinitionFinder = newMethodDefinitionFinder(servletContext, null,
                 methodNameResolver, stringTransmuter);
         MethodDefinition methodDefinition = methodDefinitionFinder.find(sampleForMethodFinder, request, response);
 
-        Method expectedMethod = SampleForMethodFinder.class.getMethod("methodDependsOnServletContext",
+        Method expectedMethod = FakeControllerWithMethodDefinitions.class.getMethod("methodDependsOnServletContext",
                 ServletContext.class);
 
         assertEquals(expectedMethod, methodDefinition.getMethod());
@@ -572,12 +572,12 @@
         });
         // new OgnlValueConverterFinder(new OgnlValueConverter(typeConverter))
     
-        SampleForMethodFinder sampleForMethodFinder = new SampleForMethodFinder();
+        FakeControllerWithMethodDefinitions sampleForMethodFinder = new FakeControllerWithMethodDefinitions();
         MethodDefinitionFinder methodDefinitionFinder = newMethodDefinitionFinder(null, argumentResolver,
                 methodNameResolver, stringTransmuter);
         MethodDefinition methodDefinition = methodDefinitionFinder.find(sampleForMethodFinder, request, response);
     
-        Method expectedMethod = SampleForMethodFinder.class.getMethod("methodListOfStrings", List.class);
+        Method expectedMethod = FakeControllerWithMethodDefinitions.class.getMethod("methodListOfStrings", List.class);
         assertEquals(expectedMethod, methodDefinition.getMethod());
     }
 

Modified: trunk/waffle-core/src/test/java/org/codehaus/waffle/action/AnnotatedMethodDefinitionFinderTest.java (718 => 719)

--- trunk/waffle-core/src/test/java/org/codehaus/waffle/action/AnnotatedMethodDefinitionFinderTest.java	2008-06-17 14:09:09 UTC (rev 718)
+++ trunk/waffle-core/src/test/java/org/codehaus/waffle/action/AnnotatedMethodDefinitionFinderTest.java	2008-06-17 14:12:27 UTC (rev 719)
@@ -14,7 +14,7 @@
 
 import org.codehaus.waffle.bind.StringTransmuter;
 import org.codehaus.waffle.monitor.SilentMonitor;
-import org.codehaus.waffle.testmodel.SampleForMethodFinder;
+import org.codehaus.waffle.testmodel.FakeControllerWithMethodDefinitions;
 import org.jmock.Expectations;
 import org.jmock.Mockery;
 import org.jmock.integration.junit4.JMock;
@@ -67,12 +67,12 @@
         // Mock StringTransmuter
         final StringTransmuter stringTransmuter = mockery.mock(StringTransmuter.class);
 
-        SampleForMethodFinder sampleForMethodFinder = new SampleForMethodFinder();
+        FakeControllerWithMethodDefinitions sampleForMethodFinder = new FakeControllerWithMethodDefinitions();
         MethodDefinitionFinder methodDefinitionFinder = newMethodDefinitionFinder(null, argumentResolver,
                 methodNameResolver, stringTransmuter);
         MethodDefinition methodDefinition = methodDefinitionFinder.find(sampleForMethodFinder, request, response);
 
-        Method expectedMethod = SampleForMethodFinder.class.getMethod("methodTwo", List.class);
+        Method expectedMethod = FakeControllerWithMethodDefinitions.class.getMethod("methodTwo", List.class);
         assertEquals(expectedMethod, methodDefinition.getMethod());
     }
 
@@ -105,7 +105,7 @@
         // Mock StringTransmuter
         final StringTransmuter stringTransmuter = mockery.mock(StringTransmuter.class);
 
-        SampleForMethodFinder sampleForMethodFinder = new SampleForMethodFinder();
+        FakeControllerWithMethodDefinitions sampleForMethodFinder = new FakeControllerWithMethodDefinitions();
         MethodDefinitionFinder methodDefinitionFinder = newMethodDefinitionFinder(null, argumentResolver,
                 methodNameResolver, stringTransmuter);
 
@@ -147,7 +147,7 @@
             }
         });
 
-        SampleForMethodFinder sampleForMethodFinder = new SampleForMethodFinder();
+        FakeControllerWithMethodDefinitions sampleForMethodFinder = new FakeControllerWithMethodDefinitions();
 
         MethodDefinitionFinder methodDefinitionFinder = newMethodDefinitionFinder(null, argumentResolver,
                 methodNameResolver, stringTransmuter);
@@ -190,7 +190,7 @@
             }
         });
 
-        SampleForMethodFinder sampleForMethodFinder = new SampleForMethodFinder();
+        FakeControllerWithMethodDefinitions sampleForMethodFinder = new FakeControllerWithMethodDefinitions();
 
         MethodDefinitionFinder methodDefinitionFinder = newMethodDefinitionFinder(null, argumentResolver,
                 methodNameResolver, stringTransmuter);
@@ -233,7 +233,7 @@
             }
         });
 
-        SampleForMethodFinder sampleForMethodFinder = new SampleForMethodFinder();
+        FakeControllerWithMethodDefinitions sampleForMethodFinder = new FakeControllerWithMethodDefinitions();
 
         MethodDefinitionFinder methodDefinitionFinder = newMethodDefinitionFinder(null, argumentResolver,
                 methodNameResolver, stringTransmuter);
@@ -277,7 +277,7 @@
             }
         });
 
-        SampleForMethodFinder sampleForMethodFinder = new SampleForMethodFinder();
+        FakeControllerWithMethodDefinitions sampleForMethodFinder = new FakeControllerWithMethodDefinitions();
 
         MethodDefinitionFinder methodDefinitionFinder = newMethodDefinitionFinder(null, argumentResolver,
                 methodNameResolver, stringTransmuter);
@@ -322,7 +322,7 @@
             }
         });
 
-        SampleForMethodFinder sampleForMethodFinder = new SampleForMethodFinder();
+        FakeControllerWithMethodDefinitions sampleForMethodFinder = new FakeControllerWithMethodDefinitions();
 
         MethodDefinitionFinder methodDefinitionFinder = newMethodDefinitionFinder(null, argumentResolver,
                 methodNameResolver, stringTransmuter);
@@ -367,7 +367,7 @@
             }
         });
 
-        SampleForMethodFinder sampleForMethodFinder = new SampleForMethodFinder();
+        FakeControllerWithMethodDefinitions sampleForMethodFinder = new FakeControllerWithMethodDefinitions();
 
         MethodDefinitionFinder methodDefinitionFinder = newMethodDefinitionFinder(null, argumentResolver,
                 methodNameResolver, stringTransmuter);

Modified: trunk/waffle-core/src/test/java/org/codehaus/waffle/action/ParanamerMethodDefinitionFinderTest.java (718 => 719)

--- trunk/waffle-core/src/test/java/org/codehaus/waffle/action/ParanamerMethodDefinitionFinderTest.java	2008-06-17 14:09:09 UTC (rev 718)
+++ trunk/waffle-core/src/test/java/org/codehaus/waffle/action/ParanamerMethodDefinitionFinderTest.java	2008-06-17 14:12:27 UTC (rev 719)
@@ -13,7 +13,7 @@
 
 import org.codehaus.waffle.bind.StringTransmuter;
 import org.codehaus.waffle.monitor.SilentMonitor;
-import org.codehaus.waffle.testmodel.SampleForMethodFinder;
+import org.codehaus.waffle.testmodel.FakeControllerWithMethodDefinitions;
 import org.jmock.Expectations;
 import org.jmock.Mockery;
 import org.jmock.integration.junit4.JMock;
@@ -65,12 +65,12 @@
         // Mock StringTransmuter
         final StringTransmuter stringTransmuter = mockery.mock(StringTransmuter.class);
 
-        SampleForMethodFinder sampleForMethodFinder = new SampleForMethodFinder();
+        FakeControllerWithMethodDefinitions sampleForMethodFinder = new FakeControllerWithMethodDefinitions();
         MethodDefinitionFinder methodDefinitionFinder = newMethodDefinitionFinder(null, argumentResolver,
                 methodNameResolver, stringTransmuter);
         MethodDefinition methodDefinition = methodDefinitionFinder.find(sampleForMethodFinder, request, response);
 
-        Method expectedMethod = SampleForMethodFinder.class.getMethod("methodTwo", List.class);
+        Method expectedMethod = FakeControllerWithMethodDefinitions.class.getMethod("methodTwo", List.class);
         assertEquals(expectedMethod, methodDefinition.getMethod());
     }
 
@@ -105,7 +105,7 @@
         // Mock StringTransmuter
         final StringTransmuter stringTransmuter = mockery.mock(StringTransmuter.class);
 
-        SampleForMethodFinder sampleForMethodFinder = new SampleForMethodFinder();
+        FakeControllerWithMethodDefinitions sampleForMethodFinder = new FakeControllerWithMethodDefinitions();
         MethodDefinitionFinder methodDefinitionFinder = newMethodDefinitionFinder(null, argumentResolver,
                 methodNameResolver, stringTransmuter);
 
@@ -147,7 +147,7 @@
             }
         });
 
-        SampleForMethodFinder sampleForMethodFinder = new SampleForMethodFinder();
+        FakeControllerWithMethodDefinitions sampleForMethodFinder = new FakeControllerWithMethodDefinitions();
 
         MethodDefinitionFinder methodDefinitionFinder = newMethodDefinitionFinder(null, argumentResolver,
                 methodNameResolver, stringTransmuter);
@@ -190,7 +190,7 @@
             }
         });
 
-        SampleForMethodFinder sampleForMethodFinder = new SampleForMethodFinder();
+        FakeControllerWithMethodDefinitions sampleForMethodFinder = new FakeControllerWithMethodDefinitions();
 
         MethodDefinitionFinder methodDefinitionFinder = newMethodDefinitionFinder(null, argumentResolver,
                 methodNameResolver, stringTransmuter);
@@ -233,7 +233,7 @@
             }
         });
 
-        SampleForMethodFinder sampleForMethodFinder = new SampleForMethodFinder();
+        FakeControllerWithMethodDefinitions sampleForMethodFinder = new FakeControllerWithMethodDefinitions();
 
         MethodDefinitionFinder methodDefinitionFinder = newMethodDefinitionFinder(null, argumentResolver,
                 methodNameResolver, stringTransmuter);
@@ -277,7 +277,7 @@
             }
         });
 
-        SampleForMethodFinder sampleForMethodFinder = new SampleForMethodFinder();
+        FakeControllerWithMethodDefinitions sampleForMethodFinder = new FakeControllerWithMethodDefinitions();
 
         MethodDefinitionFinder methodDefinitionFinder = newMethodDefinitionFinder(null, argumentResolver,
                 methodNameResolver, stringTransmuter);

Added: trunk/waffle-core/src/test/java/org/codehaus/waffle/testmodel/FakeControllerWithMethodDefinitions.java (0 => 719)

--- trunk/waffle-core/src/test/java/org/codehaus/waffle/testmodel/FakeControllerWithMethodDefinitions.java	                        (rev 0)
+++ trunk/waffle-core/src/test/java/org/codehaus/waffle/testmodel/FakeControllerWithMethodDefinitions.java	2008-06-17 14:12:27 UTC (rev 719)
@@ -0,0 +1,131 @@
+/*****************************************************************************
+ * Copyright (c) 2005-2008 Michael Ward                                      *
+ * All rights reserved.                                                      *
+ * ------------------------------------------------------------------------- *
+ * The software in this package is published under the terms of the BSD      *
+ * style license a copy of which has been included with this distribution in *
+ * the LICENSE.txt file.                                                     *
+ *                                                                           *
+ * Original code by: Michael Ward                                            *
+ *****************************************************************************/
+package org.codehaus.waffle.testmodel;
+
+import org.codehaus.waffle.action.annotation.ActionMethod;
+import org.codehaus.waffle.i18n.MessagesContext;
+
+import javax.servlet.ServletContext;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import javax.servlet.http.HttpSession;
+import java.util.List;
+
+public class FakeControllerWithMethodDefinitions {
+    public boolean methodOneInvoked = false;
+    public boolean noArgumentMethodInvoked = false;
+    public Object methodTwoObject = null;
+    public Object methodThreeObject = null;
+    public Integer integer = null;
+    public Float decimal = null;
+    public boolean bool = false;
+    public List<String> listOfStrings;
+    public List<Integer> listOfIntegers;
+    public HttpServletRequest request;
+    public HttpServletResponse response;
+    public HttpSession session;
+    public ServletContext servletContext;
+    public MessagesContext messagesContext;
+
+    public void noArgumentMethod() {
+        noArgumentMethodInvoked = true;
+    }
+
+    public void methodOne() {
+        methodOneInvoked = true;
+    }
+
+    @ActionMethod(parameters = {"foobaz"})
+    public void methodTwo(List<?> list) {
+        methodTwoObject = list;
+    }
+
+    @ActionMethod(parameters = {"foobaz"})
+    public void methodAmbiguous(Object object) {
+        methodThreeObject = object;
+    }
+
+    @ActionMethod(parameters = {"foobaz"})
+    public void methodAmbiguous(List<?> list) {
+        methodThreeObject = list;
+    }
+
+    @ActionMethod(parameters = {"foobaz"})
+    public void methodInteger(int integer) {
+        this.integer = integer;
+    }
+
+    @ActionMethod(parameters = {"foobaz"})
+    public void methodFloat(Float decimal) {
+        this.decimal = decimal;
+    }
+
+    @ActionMethod(parameters = {"foobaz"})
+    public void methodBoolean(boolean bool) {
+        this.bool = bool;
+    }
+    
+    @ActionMethod(parameters = {"foobaz"})
+    public void methodListOfStrings(List<String> list) {
+        this.listOfStrings = list;
+    }
+    
+    @ActionMethod(parameters = {"foobaz"})
+    public void methodListOfIntegers(List<Integer> list) {
+        this.listOfIntegers = list;
+    }
+
+
+    @ActionMethod
+    public void methodDependsOnRequest(HttpServletRequest request) {
+        this.request = request;
+    }
+
+    @ActionMethod
+    public void methodDependsOnResponse(HttpServletResponse response) {
+        this.response = response;
+    }
+
+    @ActionMethod
+    public void methodDependsOnSession(HttpSession session) {
+        this.session = session;
+    }
+
+    @ActionMethod
+    public void methodDependsOnMessagesContext(MessagesContext messagesContext) {
+        this.messagesContext = messagesContext;
+    }
+
+    @ActionMethod
+    public void methodDependsOnServletContext(ServletContext servletContext) {
+        this.servletContext = servletContext;
+    }
+
+    @ActionMethod(parameters = {"integer"})
+    public void methodDependsOnRequestAndInteger(HttpServletRequest request, int integer) {
+        this.request = request;
+        this.integer = integer;
+    }
+
+    @ActionMethod(parameters = {"foobaz"})
+    public void actionMethodNeedsCustomConverter(List<?> list) {
+
+    }
+
+    public void noAmbiguityWhenMethodNotPublic(HttpServletRequest request) {
+
+    }
+
+    protected void noAmbiguityWhenMethodNotPublic(HttpServletResponse response) {
+
+    }
+
+}
Property changes on: trunk/waffle-core/src/test/java/org/codehaus/waffle/testmodel/FakeControllerWithMethodDefinitions.java
___________________________________________________________________
Name: svn:executable
   + *

Deleted: trunk/waffle-core/src/test/java/org/codehaus/waffle/testmodel/SampleForMethodFinder.java (718 => 719)

--- trunk/waffle-core/src/test/java/org/codehaus/waffle/testmodel/SampleForMethodFinder.java	2008-06-17 14:09:09 UTC (rev 718)
+++ trunk/waffle-core/src/test/java/org/codehaus/waffle/testmodel/SampleForMethodFinder.java	2008-06-17 14:12:27 UTC (rev 719)
@@ -1,131 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2005-2008 Michael Ward                                      *
- * All rights reserved.                                                      *
- * ------------------------------------------------------------------------- *
- * The software in this package is published under the terms of the BSD      *
- * style license a copy of which has been included with this distribution in *
- * the LICENSE.txt file.                                                     *
- *                                                                           *
- * Original code by: Michael Ward                                            *
- *****************************************************************************/
-package org.codehaus.waffle.testmodel;
-
-import org.codehaus.waffle.action.annotation.ActionMethod;
-import org.codehaus.waffle.i18n.MessagesContext;
-
-import javax.servlet.ServletContext;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-import javax.servlet.http.HttpSession;
-import java.util.List;
-
-public class SampleForMethodFinder {
-    public boolean methodOneInvoked = false;
-    public boolean noArgumentMethodInvoked = false;
-    public Object methodTwoObject = null;
-    public Object methodThreeObject = null;
-    public Integer integer = null;
-    public Float decimal = null;
-    public boolean bool = false;
-    public List<String> listOfStrings;
-    public List<Integer> listOfIntegers;
-    public HttpServletRequest request;
-    public HttpServletResponse response;
-    public HttpSession session;
-    public ServletContext servletContext;
-    public MessagesContext messagesContext;
-
-    public void noArgumentMethod() {
-        noArgumentMethodInvoked = true;
-    }
-
-    public void methodOne() {
-        methodOneInvoked = true;
-    }
-
-    @ActionMethod(parameters = {"foobaz"})
-    public void methodTwo(List<?> list) {
-        methodTwoObject = list;
-    }
-
-    @ActionMethod(parameters = {"foobaz"})
-    public void methodAmbiguous(Object object) {
-        methodThreeObject = object;
-    }
-
-    @ActionMethod(parameters = {"foobaz"})
-    public void methodAmbiguous(List<?> list) {
-        methodThreeObject = list;
-    }
-
-    @ActionMethod(parameters = {"foobaz"})
-    public void methodInteger(int integer) {
-        this.integer = integer;
-    }
-
-    @ActionMethod(parameters = {"foobaz"})
-    public void methodFloat(Float decimal) {
-        this.decimal = decimal;
-    }
-
-    @ActionMethod(parameters = {"foobaz"})
-    public void methodBoolean(boolean bool) {
-        this.bool = bool;
-    }
-    
-    @ActionMethod(parameters = {"foobaz"})
-    public void methodListOfStrings(List<String> list) {
-        this.listOfStrings = list;
-    }
-    
-    @ActionMethod(parameters = {"foobaz"})
-    public void methodListOfIntegers(List<Integer> list) {
-        this.listOfIntegers = list;
-    }
-
-
-    @ActionMethod
-    public void methodDependsOnRequest(HttpServletRequest request) {
-        this.request = request;
-    }
-
-    @ActionMethod
-    public void methodDependsOnResponse(HttpServletResponse response) {
-        this.response = response;
-    }
-
-    @ActionMethod
-    public void methodDependsOnSession(HttpSession session) {
-        this.session = session;
-    }
-
-    @ActionMethod
-    public void methodDependsOnMessagesContext(MessagesContext messagesContext) {
-        this.messagesContext = messagesContext;
-    }
-
-    @ActionMethod
-    public void methodDependsOnServletContext(ServletContext servletContext) {
-        this.servletContext = servletContext;
-    }
-
-    @ActionMethod(parameters = {"integer"})
-    public void methodDependsOnRequestAndInteger(HttpServletRequest request, int integer) {
-        this.request = request;
-        this.integer = integer;
-    }
-
-    @ActionMethod(parameters = {"foobaz"})
-    public void actionMethodNeedsCustomConverter(List<?> list) {
-
-    }
-
-    public void noAmbiguityWhenMethodNotPublic(HttpServletRequest request) {
-
-    }
-
-    protected void noAmbiguityWhenMethodNotPublic(HttpServletResponse response) {
-
-    }
-
-}


To unsubscribe from this list please visit:

http://xircles.codehaus.org/manage_email

Reply via email to