We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi! i`m new in using ScalaMock. Need to create an mock or stub for an Generic Class Repository.
class FirstUT extends WordSpec with MustMatchers with MockFactory { "Some class" should { "do" in { val cl = stub[Repository[Wrap]] (cl.save _).when(*).returns("88585") val serviceOne = new ServiceOne(cl) serviceOne.save("88585") mustBe "8858588585" } } }
Error:(7, 20) type mismatch; found : A required: Wrap val cl = stub[Repository[Wrap]]
class ServiceOne(val repo:Repository[Wrap]){ def save(str:String): String = { println("ServiceOne Save") repo.save(str) + str } } class Repository[A](val entity: A) { def save(str:String) = { println("saving") str + str } } case class Wrap()
If remove Repository constructor no errors occurs, but it is not answer.
The text was updated successfully, but these errors were encountered:
Seems to be a duplicate of #170 I would appreciate if you use the form next time to fill in the which version of scalamock you used etc.
Sorry, something went wrong.
No branches or pull requests
Hi! i`m new in using ScalaMock. Need to create an mock or stub for an Generic Class Repository.
If remove Repository constructor no errors occurs, but it is not answer.
The text was updated successfully, but these errors were encountered: