Home
last modified time | relevance | path

Searched refs:sleepyTime (Results 1 – 4 of 4) sorted by relevance

/external/mockito/src/main/java/org/mockito/internal/stubbing/answers/
DAnswersWithDelay.java26 private final long sleepyTime; field in AnswersWithDelay
29 public AnswersWithDelay(final long sleepyTime, final Answer<Object> answer) { in AnswersWithDelay() argument
30 this.sleepyTime = sleepyTime; in AnswersWithDelay()
36 TimeUnit.MILLISECONDS.sleep(sleepyTime); in answer()
/external/mockito/src/test/java/org/mockito/internal/stubbing/answers/
DAnswersWithDelayTest.java34 final long sleepyTime = 500L; in should_delay() local
36 final AnswersWithDelay testSubject = new AnswersWithDelay(sleepyTime, new Returns("value")); in should_delay()
43 assertThat(timePassed).isCloseTo(sleepyTime, within(15L)); in should_delay()
/external/mockito/src/main/java/org/mockito/
DAdditionalAnswers.java332 public static <T> Answer<T> answersWithDelay(long sleepyTime, Answer<T> answer) { in answersWithDelay() argument
333 return (Answer<T>) new AnswersWithDelay(sleepyTime, (Answer<Object>) answer); in answersWithDelay()
/external/mockito/src/test/java/org/mockitousage/stubbing/
DStubbingWithAdditionalAnswersTest.java60 final long sleepyTime = 500L; in can_return_after_delay() local
62 … given(iMethods.objectArgMethod(any())).will(answersWithDelay(sleepyTime, returnsFirstArg())); in can_return_after_delay()
69 assertThat(timePassed).isCloseTo(sleepyTime, within(15L)); in can_return_after_delay()