zio.test.TestSystem
See theTestSystem companion object
trait TestSystem extends System, Restorable
TestSystem
supports deterministic testing of effects involving system properties. Internally, TestSystem
maintains mappings of environment variables and system properties that can be set and accessed. No actual environment variables or system properties will be accessed or set as a result of these actions.
import zio.system
import zio.test.TestSystem
for {
_ <- TestSystem.putProperty("java.vm.name", "VM")
result <- system.property("java.vm.name")
} yield result == Some("VM")
Attributes
Members list
Value members
Abstract methods
In this article