Packages

  • package root
    Definition Classes
    root
  • package zio
    Definition Classes
    root
  • package test

    _ZIO Test_ is a featherweight testing library for effectful programs.

    _ZIO Test_ is a featherweight testing library for effectful programs.

    The library imagines every spec as an ordinary immutable value, providing tremendous potential for composition. Thanks to tight integration with ZIO, specs can use resources (including those requiring disposal), have well- defined linear and parallel semantics, and can benefit from a host of ZIO combinators.

    import zio.test._
    import zio.test.environment.Live
    import zio.Clock.nanoTime
    import Assertion.isGreaterThan
    
    object MyTest extends DefaultRunnableSpec {
      def spec = suite("clock")(
        test("time is non-zero") {
          assertM(Live.live(nanoTime))(isGreaterThan(0))
        }
      )
    }
    Definition Classes
    zio
  • package diff
    Definition Classes
    test
  • package environment

    The environment package contains testable versions of all the standard ZIO environment types through the TestClock, TestConsole, TestSystem, and TestRandom modules.

    The environment package contains testable versions of all the standard ZIO environment types through the TestClock, TestConsole, TestSystem, and TestRandom modules. See the documentation on the individual modules for more detail about using each of them.

    If you are using ZIO Test and extending RunnableSpec a TestEnvironment containing all of them will be automatically provided to each of your tests. Otherwise, the easiest way to use the test implementations in ZIO Test is by providing the TestEnvironment to your program.

    import zio.test.environment._
    
    myProgram.provideLayer(testEnvironment)

    Then all environmental effects, such as printing to the console or generating random numbers, will be implemented by the TestEnvironment and will be fully testable. When you do need to access the "live" environment, for example to print debugging information to the console, just use the live combinator along with the effect as your normally would.

    If you are only interested in one of the test implementations for your application, you can also access them a la carte through the make method on each module. Each test module requires some data on initialization. Default data is included for each as DefaultData.

    import zio.test.environment._
    
    myProgram.provideM(TestConsole.make(TestConsole.DefaultData))

    Finally, you can create a Test object that implements the test interface directly using the makeTest method. This can be useful when you want to access some testing functionality without using the environment type.

    import zio.test.environment._
    
    for {
      testRandom <- TestRandom.makeTest(TestRandom.DefaultData)
      n          <- testRandom.nextInt
    } yield n

    This can also be useful when you are creating a more complex environment to provide the implementation for test services that you mix in.

    Definition Classes
    test
  • package internal
    Definition Classes
    test
  • package laws

    The laws package provides functionality for describing laws as values.

    The laws package provides functionality for describing laws as values. The fundamental abstraction is a set of ZLaws[Caps, R]. These laws model the laws that instances having a capability of type Caps are expected to satisfy. A capability Caps[_] is an abstraction describing some functionality that is common across different data types and obeys certain laws. For example, we can model the capability of two values of a type being compared for equality as follows:

    trait Equal[-A] {
      def equal(a1: A, a2: A): Boolean
    }

    Definitions of equality are expected to obey certain laws:

    1. Reflexivity - a1 === a1 2. Symmetry - a1 === a2 ==> a2 === a1 3. Transitivity - (a1 === a2) && (a2 === a3) ==> (a1 === a3)

    These laws define what the capabilities mean and ensure that it is safe to abstract across different instances with the same capability.

    Using ZIO Test, we can represent these laws as values. To do so, we define each law using one of the ZLaws constructors. For example:

    val transitivityLaw = ZLaws.Laws3[Equal]("transitivityLaw") {
      def apply[A: Equal](a1: A, a2: A, a3: A): TestResult =
        ???
    }

    We can then combine laws using the + operator:

    val reflexivityLaw: = ???
    val symmetryLaw:    = ???
    
    val equalLaws = reflexivityLaw + symmetryLaw + transitivityLaw

    Laws have a run method that takes a generator of values of type A and checks that those values satisfy the laws. In addition, objects can extend ZLawful to provide an even more convenient syntax for users to check that instances satisfy certain laws.

    object Equal extends Lawful[Equal]
    
    object Hash extends Lawful[Hash]
    
    object Ord extends Lawful[Ord]
    
    checkAllLaws(Equal + Hash + Ord)(Gen.anyInt)

    Note that capabilities compose seamlessly because of contravariance. We can combine laws describing different capabilities to construct a set of laws requiring that instances having all of the capabilities satisfy each of the laws.

    Definition Classes
    test
  • package mock
    Definition Classes
    test
  • package poly
    Definition Classes
    test
  • package render
    Definition Classes
    test
  • AbstractRunnableSpec
  • Annotations
  • Arrow
  • Assert
  • Assertion
  • AssertionData
  • AssertionM
  • AssertionMData
  • AssertionResult
  • AssertionValue
  • AssertionVariants
  • BoolAlgebra
  • BoolAlgebraM
  • CheckVariants
  • CompileVariants
  • DefaultMutableRunnableSpec
  • DefaultRunnableSpec
  • DefaultTestReporter
  • Eql
  • ErrorMessage
  • ExecutedSpec
  • FailureCase
  • FailureDetails
  • FunctionVariants
  • Gen
  • GenFailureDetails
  • GenZIO
  • MutableRunnableSpec
  • PrettyPrintVersionSpecific
  • Result
  • RunnableSpec
  • Sample
  • Sized
  • SmartAssertMacros
  • SourceLocation
  • SourceLocationVariants
  • Spec
  • SpecLayerMacros
  • Summary
  • SummaryBuilder
  • TestAnnotation
  • TestAnnotationMap
  • TestAnnotationRenderer
  • TestArgs
  • TestAspect
  • TestConfig
  • TestConstructor
  • TestConstructorLowPriority1
  • TestConstructorLowPriority2
  • TestConstructorLowPriority3
  • TestExecutor
  • TestFailure
  • TestLogger
  • TestPlatform
  • TestReporter
  • TestResult
  • TestRunner
  • TestSuccess
  • TestTimeoutException
  • TestVersion
  • TimeVariants
  • TimeoutVariants
  • Trace
  • ZTest

