I wrote some tests using robolectric, and now I want to make some real test classes.
One of them noticed that I cannot test events like onCreate, onLocationChanged, etc.
What is the standard practice of testing events ...
Should I extract the code inside the events and put them in the method, the event will call the method, and also robolectro can call the method, of course, the method must be public, right?
Also, if I want to check something inside my method, which is usually a private variable, then I will need to add a public getter, right? so can i check this on robolectric?
Is there a better way to output data to robolectric?
Thanks in advance.
android robolectric
Martin
source share