update instrumentation test to JUnit4
This commit is contained in:
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user