You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by hl...@apache.org on 2008/01/16 03:33:12 UTC
svn commit: r612337 [3/3] - in /tapestry/tapestry5/trunk/tapestry-core/src:
main/java/org/apache/tapestry/
main/java/org/apache/tapestry/corelib/components/
main/java/org/apache/tapestry/corelib/mixins/
main/java/org/apache/tapestry/internal/ main/java...
Modified: tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/internal/services/PageRenderDispatcherTest.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/internal/services/PageRenderDispatcherTest.java?rev=612337&r1=612336&r2=612337&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/internal/services/PageRenderDispatcherTest.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/internal/services/PageRenderDispatcherTest.java Tue Jan 15 18:33:09 2008
@@ -14,7 +14,7 @@
package org.apache.tapestry.internal.services;
-import org.apache.tapestry.ComponentEventHandler;
+import org.apache.tapestry.ComponentEventCallback;
import org.apache.tapestry.TapestryConstants;
import org.apache.tapestry.internal.structure.ComponentPageElement;
import org.apache.tapestry.internal.structure.Page;
@@ -30,7 +30,7 @@
{
ComponentClassResolver resolver = mockComponentClassResolver();
RequestPageCache cache = mockRequestPageCache();
- PageRenderRequestHandler handler = new PageRenderRequestHandlerImpl(cache, null, null, null);
+ PageRenderRequestHandler handler = new PageRenderRequestHandlerImpl(cache, null, null);
Request request = mockRequest();
Response response = mockResponse();
@@ -105,7 +105,7 @@
replay();
- PageRenderRequestHandler handler = new PageRenderRequestHandlerImpl(cache, processor, renderer, response);
+ PageRenderRequestHandler handler = new PageRenderRequestHandlerImpl(cache, processor, renderer);
Dispatcher d = new PageRenderDispatcher(resolver, handler);
@@ -152,7 +152,7 @@
replay();
- PageRenderRequestHandler handler = new PageRenderRequestHandlerImpl(cache, processor, renderer, response);
+ PageRenderRequestHandler handler = new PageRenderRequestHandlerImpl(cache, processor, renderer);
Dispatcher d = new PageRenderDispatcher(resolver, handler);
@@ -167,9 +167,9 @@
}
private void train_triggerEvent(ComponentPageElement element, String eventType, Object[] context,
- ComponentEventHandler handler, boolean handled)
+ ComponentEventCallback handler, boolean handled)
{
- expect(element.triggerEvent(eq(eventType), aryEq(context), isA(ComponentEventHandler.class))).andReturn(
+ expect(element.triggerEvent(eq(eventType), aryEq(context), isA(ComponentEventCallback.class))).andReturn(
handled);
}
}
Copied: tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/internal/util/NotificationEventCallbackTest.java (from r594255, tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/internal/util/NotificationEventHandlerTest.java)
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/internal/util/NotificationEventCallbackTest.java?p2=tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/internal/util/NotificationEventCallbackTest.java&p1=tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/internal/util/NotificationEventHandlerTest.java&r1=594255&r2=612337&rev=612337&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/internal/util/NotificationEventHandlerTest.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/internal/util/NotificationEventCallbackTest.java Tue Jan 15 18:33:09 2008
@@ -1,4 +1,4 @@
-// Copyright 2007 The Apache Software Foundation
+// Copyright 2007, 2008 The Apache Software Foundation
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@@ -18,7 +18,7 @@
import org.apache.tapestry.runtime.Component;
import org.testng.annotations.Test;
-public class NotificationEventHandlerTest extends InternalBaseTestCase
+public class NotificationEventCallbackTest extends InternalBaseTestCase
{
private static final String EVENT_TYPE = "myEventType";
@@ -33,9 +33,9 @@
replay();
- NotificationEventHandler handler = new NotificationEventHandler(EVENT_TYPE, COMPLETE_ID);
+ NotificationEventCallback callback = new NotificationEventCallback(EVENT_TYPE, COMPLETE_ID);
- assertTrue(handler.handleResult(Boolean.TRUE, component, METHOD));
+ assertTrue(callback.handleResult(Boolean.TRUE, component, METHOD));
verify();
}
@@ -47,9 +47,9 @@
replay();
- NotificationEventHandler handler = new NotificationEventHandler(EVENT_TYPE, COMPLETE_ID);
+ NotificationEventCallback callback = new NotificationEventCallback(EVENT_TYPE, COMPLETE_ID);
- assertFalse(handler.handleResult(Boolean.FALSE, component, METHOD));
+ assertFalse(callback.handleResult(Boolean.FALSE, component, METHOD));
verify();
}
@@ -62,19 +62,17 @@
replay();
- NotificationEventHandler handler = new NotificationEventHandler(EVENT_TYPE, COMPLETE_ID);
+ NotificationEventCallback callback = new NotificationEventCallback(EVENT_TYPE, COMPLETE_ID);
try
{
- handler.handleResult(result, component, METHOD);
+ callback.handleResult(result, component, METHOD);
unreachable();
}
catch (IllegalArgumentException ex)
{
- assertEquals(
- ex.getMessage(),
- "Event 'myEventType' from foo.bar.baz received an event handler method return value of *RESULT* from foo.components.Baz.bar(). "
- + "This type of event does not support return values from event handler methods.");
+ assertEquals(ex.getMessage(),
+ "Event 'myEventType' from foo.bar.baz received an event handler method return value of *RESULT* from foo.components.Baz.bar(). " + "This type of event does not support return values from event handler methods.");
}
verify();