-
Notifications
You must be signed in to change notification settings - Fork 52
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
Suggestions for porting InstantTaskExecutorRule? #66
Comments
Actually, turns out it wasn't so hard to replace that particular rule. Here it is:
|
Great to see you dived into the Extension sphere yourself already! With the instrumentation test support, I intend to provide replacements for core JUnit 4 APIs that evolve to become Extensions. Since this particular class is tied to Architecture Components, I won't include it into the core instrumentation-test library. However, this could become its own library for people to plug into their project eventually. For now, I'll consider to link to this for the upcoming wiki on usage with Instrumentation Tests. Thank you! |
I can confirm that extension works perfectly in my unit test suite. I'll keep an eye on this project and contribute any other extensions I come across (actually, I already have one to enable the |
JUnit5 does not support
Rule
s. Yet some tests, particularly Android tests, absolutely requireRule
s. One example is theInstantTaskExecutorRule
required for unit testingViewModel
s. I'm interested in writing a custom Extesnsion, but I don't really know where to start. Any ideas? Does this already exist?The text was updated successfully, but these errors were encountered: