object MocksCreation extends MocksCreation
- Alphabetic
- By Inheritance
- MocksCreation
- MocksCreation
- ClassesOf
- TheMockitoMocker
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Type Members
- case class MockProperty[T](p: Property[T] = Property[T]()) extends Product with Serializable
- Definition Classes
- MocksCreation
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- implicit def anyToMockProperty[T](t: => T): MockProperty[T]
this implicit helps with defining optional values for mockito settings
this implicit helps with defining optional values for mockito settings
- Definition Classes
- MocksCreation
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def classesOf[T1, T2, T3, T4, T5](implicit arg0: ClassTag[T1], arg1: ClassTag[T2], arg2: ClassTag[T3], arg3: ClassTag[T4], arg4: ClassTag[T5]): Seq[Class[_ >: _$1 with _$1 with _$1 with _$1 with _$1]] forSome {type _$1, type _$1, type _$1, type _$1, type _$1}
- Definition Classes
- ClassesOf
- def classesOf[T1, T2, T3, T4](implicit arg0: ClassTag[T1], arg1: ClassTag[T2], arg2: ClassTag[T3], arg3: ClassTag[T4]): Seq[Class[_ >: _$1 with _$1 with _$1 with _$1]] forSome {type _$1, type _$1, type _$1, type _$1}
- Definition Classes
- ClassesOf
- def classesOf[T1, T2, T3](implicit arg0: ClassTag[T1], arg1: ClassTag[T2], arg2: ClassTag[T3]): Seq[Class[_ >: _$1 with _$1 with _$1]] forSome {type _$1, type _$1, type _$1}
- Definition Classes
- ClassesOf
- def classesOf[T1, T2](implicit arg0: ClassTag[T1], arg1: ClassTag[T2]): Seq[Class[_ >: _$1 with _$1]] forSome {type _$1, type _$1}
- Definition Classes
- ClassesOf
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native() @IntrinsicCandidate()
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @IntrinsicCandidate()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @IntrinsicCandidate()
- def ignoreStubs(mocks: AnyRef*): IgnoreStubs
ignore stubbed methods when verifying that a mock has no more interactions
ignore stubbed methods when verifying that a mock has no more interactions
- Definition Classes
- MocksCreation
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def mock[T](settings: MockSettings)(implicit arg0: ClassTag[T]): T
create a mock object with some specific settings: val m = mock[java.util.List[String]](settings)
create a mock object with some specific settings: val m = mock[java.util.List[String]](settings)
- Definition Classes
- MocksCreation
- def mock[T](implicit arg0: ClassTag[T]): T
create a mock object: val m = mock[java.util.List[String]]
create a mock object: val m = mock[java.util.List[String]]
- Definition Classes
- MocksCreation
- def mockAs[T](name: String)(implicit arg0: ClassTag[T]): T
create a mock object with a name: val m = mockAs[java.util.List[String]]("name")
create a mock object with a name: val m = mockAs[java.util.List[String]]("name")
- Definition Classes
- MocksCreation
- implicit def mocked[T](t: => T)(implicit arg0: ClassTag[T]): Mocked[T]
implicit allowing to define the mock settings with a nice syntax:
implicit allowing to define the mock settings with a nice syntax:
- named mock: val m = mock[java.util.List[String]].as("name")
- smart mock: val m = mock[java.util.List[String]].smart
- other settings: val m = mock[java.util.List[String]]. settings(name = "list", defaultReturn = 10, extraInterfaces = classesOf[Cloneable, Serializable])
- Definition Classes
- MocksCreation
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @IntrinsicCandidate()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @IntrinsicCandidate()
- def smartMock[T](implicit arg0: ClassTag[T]): T
create a mock object with smart return values: val m = smartMock[java.util.List[String]]
create a mock object with smart return values: val m = smartMock[java.util.List[String]]
This is the equivalent of Mockito.mock(List.class, SMART_NULLVALUES) but testing shows that it is not working well with Scala.
- Definition Classes
- MocksCreation
- def spy[T](m: T): T
create a spy on an object.
create a spy on an object.
A spy is a real object but can still have some of its methods stubbed. However the syntax for stubbing a spy is a bit different than with a mock:
val s = spy(new LinkedList[String]) doReturn("one").when(s).get(0) // instead of s.get(0) returns "one" which would throw an exception
- Definition Classes
- MocksCreation
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
Deprecated Value Members
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable]) @Deprecated
- Deprecated