implicit class MUnitCatsAssertionsForIOOps[A] extends AnyRef
Linear Supertypes
Ordering
- Alphabetic
- By Inheritance
Inherited
- MUnitCatsAssertionsForIOOps
- AnyRef
- Any
- Hide All
- Show All
Visibility
- Public
- Protected
Instance Constructors
- new MUnitCatsAssertionsForIOOps(io: IO[A])
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
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def assertEquals[B](expected: B, clue: => Any = "values are not the same")(implicit loc: Location, ev: <:<[B, A]): IO[Unit]
Asserts that this effect returns an expected value.
Asserts that this effect returns an expected value.
The "expected" value (second argument) must have the same type or be a subtype of the one "contained" inside the effect. For example:
IO(Option(1)).assertEquals(Some(1)) // OK IO(Some(1)).assertEquals(Option(1)) // Error: Option[Int] is not a subtype of Some[Int]
The "clue" value can be used to give extra information about the failure in case the assertion fails.
- expected
the expected value
- clue
a value that will be printed in case the assertions fails
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def intercept[T <: Throwable](implicit T: ClassTag[T], loc: Location): IO[T]
Intercepts a
Throwable
being thrown inside this effect.Intercepts a
Throwable
being thrown inside this effect.val io = IO.raiseError[Unit](MyException("BOOM!")) io.intercept[MyException]
Example: - def interceptMessage[T <: Throwable](expectedExceptionMessage: String)(implicit T: ClassTag[T], loc: Location): IO[T]
Intercepts a
Throwable
with a certain message being thrown inside this effect.Intercepts a
Throwable
with a certain message being thrown inside this effect.val io = IO.raiseError[Unit](MyException("BOOM!")) io.intercept[MyException]("BOOM!")
Example: - final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- 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]) @native()