← ZIO Cli docs

GenerationAssertion

zio.cli.testkit.GenerationAssertion

GenerationAssertion contains methods to test the a function returning CliApp or Command.

Attributes

Source
GenerationAssertion.scala
Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Members list

Value members

Concrete methods

def cliAppCreation[R, E, A, B, RGen](f: A => CliApp[R, E, B], response: Gen[RGen, (A, Gen[RGen, CliRepr[List[String], B]])]): ZIO[R & RGen, Throwable, TestResult]

Methods to test generation of CliApp from a function. response is a generator of pairs of seeds of type A for the function and generators to test the CliApp. Thus, response generates tuples (seed, res) where seed is used to generate a CliApp and res is used to test said CliApp. res is itself a generator of CliRepr[List[String], B], that is, pairs of a given command and its corresponding output.

Methods to test generation of CliApp from a function. response is a generator of pairs of seeds of type A for the function and generators to test the CliApp. Thus, response generates tuples (seed, res) where seed is used to generate a CliApp and res is used to test said CliApp. res is itself a generator of CliRepr[List[String], B], that is, pairs of a given command and its corresponding output.

Attributes

Source
GenerationAssertion.scala
def cliAppCreationZIO[R, E, A, B, RGen, RC, EC <: Throwable](f: A => ZIO[RC, EC, CliApp[R, E, B]], response: Gen[RGen, (A, Gen[RGen, CliRepr[List[String], B]])]): ZIO[R & RC & RGen, Throwable, TestResult]

Attributes

Source
GenerationAssertion.scala
def commandCreation[A, B, R1, R2](f: A => Command[B], response: Gen[R1, (A, Gen[R2, CliRepr[List[String], B]])])(implicit cliConfig: CliConfig): ZIO[R1 & R2, Throwable, TestResult]

Methods to test generation of Command from a function. response is a generator of pairs of seeds of type A for the function and generators to test the Command. Thus, response generates tuples (seed, res) where seed is used to generate a Command and res is used to test said Command. res is itself a generator of CliRepr[List[String], B], that is, pairs of a given command and its corresponding output.

Methods to test generation of Command from a function. response is a generator of pairs of seeds of type A for the function and generators to test the Command. Thus, response generates tuples (seed, res) where seed is used to generate a Command and res is used to test said Command. res is itself a generator of CliRepr[List[String], B], that is, pairs of a given command and its corresponding output.

Attributes

Source
GenerationAssertion.scala
def commandCreationZIO[A, B, R, E <: Throwable, RGen1, RGen2](f: A => ZIO[R, E, Command[B]], response: Gen[RGen1, (A, Gen[RGen2, CliRepr[List[String], B]])]): ZIO[R & RGen1 & RGen2, Throwable, TestResult]

Attributes

Source
GenerationAssertion.scala

Implicits

Implicits

implicit val cliConfig: CliConfig

Attributes

Source
GenerationAssertion.scala