Back to project page JayJayLab-Android-Demo.
The source code is released under:
Apache License
If you think the Android project JayJayLab-Android-Demo listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.jayjaylab.androiddemo; // w w w .ja v a 2 s . c o m import android.app.Activity; import com.jayjaylab.androiddemo.main.activity.ActivityIntro; import org.junit.After; import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; import org.robolectric.Robolectric; import org.robolectric.RobolectricTestRunner; import org.robolectric.annotation.Config; import java.lang.Exception; import static junit.framework.Assert.assertTrue; @Config(manifest = "./app/src/main/AndroidManifest.xml") @RunWith(RobolectricTestRunner.class) public class ActivityIntroTest { @Before public void setup() { } @After public void teardown() { } @Test public void testIfActivityIsNotNull() throws Exception { Activity activity = Robolectric.buildActivity(ActivityIntro.class).create().get(); assertTrue(activity != null); } }