diff --git a/library-push/src/androidTest/java/org/easydarwin/easypusher/ApplicationTest.java b/library-push/src/androidTest/java/org/easydarwin/easypusher/ApplicationTest.java deleted file mode 100644 index 7cb23eb..0000000 --- a/library-push/src/androidTest/java/org/easydarwin/easypusher/ApplicationTest.java +++ /dev/null @@ -1,19 +0,0 @@ -/* - Copyright (c) 2013-2016 EasyDarwin.ORG. All rights reserved. - Github: https://github.com/EasyDarwin - WEChat: EasyDarwin - Website: http://www.easydarwin.org -*/ -package org.easydarwin.easypusher; - -import android.app.Application; -import android.test.ApplicationTestCase; - -/** - * Testing Fundamentals - */ -public class ApplicationTest extends ApplicationTestCase { - public ApplicationTest() { - super(Application.class); - } -} \ No newline at end of file diff --git a/library-push/src/androidTest/java/org/easydarwin/easypusher/SplashActivityTest.java b/library-push/src/androidTest/java/org/easydarwin/easypusher/SplashActivityTest.java deleted file mode 100644 index 17f7f91..0000000 --- a/library-push/src/androidTest/java/org/easydarwin/easypusher/SplashActivityTest.java +++ /dev/null @@ -1,80 +0,0 @@ -package org.easydarwin.easypusher; - - -import android.support.test.espresso.ViewInteraction; -import android.support.test.rule.ActivityTestRule; -import android.support.test.runner.AndroidJUnit4; -import android.test.suitebuilder.annotation.LargeTest; - -import org.junit.Rule; -import org.junit.Test; -import org.junit.runner.RunWith; - -import static android.support.test.espresso.Espresso.onView; -import static android.support.test.espresso.Espresso.pressBack; -import static android.support.test.espresso.action.ViewActions.click; -import static android.support.test.espresso.action.ViewActions.scrollTo; -import static android.support.test.espresso.matcher.ViewMatchers.isDisplayed; -import static android.support.test.espresso.matcher.ViewMatchers.withId; -import static android.support.test.espresso.matcher.ViewMatchers.withParent; -import static android.support.test.espresso.matcher.ViewMatchers.withText; -import static org.hamcrest.Matchers.allOf; - -@LargeTest -@RunWith(AndroidJUnit4.class) -public class SplashActivityTest { - - @Rule - public ActivityTestRule mActivityTestRule = new ActivityTestRule<>(SplashActivity.class); - - @Test - public void splashActivityTest() { - // Added a sleep statement to match the app's execution delay. - // The recommended way to handle such scenarios is to use Espresso idling resources: - // https://google.github.io/android-testing-support-library/docs/espresso/idling-resource/index.html - - - ViewInteraction appCompatButton = onView( - allOf(withId(R.id.btn_switch), withText("推送"), isDisplayed())); - appCompatButton.perform(click()); - - ViewInteraction appCompatButton2 = onView( - allOf(withId(R.id.btn_setting), withText("设置"), isDisplayed())); - appCompatButton2.perform(click()); - - pressBack(); - - ViewInteraction appCompatCheckBox = onView( - allOf(withId(R.id.only_push_audio), withText("仅推送音频"))); - appCompatCheckBox.perform(scrollTo(), click()); - - ViewInteraction appCompatButton3 = onView( - allOf(withId(R.id.btn_save), withText("保存"))); - appCompatButton3.perform(scrollTo(), click()); - - ViewInteraction appCompatButton4 = onView( - allOf(withId(R.id.btn_setting), withText("设置"), isDisplayed())); - appCompatButton4.perform(click()); - - pressBack(); - - ViewInteraction appCompatCheckBox2 = onView( - allOf(withId(R.id.only_push_audio), withText("仅推送音频"))); - appCompatCheckBox2.perform(scrollTo(), click()); - - ViewInteraction appCompatButton5 = onView( - allOf(withId(R.id.btn_save), withText("保存"))); - appCompatButton5.perform(scrollTo(), click()); - - pressBack(); - - ViewInteraction appCompatButton6 = onView( - allOf(withId(android.R.id.button2), withText("取消"), - withParent(allOf(withId(R.id.buttonPanel), - withParent(withId(R.id.parentPanel)))), - isDisplayed())); - appCompatButton6.perform(click()); - - } - -} diff --git a/library-push/src/test/java/org/easydarwin/easypusher/ExampleUnitTest.java b/library-push/src/test/java/org/easydarwin/easypusher/ExampleUnitTest.java deleted file mode 100644 index 5740302..0000000 --- a/library-push/src/test/java/org/easydarwin/easypusher/ExampleUnitTest.java +++ /dev/null @@ -1,22 +0,0 @@ -/* - Copyright (c) 2013-2016 EasyDarwin.ORG. All rights reserved. - Github: https://github.com/EasyDarwin - WEChat: EasyDarwin - Website: http://www.easydarwin.org -*/ - -package org.easydarwin.easypusher; - -import org.junit.Test; - -import static org.junit.Assert.*; - -/** - * To work on unit tests, switch the Test Artifact in the Build Variants view. - */ -public class ExampleUnitTest { - @Test - public void addition_isCorrect() throws Exception { - assertEquals(4, 2 + 2); - } -} \ No newline at end of file