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

Cleanup Unit Tests. #36

Open
jmarkstar opened this issue Mar 3, 2021 · 0 comments
Open

Cleanup Unit Tests. #36

jmarkstar opened this issue Mar 3, 2021 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@jmarkstar
Copy link
Owner

jmarkstar commented Mar 3, 2021

Improvements in Unit tests

  1. Replaced @RunWith(RobolectricTestRunner::class) by @RunWith(AndroidJUnit4::class). robolectric:4.x is supporting the AndroidJUnit4 test runner, ActivityTestRule, and Espresso for interacting with UI components. And RobolectricTestRunner class is only for robolectric:3.x :).

http://robolectric.org/blog/2018/10/25/robolectric-4-0/

  1. Added TestCoroutineRule that will help to control and pass TestCoroutineDispatcher to any production classes which
    need a CoroutineDispatcher, for example the ViewModel. This will helps us to use pause and resume the coroutine in the ViewModel.
@jmarkstar jmarkstar added the enhancement New feature or request label Mar 3, 2021
@jmarkstar jmarkstar self-assigned this Mar 3, 2021
jmarkstar added a commit that referenced this issue Mar 3, 2021
@jmarkstar jmarkstar changed the title Clean up Unit Tests. Cleanup Unit Tests. Mar 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant