ZIO v1.0.0-RC16 Release Notes

Release Date: 2019-10-28 // over 4 years ago
  • Notable changes

    ZIO

    ZIO Stream

    โœ… ZIO Test

    ๐Ÿš€ In this release, the mocking framework API has gone through complete overhaul to be more concise and feature better type inference. Notable changes:

    • ๐Ÿšš The capability tags for default mock services are moved directly to modules companion object. Use MockClock.nanoTime instead of MockClock.Service.nanoTime;
    • ๐Ÿคก The expectations are now methods on capability tags. Use MockRandom.nextInt._0(equalTo(1)) returns value(42) instead of MockSpec.expect_(MockRandom.Service.nextInt._0)(equalTo(1))(42);
    • ๐Ÿคก Assertions for input are now passed as arguments, e.g. MockConsole.putStrLn(equalTo("foo")) returns unit;
    • โœ… Stubbing returns is done via static methods value, valueF, valueM, failure, failureF, failureM, unit, and never in zio.test.mock.Expectation;
    • โœ… Dummy services (expecting no calls) are constructed using a static method nothing from zio.test.mock.Expectation. For example, val dummyConsole = Expectation.nothing[MockConsole];
    • ๐Ÿคก The conversion to managed mock service is automatic and does not require any imports or type hints.

    ๐Ÿ‘€ For more examples, see MockingExampleSpec.

    โž• Additional changes: