コード例 #1
0
 public void setLegacyDefaultReturnValue(Object value) {
   try {
     state.setDefaultReturnValue(value);
   } catch (RuntimeExceptionWrapper e) {
     throw (RuntimeException) e.getRuntimeException().fillInStackTrace();
   }
 }
コード例 #2
0
 public void andStubDelegateTo(Object delegateTo) {
   try {
     state.andStubDelegateTo(delegateTo);
   } catch (RuntimeExceptionWrapper e) {
     throw (RuntimeException) e.getRuntimeException().fillInStackTrace();
   }
 }
コード例 #3
0
 public void checkOrder(boolean value) {
   try {
     state.checkOrder(value);
   } catch (RuntimeExceptionWrapper e) {
     throw (RuntimeException) e.getRuntimeException().fillInStackTrace();
   }
 }
コード例 #4
0
 public void andStubThrow(Throwable throwable) {
   try {
     state.andStubThrow(throwable);
   } catch (RuntimeExceptionWrapper e) {
     throw (RuntimeException) e.getRuntimeException().fillInStackTrace();
   }
 }
コード例 #5
0
 public void andStubAnswer(IAnswer<? extends Object> answer) {
   try {
     state.andStubAnswer(answer);
   } catch (RuntimeExceptionWrapper e) {
     throw (RuntimeException) e.getRuntimeException().fillInStackTrace();
   }
 }
コード例 #6
0
 public void checkIsUsedInOneThread(boolean shouldBeUsedInOneThread) {
   try {
     state.checkIsUsedInOneThread(shouldBeUsedInOneThread);
   } catch (RuntimeExceptionWrapper e) {
     throw (RuntimeException) e.getRuntimeException().fillInStackTrace();
   }
 }
コード例 #7
0
 public void andStubReturn(Object value) {
   try {
     state.andStubReturn(value);
   } catch (RuntimeExceptionWrapper e) {
     throw (RuntimeException) e.getRuntimeException().fillInStackTrace();
   }
 }
コード例 #8
0
 public void makeThreadSafe(boolean threadSafe) {
   try {
     state.makeThreadSafe(threadSafe);
   } catch (RuntimeExceptionWrapper e) {
     throw (RuntimeException) e.getRuntimeException().fillInStackTrace();
   }
 }
コード例 #9
0
 public void setLegacyDefaultThrowable(Throwable throwable) {
   try {
     state.setDefaultThrowable(throwable);
   } catch (RuntimeExceptionWrapper e) {
     throw (RuntimeException) e.getRuntimeException().fillInStackTrace();
   }
 }
コード例 #10
0
 public void asStub() {
   try {
     state.asStub();
   } catch (RuntimeExceptionWrapper e) {
     throw (RuntimeException) e.getRuntimeException().fillInStackTrace();
   }
 }
コード例 #11
0
 @SuppressWarnings("deprecation")
 public void setLegacyMatcher(org.easymock.ArgumentsMatcher matcher) {
   try {
     state.setMatcher(null, matcher);
   } catch (RuntimeExceptionWrapper e) {
     throw (RuntimeException) e.getRuntimeException().fillInStackTrace();
   }
 }
コード例 #12
0
 public IExpectationSetters<Object> anyTimes() {
   try {
     state.times(ZERO_OR_MORE);
     return this;
   } catch (RuntimeExceptionWrapper e) {
     throw (RuntimeException) e.getRuntimeException().fillInStackTrace();
   }
 }
コード例 #13
0
 public IExpectationSetters<Object> atLeastOnce() {
   try {
     state.times(AT_LEAST_ONCE);
     return this;
   } catch (RuntimeExceptionWrapper e) {
     throw (RuntimeException) e.getRuntimeException().fillInStackTrace();
   }
 }
コード例 #14
0
 public IExpectationSetters<Object> times(int min, int max) {
   try {
     state.times(new Range(min, max));
     return this;
   } catch (RuntimeExceptionWrapper e) {
     throw (RuntimeException) e.getRuntimeException().fillInStackTrace();
   }
 }
コード例 #15
0
 public IExpectationSetters<Object> andDelegateTo(Object answer) {
   try {
     state.andDelegateTo(answer);
     return this;
   } catch (RuntimeExceptionWrapper e) {
     throw (RuntimeException) e.getRuntimeException().fillInStackTrace();
   }
 }
コード例 #16
0
 public IExpectationSetters<Object> andThrow(Throwable throwable) {
   try {
     state.andThrow(throwable);
     return this;
   } catch (RuntimeExceptionWrapper e) {
     throw (RuntimeException) e.getRuntimeException().fillInStackTrace();
   }
 }
コード例 #17
0
 public void replay() {
   try {
     state.replay();
     state = new ReplayState(behavior);
     LastControl.reportLastControl(null);
   } catch (RuntimeExceptionWrapper e) {
     throw (RuntimeException) e.getRuntimeException().fillInStackTrace();
   }
 }
コード例 #18
0
 public void verify() {
   try {
     state.verify();
   } catch (RuntimeExceptionWrapper e) {
     throw (RuntimeException) e.getRuntimeException().fillInStackTrace();
   } catch (AssertionErrorWrapper e) {
     throw (AssertionError) e.getAssertionError().fillInStackTrace();
   }
 }
コード例 #19
0
 public <T> T createMock(String name, Class<T> toMock) {
   try {
     state.assertRecordState();
     IProxyFactory<T> proxyFactory = createProxyFactory(toMock);
     return proxyFactory.createProxy(
         toMock, new ObjectMethodsFilter(toMock, new MockInvocationHandler(this), name));
   } catch (RuntimeExceptionWrapper e) {
     throw (RuntimeException) e.getRuntimeException().fillInStackTrace();
   }
 }
コード例 #20
0
 public void setLegacyDefaultVoidCallable() {
   state.setDefaultVoidCallable();
 }