Packages

package scalatest

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

Type Members

  1. trait AssertCIO extends AnyRef

    scalatest assertion macro for cats.effect.IO

  2. trait AssertIO2[F[+_, +_]] extends AnyRef

    scalatest assertion macro for any izumi.functional.bio.IO2

  3. trait AssertIO3[F[-_, +_, +_]] extends AnyRef

    scalatest assertion macro for any izumi.functional.bio.IO3

  4. trait AssertMonix extends AnyRef

    scalatest assertion macro for monix.eval.Task

  5. trait AssertMonixBIO extends AnyRef

    scalatest assertion macro for monix.bio.IO

  6. trait AssertSync[F[_]] extends AnyRef

    scalatest assertion macro for any cats.effect.Sync

  7. trait AssertZIO extends AnyRef

    scalatest assertion macro for zio.ZIO

  8. abstract class Spec1[F[_]] extends DistageScalatestTestSuiteRunner[F] with DistageAbstractScalatestSpec[F]
  9. abstract class Spec2[F[+_, +_]] extends DistageScalatestTestSuiteRunner[[β$0$]F[Throwable, β$0$]] with DistageAbstractScalatestSpec[[β$1$]F[Throwable, β$1$]]
  10. abstract class Spec3[FR[-_, +_, +_]] extends DistageScalatestTestSuiteRunner[[γ$0$]FR[Any, Throwable, γ$0$]] with DistageAbstractScalatestSpec[[γ$1$]FR[Any, Throwable, γ$1$]]

    Allows summoning objects from DI in tests via ZIO environment intersection types

    Allows summoning objects from DI in tests via ZIO environment intersection types

    trait PetStore[F[_, _]] {
      def purchasePet(name: String, cost: Int): F[Throwable, Boolean]
    }
    
    trait Pets[F[_, _]]
      def myPets: F[Throwable, List[String]]
    }
    
    type PetStoreEnv = Has[PetStore[IO]]
    type PetsEnv = Has[Pets[IO]]
    
    val store = new PetStore[ZIO[PetStoreEnv, _, _]] {
      def purchasePet(name: String, cost: Int): RIO[PetStoreEnv, Boolean] = ZIO.accessM(_.get.purchasePet(name, cost))
    }
    val pets = new Pets[ZIO[PetsEnv, _, _]] {
      def myPets: RIO[PetsEnv, List[String]] = ZIO.accessM(_.get.myPets)
    }
    
    "test purchase pets" in {
      for {
        _    <- store.purchasePet("Zab", 213)
        pets <- pets.myPets
        _    <- assertIO(pets.contains("Zab"))
      } yield ()
      // : ZIO[PetStoreEnv with PetsEnv, Throwable, Unit]
    }

    Lambda parameters and environment may both be used at the same time to define dependencies:

    "test purchase pets" in {
      (store: PetStore[IO]) =>
        for {
          _    <- store.purchasePet("Zab", 213)
          pets <- pets.myPets
          _    <- assertIO(pets.contains("Zab"))
        } yield ()
        // : ZIO[PetsEnv, Throwable, Unit]
    }
  11. abstract class SpecIdentity extends Spec1[Identity]
  12. abstract class SpecWiring[AppMain <: CheckableApp, Cfg <: Any] extends Spec1[scalatest.SpecWiring.AppMain.AppEffectType] with WiringAssertions
  13. trait WiringAssertions extends AnyRef

Deprecated Type Members

  1. type AssertBIO[F[+_, +_]] = AssertIO2[F]
    Annotations
    @deprecated
    Deprecated

    (Since version 1.0) Renamed to AssertIO2

  2. type AssertIO = AssertZIO
    Annotations
    @deprecated
    Deprecated

    (Since version 1.0) Renamed to AssertZIO

  3. type DistageBIOEnvSpecScalatest[F[-_, +_, +_]] = Spec3[F]
    Annotations
    @deprecated
    Deprecated

    (Since version 1.0) Renamed to Spec3

  4. type DistageBIOSpecScalatest[F[+_, +_]] = Spec2[F]
    Annotations
    @deprecated
    Deprecated

    (Since version 1.0) Renamed to Spec2

  5. type DistageSpecScalatest[F[_]] = Spec1[F]
    Annotations
    @deprecated
    Deprecated

    (Since version 1.0) Renamed to Spec1

Value Members

  1. object AssertCIO extends AssertCIO
  2. object AssertIO2
  3. object AssertIO3
  4. object AssertMonix extends AssertMonix
  5. object AssertMonixBIO extends AssertMonixBIO
  6. object AssertSync
  7. object AssertZIO extends AssertZIO

Deprecated Value Members

  1. lazy val AssertBIO: AssertIO2.type
    Annotations
    @deprecated
    Deprecated

    (Since version 1.0) Renamed to AssertIO2

  2. lazy val AssertIO: AssertZIO.type
    Annotations
    @deprecated
    Deprecated

    (Since version 1.0) Renamed to AssertZIO

Inherited from AnyRef

Inherited from Any

Ungrouped