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.util;
17:
18: /**
19: * Possible values for allowing unexpected (non-recorded) method calls on mock objects. When set to lenient, a 'Nice
20: * mock' is created, as called in the EasyMock terminology. For non-void methods this means that a Java default (null,
21: * 0 or false) is returned.
22: *
23: * @author Tim Ducheyne
24: * @author Filip Neven
25: */
26: public enum Calls {
27:
28: /**
29: * Defaults to the value of the org.unitils.easymock.annotation.LenientMock$Calls configuration setting.
30: */
31: DEFAULT,
32:
33: /**
34: * Accept unexpected method calls. Return default values (null, 0…) for unexpected non-void method calls
35: */
36: LENIENT,
37:
38: /**
39: * Throw an exception when unexpected method calls occur
40: */
41: STRICT
42: }
|