Open senia-psm opened 2 years ago
Current implementation relies on scala 2 annotation macros.
There is no way to generate new methods/objects with scala 3 macros, so the current approach is not applicable to scala 3.
Additionally current approach relies on Assertion which is a subject for deprecation.
Assertion
1 possible solution is to create something similar to ScalaMock:
ScalaMock
val expect = (mock[Srv].method(_, _, _)).expect((a, b, c)=> assertTrue(a == 1, b == "", c < 0)).returns(valueF(_ => ???)).atMost(0) val lessVerbose = mock[Srv](_.method _).assertParams(_ == 1, _ == "", _ < 0).returnF(_ => ???).atMost(0)
Hi! I've created a stubbing library for scala 3 and probably it can replace zio-mock https://github.com/goshacodes/backstub
Current implementation relies on scala 2 annotation macros.
There is no way to generate new methods/objects with scala 3 macros, so the current approach is not applicable to scala 3.
Additionally current approach relies on
Assertion
which is a subject for deprecation.1 possible solution is to create something similar to
ScalaMock
: