01: /*
02: * Copyright 2006-2007, Unitils.org
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: */
16: package org.unitils.easymock.annotation;
17:
18: import org.unitils.easymock.util.Calls;
19: import org.unitils.easymock.util.InvocationOrder;
20:
21: import static java.lang.annotation.ElementType.FIELD;
22: import java.lang.annotation.Retention;
23: import static java.lang.annotation.RetentionPolicy.RUNTIME;
24: import java.lang.annotation.Target;
25:
26: /**
27: * Annotation indicating that a regular EasyMock mock object should be created and set in the annotated field.
28: *
29: * @author Filip Neven
30: * @author Tim Ducheyne
31: */
32: @Target(FIELD)
33: @Retention(RUNTIME)
34: public @interface RegularMock {
35:
36: /**
37: * Determines whether the order of method calls on the mock object should be checked.
38: *
39: * @return the invocation order setting.
40: */
41: InvocationOrder invocationOrder() default InvocationOrder.DEFAULT;
42:
43: /**
44: * Determines what to do when unexpected method calls occur.
45: *
46: * @return the calls setting.
47: */
48: Calls calls() default Calls.DEFAULT;
49:
50: }
|