org.scalamock.scalatest

MockFactory

trait MockFactory extends AbstractSuite with MockFactoryBase

Trait that can be mixed into a ScalaTest suite to provide mocking support.

See scalamock for overview documentation.

linear super types: MockFactoryBase, AbstractSuite, AnyRef, Any
self type: MockFactory with Suite
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Hide All
  2. Show all
  1. MockFactory
  2. MockFactoryBase
  3. AbstractSuite
  4. AnyRef
  5. Any
Visibility
  1. Public
  2. All
Impl.
  1. Concrete
  2. Abstract

Type Members

  1. class EpsilonMatcher extends AnyRef

    attributes: protected

Value Members

  1. def != (arg0: AnyRef) : Boolean

    attributes: final
    definition classes: AnyRef
  2. def != (arg0: Any) : Boolean

    o != arg0 is the same as !(o == (arg0)).

    o != arg0 is the same as !(o == (arg0)).

    arg0

    the object to compare against this object for dis-equality.

    returns

    false if the receiver object is equivalent to the argument; true otherwise.

    attributes: final
    definition classes: Any
  3. def ## () : Int

    attributes: final
    definition classes: AnyRef → Any
  4. def $asInstanceOf [T0] () : T0

    attributes: final
    definition classes: AnyRef
  5. def $isInstanceOf [T0] () : Boolean

    attributes: final
    definition classes: AnyRef
  6. def * : MatchAny

    attributes: protected
    definition classes: MockFactoryBase
  7. def == (arg0: AnyRef) : Boolean

    o == arg0 is the same as if (o eq null) arg0 eq null else o.equals(arg0).

    o == arg0 is the same as if (o eq null) arg0 eq null else o.equals(arg0).

    arg0

    the object to compare against this object for equality.

    returns

    true if the receiver object is equivalent to the argument; false otherwise.

    attributes: final
    definition classes: AnyRef
  8. def == (arg0: Any) : Boolean

    o == arg0 is the same as o.equals(arg0).

    o == arg0 is the same as o.equals(arg0).

    arg0

    the object to compare against this object for equality.

    returns

    true if the receiver object is equivalent to the argument; false otherwise.

    attributes: final
    definition classes: Any
  9. implicit def MatchAnyToMockParameter [T] (m: MatchAny) : MockParameter[T]

    attributes: protected implicit
    definition classes: MockFactoryBase
  10. implicit def MatchEpsilonToMockParameter [T] (m: MatchEpsilon) : EpsilonMockParameter

    attributes: protected implicit
    definition classes: MockFactoryBase
  11. def asInstanceOf [T0] : T0

    This method is used to cast the receiver object to be of type T0.

    This method is used to cast the receiver object to be of type T0.

    Note that the success of a cast at runtime is modulo Scala's erasure semantics. Therefore the expression1.asInstanceOf[String] will throw a ClassCastException at runtime, while the expressionList(1).asInstanceOf[List[String]] will not. In the latter example, because the type argument is erased as part of compilation it is not possible to check whether the contents of the list are of the requested typed.

    returns

    the receiver object.

    attributes: final
    definition classes: Any
  12. var autoVerify : Boolean

    attributes: protected
  13. def clone () : AnyRef

    This method creates and returns a copy of the receiver object.

    This method creates and returns a copy of the receiver object.

    The default implementation of the clone method is platform dependent.

    returns

    a copy of the receiver object.

    attributes: protected[lang]
    definition classes: AnyRef
  14. implicit def doubleToEpsilon (d: Double) : EpsilonMatcher

    attributes: protected implicit
    definition classes: MockFactoryBase
  15. def eq (arg0: AnyRef) : Boolean

    This method is used to test whether the argument (arg0) is a reference to the receiver object (this).

    This method is used to test whether the argument (arg0) is a reference to the receiver object (this).

    The eq method implements an [http://en.wikipedia.org/wiki/Equivalence_relation equivalence relation] on non-null instances of AnyRef: * It is reflexive: for any non-null instance x of type AnyRef, x.eq(x) returns true. * It is symmetric: for any non-null instances x and y of type AnyRef, x.eq(y) returns true if and only if y.eq(x) returns true. * It is transitive: for any non-null instances x, y, and z of type AnyRef if x.eq(y) returns true and y.eq(z) returns true, then x.eq(z) returns true.

    Additionally, the eq method has three other properties. * It is consistent: for any non-null instances x and y of type AnyRef, multiple invocations of x.eq(y) consistently returns true or consistently returns false. * For any non-null instance x of type AnyRef, x.eq(null) and null.eq(x) returns false. * null.eq(null) returns true.

    When overriding the equals or hashCode methods, it is important to ensure that their behavior is consistent with reference equality. Therefore, if two objects are references to each other (o1 eq o2), they should be equal to each other (o1 == o2) and they should hash to the same value (o1.hashCode == o2.hashCode).

    arg0

    the object to compare against this object for reference equality.

    returns

    true if the argument is a reference to the receiver object; false otherwise.

    attributes: final
    definition classes: AnyRef
  16. def equals (arg0: Any) : Boolean

    This method is used to compare the receiver object (this) with the argument object (arg0) for equivalence.

    This method is used to compare the receiver object (this) with the argument object (arg0) for equivalence.

    The default implementations of this method is an [http://en.wikipedia.org/wiki/Equivalence_relation equivalence relation]: * It is reflexive: for any instance x of type Any, x.equals(x) should return true. * It is symmetric: for any instances x and y of type Any, x.equals(y) should return true if and only if y.equals(x) returns true. * It is transitive: for any instances x, y, and z of type AnyRef if x.equals(y) returns true and y.equals(z) returns true, then x.equals(z) should return true.

    If you override this method, you should verify that your implementation remains an equivalence relation. Additionally, when overriding this method it is often necessary to override hashCode to ensure that objects that are "equal" (o1.equals(o2) returns true) hash to the same scala.Int (o1.hashCode.equals(o2.hashCode)).

    arg0

    the object to compare against this object for equality.

    returns

    true if the receiver object is equivalent to the argument; false otherwise.

    definition classes: AnyRef → Any
  17. def expectedTestCount (filter: Filter) : Int

    attributes: abstract
    definition classes: AbstractSuite
  18. def finalize () : Unit

    This method is called by the garbage collector on the receiver object when garbage collection determines that there are no more references to the object.

    This method is called by the garbage collector on the receiver object when garbage collection determines that there are no more references to the object.

    The details of when and if the finalize method are invoked, as well as the interaction between finalizeand non-local returns and exceptions, are all platform dependent.

    attributes: protected[lang]
    definition classes: AnyRef
  19. def getClass () : java.lang.Class[_]

    Returns a representation that corresponds to the dynamic class of the receiver object.

    Returns a representation that corresponds to the dynamic class of the receiver object.

    The nature of the representation is platform dependent.

    returns

    a representation that corresponds to the dynamic class of the receiver object.

    attributes: final
    definition classes: AnyRef
  20. def hashCode () : Int

    Returns a hash code value for the object.

    Returns a hash code value for the object.

    The default hashing algorithm is platform dependent.

    Note that it is allowed for two objects to have identical hash codes (o1.hashCode.equals(o2.hashCode)) yet not be equal (o1.equals(o2) returns false). A degenerate implementation could always return 0. However, it is required that if two objects are equal (o1.equals(o2) returns true) that they have identical hash codes (o1.hashCode.equals(o2.hashCode)). Therefore, when overriding this method, be sure to verify that the behavior is consistent with the equals method.

    returns

    the hash code value for the object.

    definition classes: AnyRef → Any
  21. def inAnyOrder (what: ⇒ Unit) : Unit

    attributes: protected
    definition classes: MockFactoryBase
  22. def inSequence (what: ⇒ Unit) : Unit

    attributes: protected
    definition classes: MockFactoryBase
  23. def isInstanceOf [T0] : Boolean

    This method is used to test whether the dynamic type of the receiver object is T0.

    This method is used to test whether the dynamic type of the receiver object is T0.

    Note that the test result of the test is modulo Scala's erasure semantics. Therefore the expression1.isInstanceOf[String] will return false, while the expression List(1).isInstanceOf[List[String]] will return true. In the latter example, because the type argument is erased as part of compilation it is not possible to check whether the contents of the list are of the requested typed.

    returns

    true if the receiver object is an instance of erasure of type T0; false otherwise.

    attributes: final
    definition classes: Any
  24. def mockFunction [T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, R] : MockFunction10[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, R]

    attributes: protected
    definition classes: MockFactoryBase
  25. def mockFunction [T1, T2, T3, T4, T5, T6, T7, T8, T9, R] : MockFunction9[T1, T2, T3, T4, T5, T6, T7, T8, T9, R]

    attributes: protected
    definition classes: MockFactoryBase
  26. def mockFunction [T1, T2, T3, T4, T5, T6, T7, T8, R] : MockFunction8[T1, T2, T3, T4, T5, T6, T7, T8, R]

    attributes: protected
    definition classes: MockFactoryBase
  27. def mockFunction [T1, T2, T3, T4, T5, T6, T7, R] : MockFunction7[T1, T2, T3, T4, T5, T6, T7, R]

    attributes: protected
    definition classes: MockFactoryBase
  28. def mockFunction [T1, T2, T3, T4, T5, T6, R] : MockFunction6[T1, T2, T3, T4, T5, T6, R]

    attributes: protected
    definition classes: MockFactoryBase
  29. def mockFunction [T1, T2, T3, T4, T5, R] : MockFunction5[T1, T2, T3, T4, T5, R]

    attributes: protected
    definition classes: MockFactoryBase
  30. def mockFunction [T1, T2, T3, T4, R] : MockFunction4[T1, T2, T3, T4, R]

    attributes: protected
    definition classes: MockFactoryBase
  31. def mockFunction [T1, T2, T3, R] : MockFunction3[T1, T2, T3, R]

    attributes: protected
    definition classes: MockFactoryBase
  32. def mockFunction [T1, T2, R] : MockFunction2[T1, T2, R]

    attributes: protected
    definition classes: MockFactoryBase
  33. def mockFunction [T1, R] : MockFunction1[T1, R]

    attributes: protected
    definition classes: MockFactoryBase
  34. def mockFunction [R] : MockFunction0[R]

    attributes: protected
    definition classes: MockFactoryBase
  35. implicit def mockFunction0ToExpectation [R] (m: MockFunction0[R]) : TypeSafeExpectation0[R]

    attributes: implicit
    definition classes: MockFactoryBase
  36. implicit def mockFunction10ToExpectation [T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, R] (m: MockFunction10[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, R]) : TypeSafeExpectation10[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, R]

    attributes: implicit
    definition classes: MockFactoryBase
  37. implicit def mockFunction1ToExpectation [T1, R] (m: MockFunction1[T1, R]) : TypeSafeExpectation1[T1, R]

    attributes: implicit
    definition classes: MockFactoryBase
  38. implicit def mockFunction2ToExpectation [T1, T2, R] (m: MockFunction2[T1, T2, R]) : TypeSafeExpectation2[T1, T2, R]

    attributes: implicit
    definition classes: MockFactoryBase
  39. implicit def mockFunction3ToExpectation [T1, T2, T3, R] (m: MockFunction3[T1, T2, T3, R]) : TypeSafeExpectation3[T1, T2, T3, R]

    attributes: implicit
    definition classes: MockFactoryBase
  40. implicit def mockFunction4ToExpectation [T1, T2, T3, T4, R] (m: MockFunction4[T1, T2, T3, T4, R]) : TypeSafeExpectation4[T1, T2, T3, T4, R]

    attributes: implicit
    definition classes: MockFactoryBase
  41. implicit def mockFunction5ToExpectation [T1, T2, T3, T4, T5, R] (m: MockFunction5[T1, T2, T3, T4, T5, R]) : TypeSafeExpectation5[T1, T2, T3, T4, T5, R]

    attributes: implicit
    definition classes: MockFactoryBase
  42. implicit def mockFunction6ToExpectation [T1, T2, T3, T4, T5, T6, R] (m: MockFunction6[T1, T2, T3, T4, T5, T6, R]) : TypeSafeExpectation6[T1, T2, T3, T4, T5, T6, R]

    attributes: implicit
    definition classes: MockFactoryBase
  43. implicit def mockFunction7ToExpectation [T1, T2, T3, T4, T5, T6, T7, R] (m: MockFunction7[T1, T2, T3, T4, T5, T6, T7, R]) : TypeSafeExpectation7[T1, T2, T3, T4, T5, T6, T7, R]

    attributes: implicit
    definition classes: MockFactoryBase
  44. implicit def mockFunction8ToExpectation [T1, T2, T3, T4, T5, T6, T7, T8, R] (m: MockFunction8[T1, T2, T3, T4, T5, T6, T7, T8, R]) : TypeSafeExpectation8[T1, T2, T3, T4, T5, T6, T7, T8, R]

    attributes: implicit
    definition classes: MockFactoryBase
  45. implicit def mockFunction9ToExpectation [T1, T2, T3, T4, T5, T6, T7, T8, T9, R] (m: MockFunction9[T1, T2, T3, T4, T5, T6, T7, T8, T9, R]) : TypeSafeExpectation9[T1, T2, T3, T4, T5, T6, T7, T8, T9, R]

    attributes: implicit
    definition classes: MockFactoryBase
  46. def ne (arg0: AnyRef) : Boolean

    o.ne(arg0) is the same as !(o.eq(arg0)).

    o.ne(arg0) is the same as !(o.eq(arg0)).

    arg0

    the object to compare against this object for reference dis-equality.

    returns

    false if the argument is not a reference to the receiver object; true otherwise.

    attributes: final
    definition classes: AnyRef
  47. def nestedSuites : List[Suite]

    attributes: abstract
    definition classes: AbstractSuite
  48. def notify () : Unit

    Wakes up a single thread that is waiting on the receiver object's monitor.

    Wakes up a single thread that is waiting on the receiver object's monitor.

    attributes: final
    definition classes: AnyRef
  49. def notifyAll () : Unit

    Wakes up all threads that are waiting on the receiver object's monitor.

    Wakes up all threads that are waiting on the receiver object's monitor.

    attributes: final
    definition classes: AnyRef
  50. def resetExpectations () : Unit

    attributes: protected
    definition classes: MockFactoryBase
  51. def resetMocks () : Unit

    attributes: protected
    definition classes: MockFactoryBase
  52. def run (testName: Option[String], reporter: Reporter, stopper: Stopper, filter: Filter, configMap: Map[String, Any], distributor: Option[Distributor], tracker: Tracker) : Unit

    attributes: abstract
    definition classes: AbstractSuite
  53. def runInternal (testName: Option[String], reporter: Reporter, stopper: Stopper, filter: Filter, configMap: Map[String, Any], distributor: Option[Distributor], tracker: Tracker) : Unit

  54. def runNestedSuites (reporter: Reporter, stopper: Stopper, filter: Filter, configMap: Map[String, Any], distributor: Option[Distributor], tracker: Tracker) : Unit

    attributes: protected abstract
    definition classes: AbstractSuite
  55. def runTest (testName: String, reporter: Reporter, stopper: Stopper, configMap: Map[String, Any], tracker: Tracker) : Unit

    attributes: protected
    definition classes: MockFactory → AbstractSuite
  56. def runTests (testName: Option[String], reporter: Reporter, stopper: Stopper, filter: Filter, configMap: Map[String, Any], distributor: Option[Distributor], tracker: Tracker) : Unit

    attributes: protected
    definition classes: MockFactory → AbstractSuite
  57. def synchronized [T0] (arg0: T0) : T0

    attributes: final
    definition classes: AnyRef
  58. def tags : Map[String, Set[String]]

    attributes: abstract
    definition classes: AbstractSuite
  59. def testNames : Set[String]

    attributes: abstract
    definition classes: AbstractSuite
  60. implicit def toMockParameter [T] (v: T) : MockParameter[T]

    attributes: protected implicit
    definition classes: MockFactoryBase
  61. def toString () : String

    Returns a string representation of the object.

    Returns a string representation of the object.

    The default representation is platform dependent.

    returns

    a string representation of the object.

    definition classes: AnyRef → Any
  62. def verifyExpectations () : Unit

    attributes: protected
    definition classes: MockFactoryBase
  63. def wait () : Unit

    attributes: final
    definition classes: AnyRef
  64. def wait (arg0: Long, arg1: Int) : Unit

    attributes: final
    definition classes: AnyRef
  65. def wait (arg0: Long) : Unit

    attributes: final
    definition classes: AnyRef
  66. def where [T1, T2, T3, T4, T5, T6, T7, T8, T9, T10] (matcher: (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10) ⇒ Boolean) : MockMatcher10[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10]

    attributes: protected
    definition classes: MockFactoryBase
  67. def where [T1, T2, T3, T4, T5, T6, T7, T8, T9] (matcher: (T1, T2, T3, T4, T5, T6, T7, T8, T9) ⇒ Boolean) : MockMatcher9[T1, T2, T3, T4, T5, T6, T7, T8, T9]

    attributes: protected
    definition classes: MockFactoryBase
  68. def where [T1, T2, T3, T4, T5, T6, T7, T8] (matcher: (T1, T2, T3, T4, T5, T6, T7, T8) ⇒ Boolean) : MockMatcher8[T1, T2, T3, T4, T5, T6, T7, T8]

    attributes: protected
    definition classes: MockFactoryBase
  69. def where [T1, T2, T3, T4, T5, T6, T7] (matcher: (T1, T2, T3, T4, T5, T6, T7) ⇒ Boolean) : MockMatcher7[T1, T2, T3, T4, T5, T6, T7]

    attributes: protected
    definition classes: MockFactoryBase
  70. def where [T1, T2, T3, T4, T5, T6] (matcher: (T1, T2, T3, T4, T5, T6) ⇒ Boolean) : MockMatcher6[T1, T2, T3, T4, T5, T6]

    attributes: protected
    definition classes: MockFactoryBase
  71. def where [T1, T2, T3, T4, T5] (matcher: (T1, T2, T3, T4, T5) ⇒ Boolean) : MockMatcher5[T1, T2, T3, T4, T5]

    attributes: protected
    definition classes: MockFactoryBase
  72. def where [T1, T2, T3, T4] (matcher: (T1, T2, T3, T4) ⇒ Boolean) : MockMatcher4[T1, T2, T3, T4]

    attributes: protected
    definition classes: MockFactoryBase
  73. def where [T1, T2, T3] (matcher: (T1, T2, T3) ⇒ Boolean) : MockMatcher3[T1, T2, T3]

    attributes: protected
    definition classes: MockFactoryBase
  74. def where [T1, T2] (matcher: (T1, T2) ⇒ Boolean) : MockMatcher2[T1, T2]

    attributes: protected
    definition classes: MockFactoryBase
  75. def where [T1] (matcher: (T1) ⇒ Boolean) : MockMatcher1[T1]

    attributes: protected
    definition classes: MockFactoryBase
  76. implicit def wildcard [T] : MockParameter[T]

    attributes: protected implicit
    definition classes: MockFactoryBase
  77. def withFixture (test: NoArgTest) : Unit

    attributes: protected abstract
    definition classes: AbstractSuite

Inherited from MockFactoryBase

Inherited from AbstractSuite

Inherited from AnyRef

Inherited from Any