Class MoreAnswers

java.lang.Object
it.tidalwave.util.test.MoreAnswers

public class MoreAnswers extends Object
A repository of reusable Answers for Mockito.
Since:
3.2-ALPHA-8
Author:
Fabrizio Giudici
  • Field Details

    • CALLS_DEFAULT_METHODS

      public static final org.mockito.stubbing.Answer<?> CALLS_DEFAULT_METHODS
      An Answer that calls default methods of an interface. To be used as: Foo foo = mock(Foo.class, MoreAnswers.CALLS_DEFAULT_METNODS);. Mockito's Answers.CALLS_REAL_METHODS actually behaves the same when used with interfaces, but it has been designed for mixed mocking, which is a practice that is supposed to be used only with corner cases a legacy stuff.
  • Constructor Details

    • MoreAnswers

      public MoreAnswers()