Class MethodStubStrategyImpl<T>

    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.lang.reflect.Method method  
    • Constructor Summary

      Constructors 
      Constructor Description
      MethodStubStrategyImpl​(java.lang.reflect.Method method)  
    • Method Summary

      All Methods Instance Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method Description
      void andReturn​(T returnValue)
      Deprecated.
      void toReturn​(T returnValue)
      Stubs the method to return the specified returnValue.
      void toThrow​(java.lang.Throwable throwable)
      Stubs the method to throw the specified throwable.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • method

        private final java.lang.reflect.Method method
    • Constructor Detail

      • MethodStubStrategyImpl

        public MethodStubStrategyImpl​(java.lang.reflect.Method method)
    • Method Detail

      • andReturn

        @Deprecated
        public void andReturn​(T returnValue)
        Deprecated.
        Description copied from interface: MethodStubStrategy
        Stubs the method to return the specified returnValue.
        Specified by:
        andReturn in interface MethodStubStrategy<T>
        Parameters:
        returnValue - The value that will be returned.
      • toThrow

        public void toThrow​(java.lang.Throwable throwable)
        Description copied from interface: MethodStubStrategy
        Stubs the method to throw the specified throwable.
        Specified by:
        toThrow in interface MethodStubStrategy<T>
        Parameters:
        throwable - the throwable
      • toReturn

        public void toReturn​(T returnValue)
        Description copied from interface: MethodStubStrategy
        Stubs the method to return the specified returnValue.
        Specified by:
        toReturn in interface MethodStubStrategy<T>
        Parameters:
        returnValue - The value that will be returned.