01: /**
02: * Copyright 2006 Webmedia Group Ltd.
03: *
04: * Licensed under the Apache License, Version 2.0 (the "License");
05: * you may not use this file except in compliance with the License.
06: * You may obtain a copy of the License at
07: *
08: * http://www.apache.org/licenses/LICENSE-2.0
09: *
10: * Unless required by applicable law or agreed to in writing, software
11: * distributed under the License is distributed on an "AS IS" BASIS,
12: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13: * See the License for the specific language governing permissions and
14: * limitations under the License.
15: **/package org.araneaframework.mock.core;
16:
17: import org.araneaframework.InputData;
18: import org.araneaframework.OutputData;
19: import org.araneaframework.Path;
20: import org.araneaframework.core.BaseService;
21:
22: /**
23: * @author "Toomas Römer" <toomas@webmedia.ee>
24: *
25: */
26: public class MockEventfulBaseService extends BaseService {
27: private boolean isActionCalled = false;
28: private boolean destroyCalled = false;
29: private boolean initCalled = false;
30:
31: public void action(Path path, InputData input, OutputData output)
32: throws Exception {
33: isActionCalled = true;
34: }
35:
36: public void destroy() {
37: destroyCalled = true;
38: }
39:
40: public void init() {
41: initCalled = true;
42: }
43:
44: public boolean getActionCalled() {
45: return isActionCalled;
46: }
47:
48: public void setActionCalled(boolean isActionCalled) {
49: this .isActionCalled = isActionCalled;
50: }
51:
52: public boolean getDestroyCalled() {
53: return destroyCalled;
54: }
55:
56: public boolean getInitCalled() {
57: return initCalled;
58: }
59: }
|