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
Remove unnecessary interfaces #33
Comments
Would it be a breaking change? Is that becausr they'd need to add an
|
Yes, the code on the user site would have to be changed due to the required imports. |
Is there anyway you can inherit imports in Kotlin?
|
At least I'm not aware of such a possibility. But you could place the functions to be inherited in interfaces and add them to the test base class :-D My idea was to keep the code as clean and idiomatic as possible, but maybe using interfaces here is more convenient for the users. |
I only did it as interfaces because I like them to be in scope automatically, and because its quite "scalay". I've been a Scala developer for 5 years at work, and I haven't touched Java since, so a lot of my opinions are influenced by that. |
When I was writing this issue, I haven't thought of the convenience aspect. I think it is ok, to just close this ticket. |
Some interfaces exist only to hold concrete methods. In languages like Java and Scala this is necessary, but Kotlin supports top level functions, so this code can be slightly reduced by removing the interfaces.
The following interfaces could be removed: Inspectors, Eventually, CollectionMatchers, ExceptionMatchers, IntMatchers, LongMatchers, MapMatchers, StringMatchers, TypeMatchers. This would be a breaking change.
The text was updated successfully, but these errors were encountered: