01: /*
02: * Copyright (c) 2002-2006 by OpenSymphony
03: * All rights reserved.
04: */
05: package com.opensymphony.xwork.mock;
06:
07: import com.opensymphony.xwork.Result;
08: import com.opensymphony.xwork.ActionInvocation;
09:
10: /**
11: * Mock for a {@link Result}.
12: *
13: * @author Mike
14: * @author Rainer Hermanns
15: * @version $Date: 2007-03-25 12:59:53 +0200 (So, 25 Mrz 2007) $ $Id: MockResult.java 1392 2007-03-25 10:59:53Z rainerh $
16: */
17: public class MockResult implements Result {
18:
19: private static final long serialVersionUID = 5371782753949314951L;
20: public static final Object DEFAULT_PARAM = "location";
21:
22: public boolean equals(Object o) {
23: if (this == o) {
24: return true;
25: }
26:
27: if (!(o instanceof MockResult)) {
28: return false;
29: }
30:
31: return true;
32: }
33:
34: public void execute(ActionInvocation invocation) throws Exception {
35: System.out.println("MockResult.execute");
36: }
37:
38: public int hashCode() {
39: return 10;
40: }
41: }
|