Hi,
I’m trying to add a unit test case that accesses an image file from
resources as a bitmap. I have the following test case below but I’m seeing
this error
“Method runTest in android.test.InstrumentationTestCase not mocked. “
Not sure if I am accessing resource folder correctly?
My test structure is under src/test/java and I’m running android
instrumentation tests
Testcase
public class Exampletest extends InstrumentationTestCase {
public void test() throws Exception {
Bitmap bmp =
BitmapFactory.decodeResource(getInstrumentation().getContext().getResources(),
R.drawable.imagefile);
assertEquals(10, bmp.getWidth());
}
}
--
You received this message because you are subscribed to the Google Groups
"adt-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.