Clover Coverage Report - EasyMock 2.4
Coverage timestamp: mer. juil. 2 2008 02:17:38 CEST
0   75   0   -
0   13   -   0
0     -  
1    
 
 
  IMocksControl       Line # 11 0 0 - -1.0
 
No Tests
 
1    /*
2    * Copyright (c) 2001-2008 OFFIS, Tammo Freese.
3    * This program is made available under the terms of the MIT License.
4    */
5    package org.easymock;
6   
7    /**
8    * Controls all the mock objects created by it.
9    * For details, see the EasyMock documentation.
10    */
 
11    public interface IMocksControl {
12    /**
13    * Creates a mock object that implements the given interface.
14    * @param <T> the interface that the mock object should implement.
15    * @param toMock the class of the interface that the mock object should implement.
16    * @return the mock object.
17    */
18    <T> T createMock(Class<T> toMock);
19   
20    /**
21    * Creates a mock object that implements the given interface.
22    * @param name the name of the mock object .
23    * @param toMock the class of the interface that the mock object should implement.
24    * @param <T> the interface that the mock object should implement.
25    * @return the mock object.
26    * @throws IllegalArgumentException if the name is not a valid Java identifier.
27    */
28    <T> T createMock(String name, Class<T> toMock);
29   
30    /**
31    * Removes all expectations for the mock objects of this control.
32    */
33    void reset();
34   
35    /**
36    * Removes all expectations for the mock objects of this control and turn
37    * them to nice mocks.
38    */
39    void resetToNice();
40   
41    /**
42    * Removes all expectations for the mock objects of this control and turn
43    * them to default mocks.
44    */
45    void resetToDefault();
46   
47    /**
48    * Removes all expectations for the mock objects of this control and turn
49    * them to strict mocks.
50    */
51    void resetToStrict();
52   
53    /**
54    * Switches the control from record mode to replay mode.
55    */
56    void replay();
57   
58    /**
59    * Verifies that all expectations were met.
60    */
61    void verify();
62   
63    /**
64    * Switches order checking on and off.
65    * @param state <code>true</code> switches order checking on, <code>false</code> switches it off.
66    */
67    void checkOrder(boolean state);
68   
69    /**
70    * Makes the mock thread safe.
71    *
72    * @param threadSafe If the mock should be thread safe or not
73    */
74    void makeThreadSafe(boolean threadSafe);
75    }