Exemple #1
0
 /**
  * Verifies that all trained methods have been invoked on all mock objects (created by {@link
  * #newMock(Class)}, then switches each mock object back to training mode.
  */
 protected final void verify() {
   tester.verify();
 }
Exemple #2
0
 /**
  * Switches each mock object created by {@link #newMock(Class)} into replay mode (out of the
  * initial training mode).
  */
 protected final void replay() {
   tester.replay();
 }
Exemple #3
0
 /** Discards any mock objects created during the test. */
 @AfterMethod(alwaysRun = true)
 public final void discardMockControl() {
   tester.cleanup();
 }
Exemple #4
0
 /**
  * Creates a new mock object of the indicated type. The shared mock control does
  * <strong>not</strong> check order, but does fail on any unexpected method invocations.
  *
  * @param <T> the type of the mock object
  * @param mockClass the class to mock
  * @return the mock object, ready for training
  */
 protected final <T> T newMock(Class<T> mockClass) {
   return tester.newMock(mockClass);
 }
Exemple #5
0
 /** Returns the {@link IMocksControl} for this thread. */
 protected final IMocksControl getMocksControl() {
   return tester.getMocksControl();
 }