object Gen extends GenZIO with FunctionVariants with TimeVariants with Serializable

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

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. val alphaChar: Gen[Has[Random], Char]

    A generator of alpha characters.

  5. val alphaNumericChar: Gen[Has[Random], Char]

    A generator of alphanumeric characters.

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

  6. val alphaNumericString: Gen[Has[Random] with Has[Sized], String]

    A generator of alphanumeric strings.

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

  7. def alphaNumericStringBounded(min: Int, max: Int): Gen[Has[Random] with Has[Sized], String]

    A generator of alphanumeric strings whose size falls within the specified bounds.

  8. def anyASCIIChar: Gen[Has[Random], Char]

    A generator of US-ASCII characters.

    A generator of US-ASCII characters. Shrinks toward '0'.

  9. def anyASCIIString: Gen[Has[Random] with Has[Sized], String]

    A generator US-ASCII strings.

    A generator US-ASCII strings. Shrinks towards the empty string.

  10. val anyByte: Gen[Has[Random], Byte]

    A generator of bytes.

    A generator of bytes. Shrinks toward '0'.

  11. val anyChar: Gen[Has[Random], Char]

    A generator of characters.

    A generator of characters. Shrinks toward '0'.

  12. final def anyDayOfWeek: Gen[Has[Random], DayOfWeek]

    A generator of java.time.DayOfWeek values.

    A generator of java.time.DayOfWeek values. Shrinks toward DayOfWeek.MONDAY.

    Definition Classes
    TimeVariants
  13. val anyDouble: Gen[Has[Random], Double]

    A generator of doubles.

    A generator of doubles. Shrinks toward '0'.

  14. final def anyFiniteDuration: Gen[Has[Random], zio.Duration]

    A generator of finite zio.duration.Duration values.

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

    Definition Classes
    TimeVariants
  15. val anyFloat: Gen[Has[Random], Float]

    A generator of floats.

    A generator of floats. Shrinks toward '0'.

  16. val anyHexChar: Gen[Has[Random], Char]

    A generator of hex chars(0-9,a-f,A-F).

  17. final def anyInstant: Gen[Has[Random], Instant]

    A generator of java.time.Instant values.

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

    Definition Classes
    TimeVariants
  18. val anyInt: Gen[Has[Random], Int]

    A generator of integers.

    A generator of integers. Shrinks toward '0'.

  19. final def anyLocalDate: Gen[Has[Random], LocalDate]

    A generator of java.time.LocalDate values.

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

    Definition Classes
    TimeVariants
  20. final def anyLocalDateTime: Gen[Has[Random], LocalDateTime]

    A generator of java.time.LocalDateTime values.

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

    Definition Classes
    TimeVariants
  21. final def anyLocalTime: Gen[Has[Random], LocalTime]

    A generator of java.time.LocalTime values.

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

    Definition Classes
    TimeVariants
  22. val anyLong: Gen[Has[Random], Long]

    A generator of longs.

    A generator of longs. Shrinks toward '0'.

  23. val anyLowerHexChar: Gen[Has[Random], Char]

    A generator of lower hex chars(0-9, a-f).

  24. final def anyMonth: Gen[Has[Random], Month]

    A generator of java.time.Month values.

    A generator of java.time.Month values. Shrinks toward Month.JANUARY.

    Definition Classes
    TimeVariants
  25. final def anyMonthDay: Gen[Has[Random], MonthDay]

    A generator of java.time.MonthDay values.

    A generator of java.time.MonthDay values. Shrinks toward MonthDay.of(Month.JANUARY, 1).

    Definition Classes
    TimeVariants
  26. final def anyOffsetDateTime: Gen[Has[Random], OffsetDateTime]

    A generator of java.time.OffsetDateTime values.

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

    Definition Classes
    TimeVariants
  27. final def anyOffsetTime: Gen[Has[Random], OffsetTime]

    A generator of java.time.OffsetTime values.

    A generator of java.time.OffsetTime values. Shrinks torward OffsetTime.MIN.

    Definition Classes
    TimeVariants
  28. final def anyPeriod: Gen[Has[Random], Period]

    A generator of java.time.Period values.

    A generator of java.time.Period values. Shrinks toward Period.ZERO.

    Definition Classes
    TimeVariants
  29. val anyShort: Gen[Has[Random], Short]

    A generator of shorts.

    A generator of shorts. Shrinks toward '0'.

  30. def anyString: Gen[Has[Random] with Has[Sized], String]

    A generator of strings.

    A generator of strings. Shrinks towards the empty string.

  31. val anyUUID: Gen[Has[Random], UUID]

    A generator of universally unique identifiers.

    A generator of universally unique identifiers. The returned generator will not have any shrinking.

  32. val anyUnicodeChar: Gen[Has[Random], Char]

    A generator of Unicode characters.

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

  33. val anyUpperHexChar: Gen[Has[Random], Char]

    A generator of upper hex chars(0-9, A-F).

  34. final def anyYear: Gen[Has[Random], Year]

    A generator of java.time.Year values.

    A generator of java.time.Year values. Shrinks toward Year.of(Year.MIN_VALUE).

    Definition Classes
    TimeVariants
  35. final def anyYearMonth: Gen[Has[Random], YearMonth]

    A generator of java.time.YearMonth values.

    A generator of java.time.YearMonth values. Shrinks toward YearMonth.of(Year.MIN_VALUE, Month.JANUARY).

    Definition Classes
    TimeVariants
  36. final def anyZoneId: Gen[Has[Random], ZoneId]

    A generator of java.time.ZoneId values.

    A generator of java.time.ZoneId values. Doesn't have any shrinking.

    Definition Classes
    TimeVariants
    Annotations
    @silent("JavaConverters")
  37. final def anyZoneOffset: Gen[Has[Random], ZoneOffset]

    A generator of java.time.ZoneOffset values.

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

    Definition Classes
    TimeVariants
  38. final def anyZonedDateTime: Gen[Has[Random], ZonedDateTime]

    A generator of java.time.ZonedDateTime values.

    A generator of java.time.ZonedDateTime values. Shrinks toward ZoneDateTime.of(LocalDateTime.MIN, zoneId).

    Definition Classes
    TimeVariants
  39. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  40. def bigDecimal(min: BigDecimal, max: BigDecimal): Gen[Has[Random], BigDecimal]

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

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

    The values generated will have a precision equal to the precision of the difference between max and min.

  41. def bigInt(min: BigInt, max: BigInt): Gen[Has[Random], BigInt]

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

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

  42. val boolean: Gen[Has[Random], Boolean]

    A generator of booleans.

    A generator of booleans. Shrinks toward 'false'.

  43. def bounded[R <: Has[Random], A](min: Int, max: Int)(f: (Int) => Gen[R, A]): Gen[R, A]

    A generator whose size falls within the specified bounds.

  44. def byte(min: Byte, max: Byte): Gen[Has[Random], Byte]

    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").

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

    A generator of Cause values

    A generator of Cause values

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

    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
  47. final def chainedN[R <: Has[Random], Env, E, A](n: Int)(zio: Gen[R, ZIO[Env, E, A]]): Gen[R, ZIO[Env, E, A]]

    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
  48. def char(min: Char, max: Char): Gen[Has[Random], Char]

    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").

  49. def chunkOf[R <: Has[Random] with Has[Sized], A](g: Gen[R, A]): Gen[R, Chunk[A]]

    A sized generator of chunks.

  50. def chunkOf1[R <: Has[Random] with Has[Sized], A](g: Gen[R, A]): Gen[R, NonEmptyChunk[A]]

    A sized generator of non-empty chunks.

  51. def chunkOfBounded[R <: Has[Random], A](min: Int, max: Int)(g: Gen[R, A]): Gen[R, Chunk[A]]

    A generator of chunks whose size falls within the specified bounds.

  52. def chunkOfN[R <: Has[Random], A](n: Int)(g: Gen[R, A]): Gen[R, Chunk[A]]

    A generator of chunks of the specified size.

  53. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native()
  54. def concatAll[R, A](gens: => Iterable[Gen[R, A]]): Gen[R, A]

    Combines the specified deterministic generators to return a new deterministic generator that generates all of the values generated by the specified generators.

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

    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
  56. def const[A](a: => A): Gen[Any, A]

    A constant generator of the specified value.

  57. def constSample[R, A](sample: => Sample[R, A]): Gen[R, A]

    A constant generator of the specified sample.

  58. def crossAll[R, A](gens: Iterable[Gen[R, A]]): Gen[R, List[A]]

    Composes the specified generators to create a cartesian product of elements with the specified function.

  59. final def died[R](gen: Gen[R, Throwable]): Gen[R, UIO[Nothing]]

    A generator of effects that have died with a Throwable.

    A generator of effects that have died with a Throwable.

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

    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").

  61. def either[R <: Has[Random], A, B](left: Gen[R, A], right: Gen[R, B]): Gen[R, Either[A, B]]
  62. def elements[A](as: A*): Gen[Has[Random], A]
  63. val empty: Gen[Any, Nothing]
  64. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  65. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  66. val exponential: Gen[Has[Random], Double]

    A generator of exponentially distributed doubles with mean 1.

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

  67. final def failures[R, E](gen: Gen[R, E]): Gen[R, IO[E, Nothing]]

    A generator of effects that have failed with an error.

    A generator of effects that have failed with an error.

    Definition Classes
    GenZIO
  68. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable])
  69. final def finiteDuration(min: zio.Duration, max: zio.Duration): Gen[Has[Random], zio.Duration]

    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
  70. def fromIterable[R, A](as: Iterable[A], shrinker: (A) => ZStream[R, Nothing, A] = defaultShrinker): Gen[R, A]

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

  71. final def fromRandom[A](f: (Random) => UIO[A]): Gen[Has[Random], A]

    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.

  72. final def fromRandomSample[R <: Has[Random], A](f: (Random) => UIO[Sample[R, A]]): Gen[R, A]

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

  73. def fromZIO[R, A](effect: URIO[R, A]): Gen[R, A]

    Constructs a generator from an effect that constructs a value.

  74. def fromZIOSample[R, A](effect: ZIO[R, Nothing, Sample[R, A]]): Gen[R, A]

    Constructs a generator from an effect that constructs a sample.

  75. final def function[R, A, B](gen: Gen[R, B]): Gen[R, (A) => B]

    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
  76. final def function2[R, A, B, C](gen: Gen[R, C]): Gen[R, (A, B) => C]

    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
  77. final def function3[R, A, B, C, D](gen: Gen[R, D]): Gen[R, (A, B, C) => D]

    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
  78. final def function4[R, A, B, C, D, E](gen: Gen[R, E]): Gen[R, (A, B, C, D) => E]

    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
  79. final def functionWith[R, A, B](gen: Gen[R, B])(hash: (A) => Int): Gen[R, (A) => B]

    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 consistent with equality.

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

    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
  81. final def functionWith3[R, A, B, C, D](gen: Gen[R, D])(hash: (A, B, C) => Int): Gen[R, (A, B, C) => D]

    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
  82. 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]

    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
  83. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  84. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  85. final def instant(min: Instant, max: Instant): Gen[Has[Random], Instant]

    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
  86. def int(min: Int, max: Int): Gen[Has[Random], Int]

    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").

  87. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  88. val iso_8859_1: Gen[Has[Random] with Has[Sized], String]

    A generator of strings that can be encoded in the ISO-8859-1 character set.

  89. def large[R <: Has[Random] with Has[Sized], A](f: (Int) => Gen[R, A], min: Int = 0): Gen[R, A]

    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.

  90. def listOf[R <: Has[Random] with Has[Sized], A](g: Gen[R, A]): Gen[R, List[A]]
  91. def listOf1[R <: Has[Random] with Has[Sized], A](g: Gen[R, A]): Gen[R, ::[A]]
  92. def listOfBounded[R <: Has[Random], A](min: Int, max: Int)(g: Gen[R, A]): Gen[R, List[A]]

    A generator of lists whose size falls within the specified bounds.

  93. def listOfN[R <: Has[Random], A](n: Int)(g: Gen[R, A]): Gen[R, List[A]]
  94. final def localDateTime(min: LocalDateTime, max: LocalDateTime): Gen[Has[Random], LocalDateTime]

    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
  95. def long(min: Long, max: Long): Gen[Has[Random], Long]

    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").

  96. def mapOf[R <: Has[Random] with Has[Sized], A, B](key: Gen[R, A], value: Gen[R, B]): Gen[R, Map[A, B]]

    A sized generator of maps.

  97. def mapOf1[R <: Has[Random] with Has[Sized], A, B](key: Gen[R, A], value: Gen[R, B]): Gen[R, Map[A, B]]

    A sized generator of non-empty maps.

  98. def mapOfBounded[R <: Has[Random], A, B](min: Int, max: Int)(key: Gen[R, A], value: Gen[R, B]): Gen[R, Map[A, B]]

    A generator of maps whose size falls within the specified bounds.

  99. def mapOfN[R <: Has[Random], A, B](n: Int)(key: Gen[R, A], value: Gen[R, B]): Gen[R, Map[A, B]]

    A generator of maps of the specified size.

  100. def medium[R <: Has[Random] with Has[Sized], A](f: (Int) => Gen[R, A], min: Int = 0): Gen[R, A]

    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.

  101. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  102. val none: Gen[Any, Option[Nothing]]

    A constant generator of the empty value.

  103. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  104. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  105. val numericChar: Gen[Has[Random], Char]

    A generator of numeric characters.

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

  106. final def offsetDateTime(min: OffsetDateTime, max: OffsetDateTime): Gen[Has[Random], OffsetDateTime]

    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
  107. def oneOf[R <: Has[Random], A](as: Gen[R, A]*): Gen[R, A]
  108. def option[R <: Has[Random], A](gen: Gen[R, A]): Gen[R, Option[A]]

    A generator of optional values.

    A generator of optional values. Shrinks toward None.

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

    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
  110. def partialFunction[R <: Has[Random], A, B](gen: Gen[R, B]): Gen[R, PartialFunction[A, B]]

    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 function's domain, if they have the same hashCode.

  111. def partialFunctionWith[R <: Has[Random], A, B](gen: Gen[R, B])(hash: (A) => Int): Gen[R, PartialFunction[A, B]]

    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 consistent with equality.

  112. val printableChar: Gen[Has[Random], Char]

    A generator of printable characters.

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

  113. def setOf[R <: Has[Random] with Has[Sized], A](gen: Gen[R, A]): Gen[R, Set[A]]

    A sized generator of sets.

  114. def setOf1[R <: Has[Random] with Has[Sized], A](gen: Gen[R, A]): Gen[R, Set[A]]

    A sized generator of non-empty sets.

  115. def setOfBounded[R <: Has[Random], A](min: Int, max: Int)(g: Gen[R, A]): Gen[R, Set[A]]

    A generator of sets whose size falls within the specified bounds.

  116. def setOfN[R <: Has[Random], A](n: Int)(gen: Gen[R, A]): Gen[R, Set[A]]

    A generator of sets of the specified size.

  117. def short(min: Short, max: Short): Gen[Has[Random], Short]

    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").

  118. def size: Gen[Has[Sized], Int]
  119. def sized[R <: Has[Sized], A](f: (Int) => Gen[R, A]): Gen[R, A]

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

  120. def small[R <: Has[Random] with Has[Sized], A](f: (Int) => Gen[R, A], min: Int = 0): Gen[R, A]

    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.

  121. def some[R, A](gen: Gen[R, A]): Gen[R, Option[A]]
  122. def string[R <: Has[Random] with Has[Sized]](char: Gen[R, Char]): Gen[R, String]
  123. def string1[R <: Has[Random] with Has[Sized]](char: Gen[R, Char]): Gen[R, String]
  124. def stringBounded[R <: Has[Random]](min: Int, max: Int)(g: Gen[R, Char]): Gen[R, String]

    A generator of strings whose size falls within the specified bounds.

  125. def stringN[R <: Has[Random]](n: Int)(char: Gen[R, Char]): Gen[R, String]
  126. final def successes[R, A](gen: Gen[R, A]): Gen[R, UIO[A]]

    A generator of successful effects.

    A generator of successful effects.

    Definition Classes
    GenZIO
  127. def suspend[R, A](gen: => Gen[R, A]): Gen[R, A]

    Lazily constructs a generator.

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

  128. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  129. val throwable: Gen[Has[Random], Throwable]

    A generator of throwables.

  130. def toString(): String
    Definition Classes
    AnyRef → Any
  131. def unfoldGen[R <: Has[Random] with Has[Sized], S, A](s: S)(f: (S) => Gen[R, (S, A)]): Gen[R, List[A]]

    A sized generator of collections, where each collection is generated by repeatedly applying a function to an initial state.

  132. def unfoldGenN[R, S, A](n: Int)(s: S)(f: (S) => Gen[R, (S, A)]): Gen[R, List[A]]

    A generator of collections of up to the specified size, where each collection is generated by repeatedly applying a function to an initial state.

  133. def uniform: Gen[Has[Random], Double]

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

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

  134. val unit: Gen[Any, Unit]

    A constant generator of the unit value.

  135. def vectorOf[R <: Has[Random] with Has[Sized], A](g: Gen[R, A]): Gen[R, Vector[A]]
  136. def vectorOf1[R <: Has[Random] with Has[Sized], A](g: Gen[R, A]): Gen[R, Vector[A]]
  137. def vectorOfBounded[R <: Has[Random], A](min: Int, max: Int)(g: Gen[R, A]): Gen[R, Vector[A]]

    A generator of vectors whose size falls within the specified bounds.

  138. def vectorOfN[R <: Has[Random], A](n: Int)(g: Gen[R, A]): Gen[R, Vector[A]]
  139. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  140. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  141. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  142. def weighted[R <: Has[Random], A](gs: (Gen[R, A], Double)*): Gen[R, A]

    A generator which chooses one of the given generators according to their weights.

    A generator which chooses one of the given generators according to their weights. For example, the following generator will generate 90% true and 10% false values.

    val trueFalse = Gen.weighted((Gen.const(true), 9), (Gen.const(false), 1))
  143. val whitespaceChars: Gen[Has[Random], Char]

    A generator of whitespace characters.

  144. def zipAll[R, A](gens: Iterable[Gen[R, A]]): Gen[R, List[A]]

    Zips the specified generators together pairwise.

    Zips the specified generators together pairwise. The new generator will generate elements as long as any generator is generating elements, running the other generators multiple times if necessary.

