Skip to content
This repository has been archived by the owner on Jan 13, 2025. It is now read-only.

scala 3 support #13

Open
senia-psm opened this issue Mar 16, 2022 · 1 comment · May be fixed by #14
Open

scala 3 support #13

senia-psm opened this issue Mar 16, 2022 · 1 comment · May be fixed by #14

Comments

@senia-psm
Copy link

senia-psm commented Mar 16, 2022

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:

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)
@senia-psm senia-psm linked a pull request Mar 17, 2022 that will close this issue
9 tasks
@goshacodes
Copy link

goshacodes commented Sep 28, 2024

Scalamock now supports ZIO

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants