I am attempting to decode a Base64 encoded string in Android using the http://developer.android.com/reference/android/util/Base64.html class.
Both the encodeToString and
You can use the Robolectric Runner
Add the dependency in your build.gradle
:
testCompile 'org.robolectric:robolectric:X.X.X'
Add this line in your testing class:
import org.junit.runner.RunWith;
import org.robolectric.RobolectricTestRunner;
@RunWith(RobolectricTestRunner.class)
public class MyTestingClassTest {
...
}