TAP5-2070 fix some tests
Project: http://git-wip-us.apache.org/repos/asf/tapestry-5/repo
Commit: http://git-wip-us.apache.org/repos/asf/tapestry-5/commit/6460e445
Tree: http://git-wip-us.apache.org/repos/asf/tapestry-5/tree/6460e445
Diff: http://git-wip-us.apache.org/repos/asf/tapestry-5/diff/6460e445
Branch: refs/heads/master
Commit: 6460e445c58dc53b23f0c749b9c1cea58e093f36
Parents: 974adcc
Author: Massimo Lusetti
Authored: Tue Aug 6 18:43:37 2013 +0200
Committer: Massimo Lusetti
Committed: Tue Aug 6 18:43:37 2013 +0200
--
.../services/ComponentEventImplTest.java| 39 ++--
.../structure/ComponentPageElementImplTest.java | 11 --
2 files changed, 35 insertions(+), 15 deletions(-)
--
http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/6460e445/tapestry-core/src/test/java/org/apache/tapestry5/internal/services/ComponentEventImplTest.java
--
diff --git
a/tapestry-core/src/test/java/org/apache/tapestry5/internal/services/ComponentEventImplTest.java
b/tapestry-core/src/test/java/org/apache/tapestry5/internal/services/ComponentEventImplTest.java
index 9eb353b..4629bb6 100644
---
a/tapestry-core/src/test/java/org/apache/tapestry5/internal/services/ComponentEventImplTest.java
+++
b/tapestry-core/src/test/java/org/apache/tapestry5/internal/services/ComponentEventImplTest.java
@@ -20,6 +20,7 @@ import org.apache.tapestry5.TapestryMarkers;
import org.apache.tapestry5.internal.structure.ComponentPageElementResources;
import org.apache.tapestry5.internal.test.InternalBaseTestCase;
import org.apache.tapestry5.ioc.Invokable;
+import org.apache.tapestry5.model.ComponentModel;
import org.apache.tapestry5.runtime.ComponentEvent;
import org.easymock.EasyMock;
import org.easymock.IAnswer;
@@ -55,6 +56,7 @@ public class ComponentEventImplTest extends
InternalBaseTestCase
ComponentEventCallback handler = mockComponentEventHandler();
EventContext context = mockEventContext();
Logger logger = mockLogger();
+ ComponentModel model = mockComponentModel();
train_isDebugEnabled(logger, false);
@@ -62,7 +64,7 @@ public class ComponentEventImplTest extends
InternalBaseTestCase
replay();
-ComponentEvent event = new ComponentEventImpl("eventType", "someId",
context, handler, null, false, mockComponentModel(), logger);
+ComponentEvent event = new ComponentEventImpl("eventType", "someId",
context, handler, null, false, model, logger);
assertTrue(event.matches("eventType", "someId", 0));
assertFalse(event.matches("foo", "someId", 0));
@@ -81,6 +83,7 @@ public class ComponentEventImplTest extends
InternalBaseTestCase
Logger logger = mockLogger();
Object result = new Object();
ComponentPageElementResources resources = mockResources();
+ ComponentModel model = mockComponentModel();
train_isDebugEnabled(logger, false);
@@ -88,7 +91,7 @@ public class ComponentEventImplTest extends
InternalBaseTestCase
replay();
-ComponentEvent event = new ComponentEventImpl("eventType", "someId",
context, handler, resources, false, mockComponentModel(), logger);
+ComponentEvent event = new ComponentEventImpl("eventType", "someId",
context, handler, resources, false, model, logger);
event.storeResult(result);
@@ -104,6 +107,7 @@ public class ComponentEventImplTest extends
InternalBaseTestCase
ComponentEventCallback handler = mockComponentEventHandler();
EventContext context = mockEventContext();
Logger logger = mockLogger();
+ ComponentModel model = mockComponentModel();
train_isDebugEnabled(logger, false);
@@ -111,7 +115,7 @@ public class ComponentEventImplTest extends
InternalBaseTestCase
replay();
-ComponentEvent event = new ComponentEventImpl("eventType", "someId",
context, handler, null, false, mockComponentModel(), logger);
+ComponentEvent event = new ComponentEventImpl("eventType", "someId",
context, handler, null, false, model, logger);
assertTrue(event.matches("EVENTTYPE", "someid", 0));
@@ -124,6 +128,7 @@ public class ComponentEventImplTest extends
InternalBaseTestCase
ComponentEventCallback handler = mockComponentEventHandler();
EventContext context = mockEventContext();
Logger logger = mockLogger();
+ ComponentModel model = mockComponentModel();
train_isDebugEnabled(logger, false);
@@ -131,7 +136,7 @@ public class ComponentEventImplTest extends
InternalBaseTestCase
replay();
-ComponentEvent event = new ComponentEventImpl("eventType", "someId",
context, handler, null, false, mockComponentModel(), logger);
+ComponentE