Constructs a new Live service that implements the Live interface.
Constructs a new Live service that implements the Live interface.
This typically should not be necessary as TestEnvironment provides
access to live versions of all the standard ZIO environment types but
could be useful if you are mixing in interfaces to create your own
environment type.
Provides an effect with the "live" environment.
Provides a transformation function with access to the live environment while ensuring that the effect itself is provided with the test environment.
The
Livetrait provides access to the "live" environment from within the test environment for effects such as printing test results to the console or timing out tests where it is necessary to access the real environment.The easiest way to access the "live" environment is to use the
livemethod with an effect that would otherwise access the test environment.The
withLivemethod can be used to apply a transformation to an effect with the live environment while ensuring that the effect itself still runs with the test environment, for example to time out a test. Both of these methods are re-exported in theenvironmentpackage for easy availability.