Closed GoogleCodeExporter closed 9 years ago
To make it a bit easier to read, this is the code for the test:
public class MorseViewTest extends
ActivityInstrumentationTestCase2<ConfigureMorseActivity> {
/**
* The first constructor parameter must refer to the package identifier of the
* package hosting the activity to be launched, which is specified in the AndroidManifest.xml
* file. This is not necessarily the same as the java package name of the class - in fact, in
* some cases it may not match at all.
*/
public MorseViewTest() {
super("com.simpligility.android.morseflash", ConfigureMorseActivity.class);
}
@LargeTest
public void testCustomView() throws Exception {
startActivitySync(ConfigureMorseActivity.class);
Instrumentation instrumentation = getInstrumentation();
sleep(500); // robotium provides neater ways of waiting for the activity to initialise
// Create a custom view, using the context of the app under test so that it can find it's
// layout resources
MorseFlashCustomView customView = new MorseFlashCustomView(instrumentation.getTargetContext());
assertNotNull(customView);
}
private <T extends Activity> T startActivitySync(Class<T> clazz) {
Intent intent = new Intent(getInstrumentation().getTargetContext(), clazz);
intent.setFlags(intent.getFlags() | FLAG_ACTIVITY_NEW_TASK);
return (T) getInstrumentation().startActivitySync(intent);
}
}
If I comment out the "startActivitySync" line then it all runs OK.
Original comment by and...@tuenti.com
on 29 Apr 2014 at 11:41
We are no longer using the issue tracking system on Google Code. Please refile
this issue on https://github.com/jayway/maven-android-plugin/issues if you
still have this problem with the latest release of the Android Maven Plugin
Original comment by mosa...@gmail.com
on 19 May 2014 at 4:20
Original issue reported on code.google.com by
and...@tuenti.com
on 29 Apr 2014 at 11:29