Class Result

  • All Implemented Interfaces:
    java.io.Serializable, IAnswer<java.lang.Object>

    public final class Result
    extends java.lang.Object
    implements IAnswer<java.lang.Object>, java.io.Serializable
    Author:
    OFFIS, Tammo Freese
    See Also:
    Serialized Form
    • Method Detail

      • createThrowResult

        public static Result createThrowResult​(java.lang.Throwable throwable)
      • createReturnResult

        public static Result createReturnResult​(java.lang.Object value)
      • createDelegatingResult

        public static Result createDelegatingResult​(java.lang.Object value)
      • createAnswerResult

        public static Result createAnswerResult​(IAnswer<?> answer)
      • answer

        public java.lang.Object answer()
                                throws java.lang.Throwable
        Description copied from interface: IAnswer
        Is called by EasyMock to answer an expected call. The answer may be to return a value, or to throw an exception. The arguments of the call for which the answer is generated are available via EasyMock.getCurrentArgument(int) or EasyMock.getCurrentArguments(). The former method is preferred since it will infer the argument type.
        Specified by:
        answer in interface IAnswer<java.lang.Object>
        Returns:
        the value to be returned
        Throws:
        java.lang.Throwable - the throwable to be thrown
      • shouldFillInStackTrace

        public boolean shouldFillInStackTrace()
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object