Object/Class

zio.test

Assertion

Related Docs: class Assertion | package test

Permalink

object Assertion

Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Assertion
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. sealed trait Render extends AnyRef

    Permalink

    Render captures both the name of an assertion as well as the parameters to the assertion combinator for pretty-printing.

  2. sealed trait RenderParam extends AnyRef

    Permalink

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. object Render

    Permalink
  5. object RenderParam

    Permalink
  6. final val anything: Assertion[Any]

    Permalink

    Makes a new assertion that always succeeds.

  7. final def approximatelyEquals[A](reference: A, tolerance: A)(implicit arg0: Numeric[A]): Assertion[A]

    Permalink

    Makes a new assertion that requires a given numeric value to match a value with some tolerance.

  8. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  9. final def assertion[A](name: String)(params: RenderParam*)(run: (⇒ A) ⇒ Boolean): Assertion[A]

    Permalink

    Makes a new Assertion from a pretty-printing and a function.

  10. final def assertionDirect[A](name: String)(params: RenderParam*)(run: (⇒ A) ⇒ AssertResult): Assertion[A]

    Permalink

    Makes a new Assertion from a pretty-printing and a function.

  11. final def assertionRec[A, B](name: String)(params: RenderParam*)(assertion: Assertion[B])(get: (⇒ A) ⇒ Option[B], orElse: (AssertionValue) ⇒ AssertResult = BoolAlgebra.failure): Assertion[A]

    Permalink

    Makes a new Assertion[A] from a pretty-printing, a function (=> A) => Option[B], and an Assertion[B].

    Makes a new Assertion[A] from a pretty-printing, a function (=> A) => Option[B], and an Assertion[B]. If the result of applying the function to a given value is Some[B], the Assertion[B] will be applied to the resulting value to determine if the assertion is satisfied. The result of the Assertion[B] and any assertions it is composed from will be recursively embedded in the assert result. If the result of the function is None the orElse parameter will be used to determine whether the assertion is satisfied.

  12. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  13. final def contains[A](element: A): Assertion[Iterable[A]]

    Permalink

    Makes a new assertion that requires an iterable contain the specified element.

  14. final def containsCause[E](cause: Cause[E]): Assertion[Cause[E]]

    Permalink

    Makes a new assertion that requires a Cause contain the specified cause.

  15. final def containsString(element: String): Assertion[String]

    Permalink

    Makes a new assertion that requires a substring to be present.

  16. final def dies(assertion: Assertion[Throwable]): Assertion[Exit[Any, Any]]

    Permalink

    Makes a new assertion that requires an exit value to die.

  17. final def endsWith(suffix: String): Assertion[String]

    Permalink

    Makes a new assertion that requires a given string to end with the specified suffix.

  18. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  19. final def equalTo(expected: Any): Assertion[Any]

    Permalink

    Makes a new assertion that requires a value equal the specified value.

  20. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  21. final def equalsIgnoreCase(other: String): Assertion[String]

    Permalink

    Makes a new assertion that requires a given string to equal another ignoring case

  22. final def exists[A](assertion: Assertion[A]): Assertion[Iterable[A]]

    Permalink

    Makes a new assertion that requires an iterable contain one element satisfying the given assertion.

  23. final def fails[E](assertion: Assertion[E]): Assertion[Exit[E, Any]]

    Permalink

    Makes a new assertion that requires an exit value to fail.

  24. final def failsCause[E](assertion: Assertion[Cause[E]]): Assertion[Exit[E, Any]]

    Permalink

    Makes a new assertion that requires an exit value to fail with a cause that meets the specified assertion.

  25. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  26. final def forall[A](assertion: Assertion[A]): Assertion[Iterable[A]]

    Permalink

    Makes a new assertion that requires an iterable contain only elements satisfying the given assertion.

  27. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  28. final def hasAt[A](pos: Int)(assertion: Assertion[A]): Assertion[Seq[A]]

    Permalink

    Makes a new assertion that requires a sequence to contain an element satisfying the given assertion on the given position

  29. final def hasField[A, B](name: String, proj: (A) ⇒ B, assertion: Assertion[B]): Assertion[A]

    Permalink

    Makes a new assertion that focuses in on a field in a case class.

    Makes a new assertion that focuses in on a field in a case class.

    hasField("age", _.age, within(0, 10))
  30. final def hasFirst[A](assertion: Assertion[A]): Assertion[Iterable[A]]

    Permalink

    Makes a new assertion that requires an iterable to contain the first element satisfying the given assertion

  31. final def hasLast[A](assertion: Assertion[A]): Assertion[Iterable[A]]

    Permalink

    Makes a new assertion that requires an iterable to contain the last element satisfying the given assertion

  32. final def hasMessage(message: String): Assertion[Throwable]

    Permalink

    Makes a new assertion that requires an exception to have a certain message.

  33. final def hasSameElements[A](other: Iterable[A]): Assertion[Iterable[A]]

    Permalink

    Makes a new assertion that requires an Iterable to have the same elements as the specified Iterable, though not necessarily in the same order

  34. final def hasSize[A](assertion: Assertion[Int]): Assertion[Iterable[A]]

    Permalink

    Makes a new assertion that requires the size of an iterable be satisfied by the specified assertion.

  35. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  36. final def isCase[Sum, Proj](termName: String, term: (Sum) ⇒ Option[Proj], assertion: Assertion[Proj]): Assertion[Sum]

    Permalink

    Makes a new assertion that requires the sum type be a specified term.

    Makes a new assertion that requires the sum type be a specified term.

    isCase("Some", Some.unapply, anything)
  37. final val isEmpty: Assertion[Iterable[Any]]

    Permalink

    Makes a new assertion that requires an Iterable to be empty.

  38. final val isEmptyString: Assertion[String]

    Permalink

    Makes a new assertion that requires a given string to be empty.

  39. final def isFalse: Assertion[Boolean]

    Permalink

    Makes a new assertion that requires a value be true.

  40. final def isGreaterThan[A](reference: A)(implicit arg0: Numeric[A]): Assertion[A]

    Permalink

    Makes a new assertion that requires the numeric value be greater than the specified reference value.

  41. final def isGreaterThanEqualTo[A](reference: A)(implicit arg0: Numeric[A]): Assertion[A]

    Permalink

    Makes a new assertion that requires the numeric value be greater than or equal to the specified reference value.

  42. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  43. final def isInterrupted: Assertion[Exit[Any, Any]]

    Permalink

    Makes a new assertion that requires an exit value to be interrupted.

  44. final def isLeft[A](assertion: Assertion[A]): Assertion[Either[A, Any]]

    Permalink

    Makes a new assertion that requires a Left value satisfying a specified assertion.

  45. final def isLessThan[A](reference: A)(implicit arg0: Numeric[A]): Assertion[A]

    Permalink

    Makes a new assertion that requires the numeric value be less than the specified reference value.

  46. final def isLessThanEqualTo[A](reference: A)(implicit arg0: Numeric[A]): Assertion[A]

    Permalink

    Makes a new assertion that requires the numeric value be less than or equal to the specified reference value.

  47. final val isNonEmpty: Assertion[Iterable[Any]]

    Permalink

    Makes a new assertion that requires an Iterable to be non empty.

  48. final val isNonEmptyString: Assertion[String]

    Permalink

    Makes a new assertion that requires a given string to be non empty

  49. final val isNone: Assertion[Option[Any]]

    Permalink

    Makes a new assertion that requires a None value.

  50. final def isRight[A](assertion: Assertion[A]): Assertion[Either[Any, A]]

    Permalink

    Makes a new assertion that requires a Right value satisfying a specified assertion.

  51. final def isSome[A](assertion: Assertion[A]): Assertion[Option[A]]

    Permalink

    Makes a new assertion that requires a Some value satisfying the specified assertion.

  52. final def isSubtype[A](assertion: Assertion[A])(implicit C: ClassTag[A]): Assertion[Any]

    Permalink

    Makes an assertion that requires a value have the specified type.

    Makes an assertion that requires a value have the specified type.

    Example:

    assert(Duration.fromNanos(1), isSubtype[Duration.Finite](Assertion.anything))
  53. final def isTrue: Assertion[Boolean]

    Permalink

    Makes a new assertion that requires a value be true.

  54. final def isUnit: Assertion[Any]

    Permalink

    Makes a new assertion that requires the value be unit.

  55. final def isWithin[A](min: A, max: A)(implicit arg0: Numeric[A]): Assertion[A]

    Permalink

    Returns a new assertion that requires a numeric value to fall within a specified min and max (inclusive).

  56. final def matchesRegex(regex: String): Assertion[String]

    Permalink

    Makes a new assertion that requires a given string to match the specified regular expression.

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

    Permalink
    Definition Classes
    AnyRef
  58. final def not[A](assertion: Assertion[A]): Assertion[A]

    Permalink

    Makes a new assertion that negates the specified assertion.

  59. final val nothing: Assertion[Any]

    Permalink

    Makes a new assertion that always fails.

  60. final def notify(): Unit

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

    Permalink
    Definition Classes
    AnyRef
  62. final def startsWith(prefix: String): Assertion[String]

    Permalink

    Makes a new assertion that requires a given string to start with a specified prefix

  63. final def succeeds[A](assertion: Assertion[A]): Assertion[Exit[Any, A]]

    Permalink

    Makes a new assertion that requires an exit value to succeed.

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

    Permalink
    Definition Classes
    AnyRef
  65. final def throws[A](assertion: Assertion[Throwable]): Assertion[A]

    Permalink

    Returns a new assertion that requires the expression to throw.

  66. final def throwsA[E](implicit arg0: ClassTag[E]): Assertion[Any]

    Permalink

    Returns a new assertion that requires the expression to throw an instance of given type (or its subtype).

  67. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  68. final def wait(): Unit

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

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

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from AnyRef

Inherited from Any

Ungrouped