Robolectric 3
Testing Activity Views with RobolectricTesting Activity Views
Up next
Previous
About
In this Lesson you will learn:
- How TDD works on Android.
- How to test TextView and its attributes.
- How to create a helper for resource fetching.
- How to create a helper for view assertions.
Links
- Robolectric
Instructor
Links
Comments
This shouldNotBeNull
was failing for me.
So I took a look at this link:
http://robolectric.org/getting-started/
And solved it.
Corey Latislaw, in order to help future students, I advise you to update this info in this video, or at least in the video description.
Well, I tried to update the Deprecated classes, adding
testImplementation 'androidx.test:core:1.0.0'
instead of testImplementation 'org.robolectric:robolectric:4.2'
.
Unfortunately, the app now doesn't run.
Those are the links I followed:
https://stackoverflow.com/questions/52883747/robolectric-runtimeenvironment-application-is-deprecated-where-is-applicationpr
http://robolectric.org/migrating/
Also, the statements below are now red:
@RunWith(RobolectricTestRunner.class)
and
activity = Robolectric.buildActivity(RobolectricActivity.class);