fixed tests
This commit is contained in:
parent
364f7402b8
commit
398e89d9ec
2 changed files with 5 additions and 10 deletions
|
@ -69,7 +69,5 @@ dependencies {
|
|||
implementation "com.leinardi.android:speed-dial:3.1.1"
|
||||
implementation "com.mikepenz:aboutlibraries:6.2.3"
|
||||
|
||||
androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2', {
|
||||
exclude group: 'com.android.support', module: 'support-annotations'
|
||||
})
|
||||
androidTestImplementation "androidx.test.espresso:espresso-core:3.2.0"
|
||||
}
|
||||
|
|
|
@ -24,15 +24,13 @@
|
|||
package org.shadowice.flocke.andotp;
|
||||
|
||||
import android.content.Context;
|
||||
import androidx.test.InstrumentationRegistry;
|
||||
import androidx.test.runner.AndroidJUnit4;
|
||||
import androidx.test.platform.app.InstrumentationRegistry;
|
||||
|
||||
import org.apache.commons.codec.DecoderException;
|
||||
import org.apache.commons.codec.binary.Base32;
|
||||
import org.apache.commons.codec.binary.Hex;
|
||||
import org.json.JSONObject;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.shadowice.flocke.andotp.Database.Entry;
|
||||
import org.shadowice.flocke.andotp.Utilities.Constants;
|
||||
import org.shadowice.flocke.andotp.Utilities.DatabaseHelper;
|
||||
|
@ -60,10 +58,9 @@ import javax.crypto.SecretKey;
|
|||
import javax.crypto.spec.IvParameterSpec;
|
||||
import javax.crypto.spec.SecretKeySpec;
|
||||
|
||||
import static junit.framework.TestCase.assertEquals;
|
||||
import static junit.framework.TestCase.assertTrue;
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.assertTrue;
|
||||
|
||||
@RunWith(AndroidJUnit4.class)
|
||||
public class ApplicationTest {
|
||||
|
||||
@Test
|
||||
|
@ -196,7 +193,7 @@ public class ApplicationTest {
|
|||
|
||||
@Test
|
||||
public void testSettingsHelper() throws KeyStoreException, CertificateException, NoSuchAlgorithmException, IOException {
|
||||
Context context = InstrumentationRegistry.getTargetContext();
|
||||
Context context = InstrumentationRegistry.getInstrumentation().getTargetContext();
|
||||
|
||||
final KeyStore keyStore = KeyStore.getInstance("AndroidKeyStore");
|
||||
keyStore.load(null);
|
||||
|
|
Loading…
Reference in a new issue