From 8573316fdff8e978f3c7ff2a5b2cb9cf22c330a7 Mon Sep 17 00:00:00 2001 From: Carey Metcalfe Date: Wed, 1 Apr 2015 20:05:42 -0400 Subject: [PATCH] Remove obsolete RoutingActivity test Closes #2857 --- .../RoutedInstrumentationTestCase.java | 37 ------------------- 1 file changed, 37 deletions(-) delete mode 100644 androidTest/java/org/thoughtcrime/securesms/RoutedInstrumentationTestCase.java diff --git a/androidTest/java/org/thoughtcrime/securesms/RoutedInstrumentationTestCase.java b/androidTest/java/org/thoughtcrime/securesms/RoutedInstrumentationTestCase.java deleted file mode 100644 index 7587078bea..0000000000 --- a/androidTest/java/org/thoughtcrime/securesms/RoutedInstrumentationTestCase.java +++ /dev/null @@ -1,37 +0,0 @@ -package org.thoughtcrime.securesms; - -import android.app.Activity; -import android.app.Instrumentation.ActivityMonitor; -import android.preference.PreferenceManager; -import android.test.ActivityInstrumentationTestCase2; -import android.util.Log; - -import org.thoughtcrime.securesms.crypto.MasterSecretUtil; - -public class RoutedInstrumentationTestCase extends ActivityInstrumentationTestCase2 { - private static final String TAG = RoutedInstrumentationTestCase.class.getSimpleName(); - - public RoutedInstrumentationTestCase() { - super(RoutingActivity.class); - } - - @Override - public void setUp() throws Exception { - System.setProperty("dexmaker.dexcache", getInstrumentation().getTargetContext().getCacheDir().getPath()); - super.setUp(); - clearSharedPrefs(); - getActivity(); - } - - protected void clearSharedPrefs() { - PreferenceManager.getDefaultSharedPreferences(getInstrumentation().getTargetContext()) - .edit().clear().commit(); - getInstrumentation().getTargetContext().getSharedPreferences(MasterSecretUtil.PREFERENCES_NAME, 0) - .edit().clear().commit(); - } - - protected static void waitOn(Class clazz) { - Log.w(TAG, "waiting for " + clazz.getName()); - new ActivityMonitor(clazz.getName(), null, true).waitForActivityWithTimeout(10000); - } -}