Back to project page android-cd-travis-example.
The source code is released under:
MIT License
If you think the Android project android-cd-travis-example 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.ruenzuo.weatherapp.test; //from w ww . j a v a 2 s . c o m import android.app.Instrumentation; import android.test.ActivityInstrumentationTestCase2; import android.test.ViewAsserts; import com.ruenzuo.weatherapp.BuildConfig; import com.ruenzuo.weatherapp.activities.CityActivity; public class CityActivityFunctionalTests extends ActivityInstrumentationTestCase2<CityActivity> { private CityActivity activity; public CityActivityFunctionalTests(Class<CityActivity> activityClass) { super(activityClass); } @Override protected void setUp() throws Exception { super.setUp(); setActivityInitialTouchMode(false); activity = getActivity(); } public void testActivity() throws Throwable { Instrumentation.ActivityMonitor monitor = getInstrumentation().addMonitor(CityActivity.class.getName(), null, false); if (BuildConfig.IS_FREE) { Thread.sleep(5000); ViewAsserts.assertOnScreen(activity.getWindow().getDecorView(), activity.getAdView()); assertNull(activity.getAdView()); } } }