Back to project page movecerts.
The source code is released under:
GNU General Public License
If you think the Android project movecerts 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.nutomic.zertman.test; /*from w w w . j a va 2s.com*/ import android.content.pm.ActivityInfo; import android.test.ActivityInstrumentationTestCase2; import android.test.ActivityUnitTestCase; import android.test.suitebuilder.annotation.SmallTest; import android.util.Log; import com.nutomic.zertman.MainActivity; public class MainActivityTest extends ActivityInstrumentationTestCase2<MainActivity> { private static final String TAG = "MainActivityTest"; private MainActivity mActivity; public MainActivityTest() { super(MainActivity.class); } @Override protected void setUp() throws Exception { super.setUp(); setActivityInitialTouchMode(false); mActivity = getActivity(); getInstrumentation().waitForIdleSync(); } @SmallTest public void testOrientation() { mActivity.setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE); getInstrumentation().waitForIdleSync(); assertTrue(true); mActivity.setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT); getInstrumentation().waitForIdleSync(); assertTrue(true); } }