Is it possible to mock an interface or abstract class inside a service? #570
Unanswered
cesalberca
asked this question in
Q&A
Replies: 2 comments 2 replies
-
I think what you want is to put |
Beta Was this translation helpful? Give feedback.
1 reply
-
Yah, you can't test abstract class directly. For that, just make a fake wrapper: class TestUserRepository extends UserRepository {
// Implement all abstract requirements
} And then just use the |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm trying this with no results:
This is the code I want to test:
Beta Was this translation helpful? Give feedback.
All reactions