diff options
Diffstat (limited to 'OpenKeychain/src/androidTest/java/org/sufficientlysecure/keychain')
-rw-r--r-- | OpenKeychain/src/androidTest/java/org/sufficientlysecure/keychain/CreateKeyActivityTest.java | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/OpenKeychain/src/androidTest/java/org/sufficientlysecure/keychain/CreateKeyActivityTest.java b/OpenKeychain/src/androidTest/java/org/sufficientlysecure/keychain/CreateKeyActivityTest.java index a20b61cf3..f85523eb7 100644 --- a/OpenKeychain/src/androidTest/java/org/sufficientlysecure/keychain/CreateKeyActivityTest.java +++ b/OpenKeychain/src/androidTest/java/org/sufficientlysecure/keychain/CreateKeyActivityTest.java @@ -17,11 +17,16 @@ package org.sufficientlysecure.keychain; +import android.support.test.InstrumentationRegistry; +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.Before; +import org.junit.Test; +import org.junit.runner.RunWith; import org.sufficientlysecure.keychain.ui.CreateKeyActivity; import static android.support.test.espresso.Espresso.onView; @@ -40,6 +45,7 @@ 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) @LargeTest public class CreateKeyActivityTest extends ActivityInstrumentationTestCase2<CreateKeyActivity> { @@ -52,12 +58,14 @@ public class CreateKeyActivityTest extends ActivityInstrumentationTestCase2<Crea super(CreateKeyActivity.class); } - @Override + @Before public void setUp() throws Exception { super.setUp(); + injectInstrumentation(InstrumentationRegistry.getInstrumentation()); getActivity(); } + @Test public void testCreateMyKey() { // Clicks create my key onView(withId(R.id.create_key_create_key_button)) |