Deprecated Value Members

  1. def crossN[R, A, B, C, D, F](gen1: Gen[R, A], gen2: Gen[R, B], gen3: Gen[R, C], gen4: Gen[R, D])(f: (A, B, C, D) => F): Gen[R, F]

    Composes the specified generators to create a cartesian product of elements with the specified function.

    Composes the specified generators to create a cartesian product of elements with the specified function.

    Annotations
    @deprecated
    Deprecated

    (Since version 2.0.0) use cross

  2. def crossN[R, A, B, C, D](gen1: Gen[R, A], gen2: Gen[R, B], gen3: Gen[R, C])(f: (A, B, C) => D): Gen[R, D]

    Composes the specified generators to create a cartesian product of elements with the specified function.

    Composes the specified generators to create a cartesian product of elements with the specified function.

    Annotations
    @deprecated
    Deprecated

    (Since version 2.0.0) use cross

  3. def crossN[R, A, B, C](gen1: Gen[R, A], gen2: Gen[R, B])(f: (A, B) => C): Gen[R, C]

    Composes the specified generators to create a cartesian product of elements with the specified function.

    Composes the specified generators to create a cartesian product of elements with the specified function.

    Annotations
    @deprecated
    Deprecated

    (Since version 2.0.0) use cross

  4. def fromEffect[R, A](effect: URIO[R, A]): Gen[R, A]

    Constructs a generator from an effect that constructs a value.

    Constructs a generator from an effect that constructs a value.

    Annotations
    @deprecated
    Deprecated

    (Since version 2.0.0) use fromZIO

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

    Constructs a generator from an effect that constructs a sample.

    Constructs a generator from an effect that constructs a sample.

    Annotations
    @deprecated
    Deprecated

    (Since version 2.0.0) use fromZIOSample

  6. def zipN[R, A, B, C, D, F, G, H, I, J, K, L](gen1: Gen[R, A], gen2: Gen[R, B], gen3: Gen[R, C], gen4: Gen[R, D], gen5: Gen[R, F], gen6: Gen[R, G], gen7: Gen[R, H], gen8: Gen[R, I], gen9: Gen[R, J], gen10: Gen[R, K])(fn: (A, B, C, D, F, G, H, I, J, K) => L): Gen[R, L]

    Zips the specified generators together pairwise.

    Zips the specified generators together pairwise. The new generator will generate elements as long as any generator is generating elements, running the other generators multiple times if necessary.

    Annotations
    @deprecated
    Deprecated

    (Since version 2.0.0) use zip

  7. def zipN[R, A, B, C, D, F, G, H, I, J, K](gen1: Gen[R, A], gen2: Gen[R, B], gen3: Gen[R, C], gen4: Gen[R, D], gen5: Gen[R, F], gen6: Gen[R, G], gen7: Gen[R, H], gen8: Gen[R, I], gen9: Gen[R, J])(fn: (A, B, C, D, F, G, H, I, J) => K): Gen[R, K]

    Zips the specified generators together pairwise.

    Zips the specified generators together pairwise. The new generator will generate elements as long as any generator is generating elements, running the other generators multiple times if necessary.

    Annotations
    @deprecated
    Deprecated

    (Since version 2.0.0) use zip

  8. def zipN[R, A, B, C, D, F, G, H, I, J](gen1: Gen[R, A], gen2: Gen[R, B], gen3: Gen[R, C], gen4: Gen[R, D], gen5: Gen[R, F], gen6: Gen[R, G], gen7: Gen[R, H], gen8: Gen[R, I])(fn: (A, B, C, D, F, G, H, I) => J): Gen[R, J]

    Zips the specified generators together pairwise.

    Zips the specified generators together pairwise. The new generator will generate elements as long as any generator is generating elements, running the other generators multiple times if necessary.

    Annotations
    @deprecated
    Deprecated

    (Since version 2.0.0) use zip

  9. def zipN[R, A, B, C, D, F, G, H, I](gen1: Gen[R, A], gen2: Gen[R, B], gen3: Gen[R, C], gen4: Gen[R, D], gen5: Gen[R, F], gen6: Gen[R, G], gen7: Gen[R, H])(fn: (A, B, C, D, F, G, H) => I): Gen[R, I]

    Zips the specified generators together pairwise.

    Zips the specified generators together pairwise. The new generator will generate elements as long as any generator is generating elements, running the other generators multiple times if necessary.

    Annotations
    @deprecated
    Deprecated

    (Since version 2.0.0) use zip

  10. def zipN[R, A, B, C, D, F, G, H](gen1: Gen[R, A], gen2: Gen[R, B], gen3: Gen[R, C], gen4: Gen[R, D], gen5: Gen[R, F], gen6: Gen[R, G])(fn: (A, B, C, D, F, G) => H): Gen[R, H]

    Zips the specified generators together pairwise.

    Zips the specified generators together pairwise. The new generator will generate elements as long as any generator is generating elements, running the other generators multiple times if necessary.

    Annotations
    @deprecated
    Deprecated

    (Since version 2.0.0) use zip

  11. def zipN[R, A, B, C, D, F, G](gen1: Gen[R, A], gen2: Gen[R, B], gen3: Gen[R, C], gen4: Gen[R, D], gen5: Gen[R, F])(fn: (A, B, C, D, F) => G): Gen[R, G]

    Zips the specified generators together pairwise.

    Zips the specified generators together pairwise. The new generator will generate elements as long as any generator is generating elements, running the other generators multiple times if necessary.

    Annotations
    @deprecated
    Deprecated

    (Since version 2.0.0) use zip

  12. def zipN[R, A, B, C, D, F](gen1: Gen[R, A], gen2: Gen[R, B], gen3: Gen[R, C], gen4: Gen[R, D])(f: (A, B, C, D) => F): Gen[R, F]

    Zips the specified generators together pairwise.

    Zips the specified generators together pairwise. The new generator will generate elements as long as any generator is generating elements, running the other generators multiple times if necessary.

    Annotations
    @deprecated
    Deprecated

    (Since version 2.0.0) use zip

  13. def zipN[R, A, B, C, D](gen1: Gen[R, A], gen2: Gen[R, B], gen3: Gen[R, C])(f: (A, B, C) => D): Gen[R, D]

    Zips the specified generators together pairwise.

    Zips the specified generators together pairwise. The new generator will generate elements as long as any generator is generating elements, running the other generators multiple times if necessary.

    Annotations
    @deprecated
    Deprecated

    (Since version 2.0.0) use zip

  14. def zipN[R, A, B, C](gen1: Gen[R, A], gen2: Gen[R, B])(f: (A, B) => C): Gen[R, C]

    Zips the specified generators together pairwise.

    Zips the specified generators together pairwise. The new generator will generate elements as long as any generator is generating elements, running the other generators multiple times if necessary.

    Annotations
    @deprecated
    Deprecated

    (Since version 2.0.0) use zip

Inherited from Serializable

Inherited from TimeVariants

Inherited from FunctionVariants

Inherited from GenZIO

Inherited from AnyRef

Inherited from Any

Ungrouped