Android Open Source - android-studio-template Application Test






From Project

Back to project page android-studio-template.

License

The source code is released under:

Apache License

If you think the Android project android-studio-template listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package com.sakebook.android.template;
/*from w  w w.j  a  va2  s.co m*/
import static junit.framework.Assert.assertTrue;

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 android.app.Application;

/**
 * <a href="http://d.android.com/tools/testing/testing_android.html">Testing Fundamentals</a>
 */
@Config(emulateSdk = 18)
@RunWith(RobolectricTestRunner.class)
public class ApplicationTest{

    private Application application;

    @Before
    public void setup() {
        application = new Application();
        Robolectric.application = application;
    }

    @After
    public void teardown() {
    }

    @Test
    public void testMethod() {
        assertTrue(true);
    }
}




Java Source Code List

com.sakebook.android.template.ApplicationTest.java
com.sakebook.android.template.MyActivity.java
com.sakebook.android.template.NavigationDrawerFragment.java