Skip to content
New issue

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

[discussion] How can we refactor platform services classes to make them easier to test using mocking frameworks #118

Open
spoorthipujariadobe opened this issue Jul 19, 2022 · 0 comments

Comments

@spoorthipujariadobe
Copy link
Contributor

spoorthipujariadobe commented Jul 19, 2022

In many public service classes like NetworkService, we initialize a lot of dependencies inside the class, on different thread, which makes it difficult to mock them while writing tests. We would end up having to add dummy constructor for testing purpose only sometimes to make it testable. Can we find a more generic pattern for dependency injection like using factory classes, which provide dependencies and can be replaced with mocks during testing?

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

No branches or pull requests

2 participants