object MockConsole extends Serializable
- Alphabetic
- By Inheritance
- MockConsole
- Serializable
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Type Members
- case class Data(input: List[String] = List.empty, output: Vector[String] = Vector.empty) extends Product with Serializable
The state of the
MockConsole. - case class Mock(consoleState: Ref[Data]) extends Service[Any] with Product with Serializable
- trait Service[R] extends console.Console.Service[R]
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
- val DefaultData: Data
The default initial state of the
MockConsolewith input and output buffers both empty. - final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- val clearInput: ZIO[MockConsole, Nothing, Unit]
Accesses a
MockConsoleinstance in the environment and clears the input buffer. - val clearOutput: ZIO[MockConsole, Nothing, Unit]
Accesses a
MockConsoleinstance in the environment and clears the output buffer. - def clone(): AnyRef
- Attributes
- protected[java.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 feedLines(lines: String*): ZIO[MockConsole, Nothing, Unit]
Accesses a
MockConsoleinstance in the environment and writes the specified sequence of strings to the input buffer. - def finalize(): Unit
- Attributes
- protected[java.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()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def make(data: Data): UIO[MockConsole]
Constructs a new
MockConsolewith the specified initial state.Constructs a new
MockConsolewith the specified initial state. This can be useful for providing the required environment to an effect that requires aConsole, such as with ZIO!.provide. - def makeMock(data: Data): UIO[Mock]
Constructs a new
Mockobject that implements theMockConsoleinterface.Constructs a new
Mockobject that implements theMockConsoleinterface. This can be useful for mixing in with implementations of other interfaces. - 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()
- val output: ZIO[MockConsole, Nothing, Vector[String]]
Accesses a
MockConsoleinstance in the environment and returns the contents of the output buffer. - 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()