I can’t recall when this was changed, but the current method to get a Context object during Instrumented testing is to import
import android.support.test.InstrumentationRegistry;
and call
InstrumentationRegistry.getContext();
Hope this helps!
I can’t recall when this was changed, but the current method to get a Context object during Instrumented testing is to import
import android.support.test.InstrumentationRegistry;
and call
InstrumentationRegistry.getContext();
Hope this helps!