SpecVersionSpecific

zio.test.SpecVersionSpecific
trait SpecVersionSpecific[-R, +E]

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes
class Spec[R, E]
Self type
Spec[R, E]

Members list

Value members

Concrete methods

inline def provide[E1 >: E](inline layer: ZLayer[_, E1, _]*): Spec[Any, E1]

Automatically assembles a layer for the spec, translating it up a level.

Automatically assembles a layer for the spec, translating it up a level.

Attributes

inline def provideShared[E1 >: E](inline layer: ZLayer[_, E1, _]*): Spec[Any, E1]

Automatically assembles a layer for the spec, sharing services between all tests.

Automatically assembles a layer for the spec, sharing services between all tests.

Attributes

Deprecated methods

inline def provideCustom[E1 >: E](inline layer: ZLayer[_, E1, _]*): Spec[TestEnvironment, E1]

Automatically constructs the part of the environment that is not part of the TestEnvironment, leaving an effect that only depends on the TestEnvironment. This will also satisfy transitive TestEnvironment requirements with TestEnvironment.any, allowing them to be provided later.

Automatically constructs the part of the environment that is not part of the TestEnvironment, leaving an effect that only depends on the TestEnvironment. This will also satisfy transitive TestEnvironment requirements with TestEnvironment.any, allowing them to be provided later.

val zio: ZIO[OldLady with Console, Nothing, Unit] = ???
val oldLadyLayer: ZLayer[Fly, Nothing, OldLady] = ???
val flyLayer: ZLayer[Blocking, Nothing, Fly] = ???

// The TestEnvironment you use later will provide both Blocking to flyLayer and
// Console to zio
val zio2 : ZIO[TestEnvironment, Nothing, Unit] =
 zio.provideCustom(oldLadyLayer, flyLayer)

Attributes

Deprecated
true
inline def provideCustomShared[E1 >: E](inline layer: ZLayer[_, E1, _]*): Spec[TestEnvironment, E1]

Automatically constructs the part of the environment that is not part of the TestEnvironment, leaving an effect that only depends on the TestEnvironment, sharing services between all tests.

Automatically constructs the part of the environment that is not part of the TestEnvironment, leaving an effect that only depends on the TestEnvironment, sharing services between all tests.

This will also satisfy transitive TestEnvironment requirements with TestEnvironment.any, allowing them to be provided later.

val zio: ZIO[OldLady with Console, Nothing, Unit] = ???
val oldLadyLayer: ZLayer[Fly, Nothing, OldLady] = ???
val flyLayer: ZLayer[Blocking, Nothing, Fly] = ???

// The TestEnvironment you use later will provide both Blocking to flyLayer and
// Console to zio
val zio2 : ZIO[TestEnvironment, Nothing, Unit] =
 zio.provideCustom(oldLadyLayer, flyLayer)

Attributes

Deprecated
true