Remove a PoC test case, and make sure all tests are successful.

This commit is contained in:
Bradlee Speice
2014-07-09 21:20:52 -04:00
parent 099c7ec02a
commit e7cf3be6bc
2 changed files with 16 additions and 41 deletions

View File

@ -1,40 +0,0 @@
package org.bspeice.minimalbible;
import android.test.ActivityInstrumentationTestCase2;
import org.bspeice.minimalbible.activity.downloader.DownloadActivity;
import java.lang.reflect.Field;
/**
* Created by Bradlee Speice on 7/5/2014.
*/
/* Please note that it is necessary to extend the ActivityInstrumentationTestCase2 if you plan
on using an activity that sets up any underlying fragments (includes navigation drawers).
The ActivityUnitTestCase doesn't set up enough of the Activity lifecycle.
*/
public class DownloadActivityTest extends
ActivityInstrumentationTestCase2<DownloadActivity> {
public DownloadActivityTest() {
super(DownloadActivity.class);
}
public void testAndroidTestInjection() {
DownloadActivity a = getActivity();
assertNotNull(a);
Class c = a.getClass();
try {
// getField() is public-only
Field fTitle = c.getDeclaredField("testInject");
fTitle.setAccessible(true);
CharSequence title = (CharSequence)fTitle.get(a);
assertEquals(TestModules.testActivityTitle, title);
} catch (NoSuchFieldException e) {
fail(e.getMessage());
} catch (IllegalAccessException e) {
fail(e.getMessage());
}
}
}