Object/Class

zio.test

Gen

Related Docs: class Gen | package test

Permalink

object Gen extends GenZIO with FunctionVariants with TimeVariants with Serializable

Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Gen
  2. Serializable
  3. Serializable
  4. TimeVariants
  5. FunctionVariants
  6. GenZIO
  7. AnyRef
  8. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. final val alphaNumericChar: Gen[Random, Char]

    Permalink

    A generator of alphanumeric characters.

    A generator of alphanumeric characters. Shrinks toward '0'.

  5. final val alphaNumericString: Gen[Random with Sized, String]

    Permalink

    A generator of alphanumeric strings.

    A generator of alphanumeric strings. Shrinks towards the empty string.

  6. final val anyByte: Gen[Random, Byte]

    Permalink

    A generator of bytes.

    A generator of bytes. Shrinks toward '0'.

  7. final val anyChar: Gen[Random, Char]

    Permalink

    A generator of characters.

    A generator of characters. Shrinks toward '0'.

  8. final def anyFiniteDuration: Gen[Random, Duration]

    Permalink

    A generator of finite zio.duration.Duration values.

    A generator of finite zio.duration.Duration values. Shrinks toward Duration.Zero.

    Definition Classes
    TimeVariants
  9. final val anyFloat: Gen[Random, Float]

    Permalink

    A generator of integers.

    A generator of integers. Shrinks toward '0'.

  10. final def anyInstant: Gen[Random, Instant]

    Permalink

    A generator of java.time.Instant values.

    A generator of java.time.Instant values. Shrinks toward Instant.MIN.

    Definition Classes
    TimeVariants
  11. final val anyInt: Gen[Random, Int]

    Permalink

    A generator of integers.

    A generator of integers. Shrinks toward '0'.

  12. final def anyLocalDateTime: Gen[Random, LocalDateTime]

    Permalink

    A generator of java.time.LocalDateTime values.

    A generator of java.time.LocalDateTime values. Shrinks toward LocalDateTime.MIN.

    Definition Classes
    TimeVariants
  13. final val anyLong: Gen[Random, Long]

    Permalink

    A generator of longs.

    A generator of longs. Shrinks toward '0'.

  14. final def anyOffsetDateTime: Gen[Random, OffsetDateTime]

    Permalink

    A generator of java.time.OffsetDateTime values.

    A generator of java.time.OffsetDateTime values. Shrinks toward OffsetDateTime.MIN.

    Definition Classes
    TimeVariants
  15. final val anyShort: Gen[Random, Short]

    Permalink

    A generator of shorts.

    A generator of shorts. Shrinks toward '0'.

  16. final def anyString: Gen[Random with Sized, String]

    Permalink

    A generator of strings.

    A generator of strings. Shrinks towards the empty string.

  17. final val anyUnicodeChar: Gen[Random, Char]

    Permalink

    A generator of Unicode characters.

    A generator of Unicode characters. Shrinks toward '0'.

  18. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  19. final val boolean: Gen[Random, Boolean]

    Permalink

    A generator of booleans.

    A generator of booleans. Shrinks toward 'false'.

  20. final def byte(min: Byte, max: Byte): Gen[Random, Byte]

    Permalink

    A generator of byte values inside the specified range: [start, end].

    A generator of byte values inside the specified range: [start, end]. The shrinker will shrink toward the lower end of the range ("smallest").

  21. final def causes[R <: Random with Sized, E](e: Gen[R, E], t: Gen[R, Throwable]): Gen[R, Cause[E]]

    Permalink

    A generator of Cause values

    A generator of Cause values

    Definition Classes
    GenZIO
  22. final def chained[R <: Random with Sized, Env, E, A](gen: Gen[R, ZIO[Env, E, A]]): Gen[R, ZIO[Env, E, A]]

    Permalink

    A generator of effects that are the result of chaining the specified effect with itself a random number of times.

    A generator of effects that are the result of chaining the specified effect with itself a random number of times.

    Definition Classes
    GenZIO
  23. final def chainedN[R <: Random, Env, E, A](n: Int)(zio: Gen[R, ZIO[Env, E, A]]): Gen[R, ZIO[Env, E, A]]

    Permalink

    A generator of effects that are the result of chaining the specified effect with itself a given number of times.

    A generator of effects that are the result of chaining the specified effect with itself a given number of times.

    Definition Classes
    GenZIO
  24. final def char(min: Char, max: Char): Gen[Random, Char]

    Permalink

    A generator of character values inside the specified range: [start, end].

    A generator of character values inside the specified range: [start, end]. The shrinker will shrink toward the lower end of the range ("smallest").

  25. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  26. final def concurrent[R, E, A](zio: ZIO[R, E, A]): Gen[Any, ZIO[R, E, A]]

    Permalink

    A generator of effects that are the result of applying concurrency combinators to the specified effect that are guaranteed not to change its value.

    A generator of effects that are the result of applying concurrency combinators to the specified effect that are guaranteed not to change its value.

    Definition Classes
    GenZIO
  27. final def const[A](a: ⇒ A): Gen[Any, A]

    Permalink

    A constant generator of the specified value.

  28. final def constSample[R, A](sample: ⇒ Sample[R, A]): Gen[R, A]

    Permalink

    A constant generator of the specified sample.

  29. final def died[R](gen: Gen[R, Throwable]): Gen[R, ZIO[Any, Nothing, Nothing]]

    Permalink

    A generator of effects that have died with a Throwable.

    A generator of effects that have died with a Throwable.

    Definition Classes
    GenZIO
  30. final def double(min: Double, max: Double): Gen[Random, Double]

    Permalink

    A generator of double values inside the specified range: [start, end].

    A generator of double values inside the specified range: [start, end]. The shrinker will shrink toward the lower end of the range ("smallest").

  31. final def either[R <: Random, A, B](left: Gen[R, A], right: Gen[R, B]): Gen[R, Either[A, B]]

    Permalink
  32. final def elements[A](as: A*): Gen[Random, A]

    Permalink
  33. final val empty: Gen[Any, Nothing]

    Permalink
  34. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  35. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  36. final val exponential: Gen[Random, Double]

    Permalink

    A generator of exponentially distributed doubles with mean 1.

    A generator of exponentially distributed doubles with mean 1. The shrinker will shrink toward 0.

  37. final def failures[R, E](gen: Gen[R, E]): Gen[R, ZIO[Any, E, Nothing]]

    Permalink

    A generator of effects that have failed with an error.

    A generator of effects that have failed with an error.

    Definition Classes
    GenZIO
  38. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  39. final def finiteDuration(min: Duration, max: Duration): Gen[Random, Duration]

    Permalink

    A generator of finite zio.duration.Duration values inside the specified range: [min, max].

    A generator of finite zio.duration.Duration values inside the specified range: [min, max]. Shrinks toward min.

    Definition Classes
    TimeVariants
  40. final def fromEffect[R, A](effect: ZIO[R, Nothing, A]): Gen[R, A]

    Permalink

    Constructs a generator from an effect that constructs a value.

  41. final def fromEffectSample[R, A](effect: ZIO[R, Nothing, Sample[R, A]]): Gen[R, A]

    Permalink

    Constructs a generator from an effect that constructs a sample.

  42. final def fromIterable[R, A](as: Iterable[A], shrinker: (A) ⇒ ZStream[R, Nothing, A] = defaultShrinker): Gen[R, A]

    Permalink

    Constructs a deterministic generator that only generates the specified fixed values.

  43. final def fromRandom[A](f: (Service[Any]) ⇒ UIO[A]): Gen[Random, A]

    Permalink

    Constructs a generator from a function that uses randomness.

    Constructs a generator from a function that uses randomness. The returned generator will not have any shrinking.

  44. final def fromRandomSample[R <: Random, A](f: (Service[Any]) ⇒ UIO[Sample[R, A]]): Gen[R, A]

    Permalink

    Constructs a generator from a function that uses randomness to produce a sample.

  45. final def function[R, A, B](gen: Gen[R, B]): Gen[R, (A) ⇒ B]

    Permalink

    Constructs a generator of functions from A to B given a generator of B values.

    Constructs a generator of functions from A to B given a generator of B values. Two A values will be considered to be equal, and thus will be guaranteed to generate the same B value, if they have the same hashCode.

    Definition Classes
    FunctionVariants
  46. final def function2[R, A, B, C](gen: Gen[R, C]): Gen[R, (A, B) ⇒ C]

    Permalink

    A version of function that generates functions that accept two parameters.

    A version of function that generates functions that accept two parameters.

    Definition Classes
    FunctionVariants
  47. final def function3[R, A, B, C, D](gen: Gen[R, D]): Gen[R, (A, B, C) ⇒ D]

    Permalink

    A version of function that generates functions that accept three parameters.

    A version of function that generates functions that accept three parameters.

    Definition Classes
    FunctionVariants
  48. final def function4[R, A, B, C, D, E](gen: Gen[R, E]): Gen[R, (A, B, C, D) ⇒ E]

    Permalink

    A version of function that generates functions that accept four parameters.

    A version of function that generates functions that accept four parameters.

    Definition Classes
    FunctionVariants
  49. final def functionWith[R, A, B](gen: Gen[R, B])(hash: (A) ⇒ Int): Gen[R, (A) ⇒ B]

    Permalink

    Constructs a generator of functions from A to B given a generator of B values and a hashing function for A values.

    Constructs a generator of functions from A to B given a generator of B values and a hashing function for A values. Two A values will be considered to be equal, and thus will be guaranteed to generate the same B value, if they have have the same hash. This is useful when A does not implement hashCode in a way that is constent with equality.

    Definition Classes
    FunctionVariants
  50. final def functionWith2[R, A, B, C](gen: Gen[R, C])(hash: (A, B) ⇒ Int): Gen[R, (A, B) ⇒ C]

    Permalink

    A version of functionWith that generates functions that accept two parameters.

    A version of functionWith that generates functions that accept two parameters.

    Definition Classes
    FunctionVariants
  51. final def functionWith3[R, A, B, C, D](gen: Gen[R, D])(hash: (A, B, C) ⇒ Int): Gen[R, (A, B, C) ⇒ D]

    Permalink

    A version of functionWith that generates functions that accept three parameters.

    A version of functionWith that generates functions that accept three parameters.

    Definition Classes
    FunctionVariants
  52. final def functionWith4[R, A, B, C, D, E](gen: Gen[R, E])(hash: (A, B, C, D) ⇒ Int): Gen[R, (A, B, C, D) ⇒ E]

    Permalink

    A version of functionWith that generates functions that accept four parameters.

    A version of functionWith that generates functions that accept four parameters.

    Definition Classes
    FunctionVariants
  53. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  54. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  55. final def instant(min: Instant, max: Instant): Gen[Random, Instant]

    Permalink

    A generator of java.time.Instant values inside the specified range: [min, max].

    A generator of java.time.Instant values inside the specified range: [min, max]. Shrinks toward min.

    Definition Classes
    TimeVariants
  56. final def int(min: Int, max: Int): Gen[Random, Int]

    Permalink

    A generator of integers inside the specified range: [start, end].

    A generator of integers inside the specified range: [start, end]. The shrinker will shrink toward the lower end of the range ("smallest").

  57. final def integral[A](min: A, max: A)(implicit I: Integral[A]): Gen[Random, A]

    Permalink

    A generator of integral values inside the specified range: [start, end].

    A generator of integral values inside the specified range: [start, end]. The shrinker will shrink toward the lower end of the range ("smallest").

  58. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  59. final def large[R <: Random with Sized, A](f: (Int) ⇒ Gen[R, A], min: Int = 0): Gen[R, A]

    Permalink

    A sized generator that uses a uniform distribution of size values.

    A sized generator that uses a uniform distribution of size values. A large number of larger sizes will be generated.

  60. final def listOf[R <: Random with Sized, A](g: Gen[R, A]): Gen[R, List[A]]

    Permalink
  61. final def listOf1[R <: Random with Sized, A](g: Gen[R, A]): Gen[R, List[A]]

    Permalink
  62. final def listOfN[R <: Random, A](n: Int)(g: Gen[R, A]): Gen[R, List[A]]

    Permalink
  63. final def localDateTime(min: LocalDateTime, max: LocalDateTime): Gen[Random, LocalDateTime]

    Permalink

    A generator of java.time.LocalDateTime values inside the specified range: [min, max].

    A generator of java.time.LocalDateTime values inside the specified range: [min, max]. Shrinks toward min.

    Definition Classes
    TimeVariants
  64. final def long(min: Long, max: Long): Gen[Random, Long]

    Permalink

    A generator of long values in the specified range: [start, end].

    A generator of long values in the specified range: [start, end]. The shrinker will shrink toward the lower end of the range ("smallest").

  65. final def medium[R <: Random with Sized, A](f: (Int) ⇒ Gen[R, A], min: Int = 0): Gen[R, A]

    Permalink

    A sized generator that uses an exponential distribution of size values.

    A sized generator that uses an exponential distribution of size values. The majority of sizes will be towards the lower end of the range but some larger sizes will be generated as well.

  66. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  67. final val none: Gen[Any, Option[Nothing]]

    Permalink

    A constant generator of the empty value.

  68. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  69. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  70. final def offsetDateTime(min: OffsetDateTime, max: OffsetDateTime): Gen[Random, OffsetDateTime]

    Permalink

    A generator of java.time.OffsetDateTime values inside the specified range: [min, max].

    A generator of java.time.OffsetDateTime values inside the specified range: [min, max]. Shrinks toward min.

    Definition Classes
    TimeVariants
  71. final def oneOf[R <: Random, A](as: Gen[R, A]*): Gen[R, A]

    Permalink
  72. final def option[R <: Random, A](gen: Gen[R, A]): Gen[R, Option[A]]

    Permalink

    A generator of optional values.

    A generator of optional values. Shrinks toward None.

  73. final def parallel[R, E, A](zio: ZIO[R, E, A]): Gen[Any, ZIO[R, E, A]]

    Permalink

    A generator of effects that are the result of applying parallelism combinators to the specified effect that are guaranteed not to change its value.

    A generator of effects that are the result of applying parallelism combinators to the specified effect that are guaranteed not to change its value.

    Definition Classes
    GenZIO
  74. final def partialFunction[R <: Random, A, B](gen: Gen[R, B]): Gen[R, PartialFunction[A, B]]

    Permalink

    Constructs a generator of partial functions from A to B given a generator of B values.

    Constructs a generator of partial functions from A to B given a generator of B values. Two A values will be considered to be equal, and thus will be guaranteed to generate the same B value or both be outside the partial functon's domain, if they have the same hashCode.

  75. final def partialFunctionWith[R <: Random, A, B](gen: Gen[R, B])(hash: (A) ⇒ Int): Gen[R, PartialFunction[A, B]]

    Permalink

    Constructs a generator of partial functions from A to B given a generator of B values and a hashing function for A values.

    Constructs a generator of partial functions from A to B given a generator of B values and a hashing function for A values. Two A values will be considered to be equal, and thus will be guaranteed to generate the same B value or both be outside the partial function's domain, if they have have the same hash. This is useful when A does not implement hashCode in a way that is constent with equality.

  76. final val printableChar: Gen[Random, Char]

    Permalink

    A generator of printable characters.

    A generator of printable characters. Shrinks toward '!'.

  77. final def short(min: Short, max: Short): Gen[Random, Short]

    Permalink

    A generator of short values inside the specified range: [start, end].

    A generator of short values inside the specified range: [start, end]. The shrinker will shrink toward the lower end of the range ("smallest").

  78. final def size: Gen[Sized, Int]

    Permalink
  79. final def sized[R <: Sized, A](f: (Int) ⇒ Gen[R, A]): Gen[R, A]

    Permalink

    A sized generator, whose size falls within the specified bounds.

  80. final def small[R <: Random with Sized, A](f: (Int) ⇒ Gen[R, A], min: Int = 0): Gen[R, A]

    Permalink

    A sized generator that uses an exponential distribution of size values.

    A sized generator that uses an exponential distribution of size values. The values generated will be strongly concentrated towards the lower end of the range but a few larger values will still be generated.

  81. final def some[R, A](gen: Gen[R, A]): Gen[R, Option[A]]

    Permalink
  82. final def string[R <: Random with Sized](char: Gen[R, Char]): Gen[R, String]

    Permalink
  83. final def string1[R <: Random with Sized](char: Gen[R, Char]): Gen[R, String]

    Permalink
  84. final def stringN[R <: Random](n: Int)(char: Gen[R, Char]): Gen[R, String]

    Permalink
  85. final def successes[R, A](gen: Gen[R, A]): Gen[R, ZIO[Any, Nothing, A]]

    Permalink

    A generator of successful effects.

    A generator of successful effects.

    Definition Classes
    GenZIO
  86. final def suspend[R, A](gen: ⇒ Gen[R, A]): Gen[R, A]

    Permalink

    Lazily constructs a generator.

    Lazily constructs a generator. This is useful to avoid infinite recursion when creating generators that refer to themselves.

  87. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  88. final val throwable: Gen[Random, Throwable]

    Permalink

    A generator of throwables.

  89. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  90. final def uniform: Gen[Random, Double]

    Permalink

    A generator of uniformly distributed doubles between [0, 1].

    A generator of uniformly distributed doubles between [0, 1]. The shrinker will shrink toward 0.

  91. final val unit: Gen[Any, Unit]

    Permalink

    A constant generator of the unit value.

  92. final def vectorOf[R <: Random with Sized, A](g: Gen[R, A]): Gen[R, Vector[A]]

    Permalink
  93. final def vectorOf1[R <: Random with Sized, A](g: Gen[R, A]): Gen[R, Vector[A]]

    Permalink
  94. final def vectorOfN[R <: Random, A](n: Int)(g: Gen[R, A]): Gen[R, Vector[A]]

    Permalink
  95. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  96. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  97. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  98. final def weighted[R <: Random, A](gs: (Gen[R, A], Double)*): Gen[R, A]

    Permalink

Inherited from Serializable

Inherited from Serializable

Inherited from TimeVariants

Inherited from FunctionVariants

Inherited from GenZIO

Inherited from AnyRef

Inherited from Any

Ungrouped