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

Introduce an interface to SymSpell class to simplify mocking/testing #59

Open
sergii-sakharov opened this issue Jan 25, 2019 · 2 comments

Comments

@sergii-sakharov
Copy link

At the moment we're forced to writing our own wrappers around SymSpell that would allow mocking the class in our unit tests.
A predefined interface (or at least virtual attributes on most of the compute-intensive methods) would remove this requirement.

P.S. I'm happy with doing a pull request in case it is an acceptable change

@wolfgarbe
Copy link
Owner

I see your point. But both Javascript and Python don't support the interface concept, while they are the most actively used ports of SymSpell. And even in the other languages probably not all developers are familiar with that concept. This would lead to fewer or more deviating ports.
Therefore I would like to keep it simple and stick to basic language features which easily can be understood and ported to other languages.

@sergii-sakharov
Copy link
Author

sergii-sakharov commented Jan 28, 2019

What about making methods virtual then as that would allow mocking too?

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

No branches or pull requests

2 participants