public static MockitoException cannotCreateTimerWithNegativeDurationTime(long durationMillis) { return new FriendlyReminderException(join( "", "Don't panic! I'm just a friendly reminder!", "It is impossible for time to go backward, therefore...", "You cannot put negative value of duration: (" + durationMillis + ")", "as argument of timer methods (after(), timeout())", "" )); }
public static MockitoException atMostAndNeverShouldNotBeUsedWithTimeout() { return new FriendlyReminderException(join("", "Don't panic! I'm just a friendly reminder!", "timeout() should not be used with atMost() or never() because...", "...it does not make much sense - the test would have passed immediately in concurrency", "We kept this method only to avoid compilation errors when upgrading Mockito.", "In future release we will remove timeout(x).atMost(y) from the API.", "If you want to find out more please refer to issue 235", "")); }
public void atMostShouldNotBeUsedWithTimeout() { throw new FriendlyReminderException(join("", "Don't panic! I'm just a friendly reminder!", "timeout() should not be used with atMost() because...", "...it does not make much sense - the test would have passed immediately in concurency", "We kept this method only to avoid compilation errors when upgrading Mockito.", "In future release we will remove timeout(x).atMost(y) from the API.", "If you want to find out more please refer to issue 235", "")); }
public void atMostShouldNotBeUsedWithTimeout() { throw new FriendlyReminderException(join("", "Don't panic! I'm just a friendly reminder!", "timeout() should not be used with atMost() because...", "...it does not make much sense - the test would have passed immediately in concurency", "We kept this method only to avoid compilation errors when upgrading Mockito.", "In future release we will remove timeout(x).atMost(y) from the API.", "If you want to find out more please refer to issue 235", "")); }