izumi.distage.testkit.scalatest

Members list

Type members

Classlikes

object AssertCIO extends AssertCIO

Attributes

Companion
trait
Supertypes
trait AssertCIO
class Object
trait Matchable
class Any
Self type
AssertCIO.type
trait AssertCIO

scalatest assertion macro for cats.effect.IO

scalatest assertion macro for cats.effect.IO

Attributes

Companion
object
Supertypes
class Object
trait Matchable
class Any
Known subtypes
object AssertCIO
trait AssertIO2[F[_, _]]

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

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

Attributes

Companion
object
Supertypes
class Object
trait Matchable
class Any
object AssertIO2

Attributes

Companion
trait
Supertypes
class Object
trait Matchable
class Any
Self type
AssertIO2.type
trait AssertSync[F[_]]

scalatest assertion macro for any cats.effect.kernel.Sync

scalatest assertion macro for any cats.effect.kernel.Sync

Attributes

Companion
object
Supertypes
class Object
trait Matchable
class Any
object AssertSync

Attributes

Companion
trait
Supertypes
class Object
trait Matchable
class Any
Self type
AssertSync.type
trait AssertZIO

scalatest assertion macro for zio.ZIO

scalatest assertion macro for zio.ZIO

Attributes

Companion
object
Supertypes
class Object
trait Matchable
class Any
Known subtypes
object AssertZIO
object AssertZIO extends AssertZIO

Attributes

Companion
trait
Supertypes
trait AssertZIO
class Object
trait Matchable
class Any
Self type
AssertZIO.type
abstract class Spec1[F[_]]()(using evidence$1: Tag[F], evidence$2: DefaultModule[F]) extends DistageScalatestTestSuiteRunner[F], For1[F]

Attributes

Supertypes
trait For1[F]
trait CanVerb
trait MustVerb
trait ShouldVerb
trait TestRegistration[F]
trait TestSuite
trait Suite
trait Serializable
trait Assertions
trait TripleEquals
trait TripleEqualsSupport
class Object
trait Matchable
class Any
Show all
Known subtypes
class SpecIdentity
class SpecWiring[F, AppMain, Cfg]
abstract class Spec2[F[_, _]](implicit evidence$1: DefaultModule2[F], val tagBIO: Tag[F]) extends DistageScalatestTestSuiteRunner[[_] =>> F[Throwable, _$3]], For2[F]

Attributes

Supertypes
trait For2[F]
trait ScalatestAbstractDistageSpec[[_] =>> F[Throwable, _$7]]
trait WithTestRegistration[[_] =>> F[Throwable, _$7]]
trait CanVerb
trait MustVerb
trait ShouldVerb
class DistageScalatestTestSuiteRunner[[_] =>> F[Throwable, _$3]]
trait AbstractDistageSpec[[_] =>> F[Throwable, _$7]]
trait TestRegistration[[_] =>> F[Throwable, _$7]]
trait TestSuite
trait Suite
trait Serializable
trait Assertions
trait TripleEquals
trait TripleEqualsSupport
class Object
trait Matchable
class Any
Show all
abstract class SpecIdentity extends Spec1[Identity]

Attributes

Supertypes
class Spec1[Identity]
trait For1[Identity]
trait CanVerb
trait MustVerb
trait ShouldVerb
trait TestSuite
trait Suite
trait Serializable
trait Assertions
trait TripleEquals
trait TripleEqualsSupport
class Object
trait Matchable
class Any
Show all
abstract class SpecWiring[F[_], AppMain <: CheckableApp { type AppEffectType = F; }, Cfg <: Any](val app: AppMain, val cfg: Cfg = ..., val checkAgainAtRuntime: Boolean = ...)(implicit val planCheck: PlanCheckMaterializer[AppMain, Cfg], defaultModule: DefaultModule[F]) extends Spec1[F], WiringAssertions

Attributes

Supertypes
class Spec1[F]
trait For1[F]
trait CanVerb
trait MustVerb
trait ShouldVerb
trait TestRegistration[F]
trait TestSuite
trait Suite
trait Serializable
trait Assertions
trait TripleEquals
trait TripleEqualsSupport
class Object
trait Matchable
class Any
Show all
abstract class SpecZIO(implicit val defaultModule3: DefaultModule3[ZIO], val tagBIO3: Tag[ZIO], val tagBIO: Tag[[_, _] =>> ZIO[Any, _$1, _$2]]) extends DistageScalatestTestSuiteRunner[[_] =>> ZIO[Any, Throwable, _$3]], ForZIO

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]]
 }

 val store = new PetStore[ZIO[PetStore[IO], _, _]] {
   def purchasePet(name: String, cost: Int): RIO[PetStore[IO], Boolean] = ZIO.accessM(_.get.purchasePet(name, cost))
 }
 val pets = new Pets[ZIO[Pets[IO], _, _]] {
   def myPets: RIO[Pets[IO], List[String]] = ZIO.accessM(_.get.myPets)
 }

 "test purchase pets" in {
   for {
     _
     for {
       _    &lt;- store.purchasePet("Zab", cost = 213)
       pets &lt;- pets.myPets
       _    &lt;- assertIO(pets.contains("Zab"))
     } yield ()
     // : ZIO[PetsEnv, Throwable, Unit]
 }

Attributes

Supertypes
trait ForZIO
trait ScalatestAbstractDistageSpec[[_] =>> ZIO[Any, Throwable, _$8]]
trait WithTestRegistration[[_] =>> ZIO[Any, Throwable, _$8]]
trait CanVerb
trait MustVerb
trait ShouldVerb
class DistageScalatestTestSuiteRunner[[_] =>> ZIO[Any, Throwable, _$3]]
trait AbstractDistageSpec[[_] =>> ZIO[Any, Throwable, _$8]]
trait TestRegistration[[_] =>> ZIO[Any, Throwable, _$8]]
trait TestSuite
trait Suite
trait Serializable
trait Assertions
trait TripleEquals
trait TripleEqualsSupport
class Object
trait Matchable
class Any
Show all

Attributes

Supertypes
class Object
trait Matchable
class Any
Known subtypes
class SpecWiring[F, AppMain, Cfg]
Self type
Assertions