Hi All,
I am pretty new to Android and trying to write an application that stores
some data on external storage.
I figure that Environment.getxxxState are the functions to check before
assuming their presence.
Now, since these are system enforced objects, how do I mock them for
testing
Typically, this isn't done by mocking those classes directly, but
rather by wrapping those classes in interfaces and then mocking said
interfaces. For example, consider the following code (I'm not claiming
this is good code - just a way to use and fix things that you're
trying):
public
2 matches
Mail list logo