All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.specs2.mock.mockito.MockitoFunctions.scala Maven / Gradle / Ivy

package org.specs2
package mock
package mockito

import org.mockito.stubbing.Answer

/**
 * shortcuts to standard Mockito functions
 */
trait MockitoFunctions extends TheMockitoMocker {
    /** delegate to MockitoMocker doReturn. */
  def doReturn[T](t: T) = mocker.doReturn(t)
  /** delegate to MockitoMocker doAnswer. */
  def doAnswer[T](a: Answer[T]) = mocker.doAnswer(a)
  /** delegate to MockitoMocker doThrow. */
  def doThrow[E <: Throwable](e: E) = mocker.doThrow(e)
  /** delegate to MockitoMocker doNothing. */
  def doNothing = mocker.doNothing
}

object MockitoFunctions extends MockitoFunctions




© 2015 - 2024 Weber Informatics LLC | Privacy Policy