diff options
author | Vincent Breitmoser <valodim@mugenguild.com> | 2015-06-13 21:50:57 +0200 |
---|---|---|
committer | Vincent Breitmoser <valodim@mugenguild.com> | 2015-06-17 18:51:50 +0200 |
commit | 5e4842ab64733fbf07e32af0e6c5f21fad743874 (patch) | |
tree | fef1dff5d70b1acf68f86f92892ab2a26379202a /OpenKeychain/src/androidTest/java/org/sufficientlysecure/keychain | |
parent | 66e7876abd3c4a5a3d1002386d6445e64e91ae97 (diff) | |
download | open-keychain-5e4842ab64733fbf07e32af0e6c5f21fad743874.tar.gz open-keychain-5e4842ab64733fbf07e32af0e6c5f21fad743874.tar.bz2 open-keychain-5e4842ab64733fbf07e32af0e6c5f21fad743874.zip |
fix instrumentation test(s)
Diffstat (limited to 'OpenKeychain/src/androidTest/java/org/sufficientlysecure/keychain')
-rw-r--r-- | OpenKeychain/src/androidTest/java/org/sufficientlysecure/keychain/CreateKeyActivityTest.java | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/OpenKeychain/src/androidTest/java/org/sufficientlysecure/keychain/CreateKeyActivityTest.java b/OpenKeychain/src/androidTest/java/org/sufficientlysecure/keychain/CreateKeyActivityTest.java index c3741fdef..a20b61cf3 100644 --- a/OpenKeychain/src/androidTest/java/org/sufficientlysecure/keychain/CreateKeyActivityTest.java +++ b/OpenKeychain/src/androidTest/java/org/sufficientlysecure/keychain/CreateKeyActivityTest.java @@ -17,14 +17,11 @@ package org.sufficientlysecure.keychain; -import android.support.test.rule.ActivityTestRule; -import android.support.test.runner.AndroidJUnit4; +import android.test.ActivityInstrumentationTestCase2; +import android.test.suitebuilder.annotation.LargeTest; import android.text.method.HideReturnsTransformationMethod; import android.text.method.PasswordTransformationMethod; -import org.junit.Rule; -import org.junit.Test; -import org.junit.runner.RunWith; import org.sufficientlysecure.keychain.ui.CreateKeyActivity; import static android.support.test.espresso.Espresso.onView; @@ -43,18 +40,24 @@ import static org.hamcrest.Matchers.allOf; import static org.sufficientlysecure.keychain.matcher.EditTextMatchers.withError; import static org.sufficientlysecure.keychain.matcher.EditTextMatchers.withTransformationMethod; -@RunWith(AndroidJUnit4.class) -public class CreateKeyActivityTest { +@LargeTest +public class CreateKeyActivityTest extends ActivityInstrumentationTestCase2<CreateKeyActivity> { public static final String SAMPLE_NAME = "Sample Name"; public static final String SAMPLE_EMAIL = "sample_email@gmail.com"; public static final String SAMPLE_ADDITIONAL_EMAIL = "sample_additional_email@gmail.com"; public static final String SAMPLE_PASSWORD = "sample_password"; - @Rule - public ActivityTestRule<CreateKeyActivity> mActivityRule = new ActivityTestRule<>(CreateKeyActivity.class); + public CreateKeyActivityTest() { + super(CreateKeyActivity.class); + } + + @Override + public void setUp() throws Exception { + super.setUp(); + getActivity(); + } - @Test public void testCreateMyKey() { // Clicks create my key onView(withId(R.id.create_key_create_key_button)) |