Index: libadblockplus-android-tests/src/org/adblockplus/libadblockplus/tests/BaseJsTest.java |
diff --git a/libadblockplus-android/src/org/adblockplus/libadblockplus/AdblockPlusException.java b/libadblockplus-android-tests/src/org/adblockplus/libadblockplus/tests/BaseJsTest.java |
similarity index 51% |
copy from libadblockplus-android/src/org/adblockplus/libadblockplus/AdblockPlusException.java |
copy to libadblockplus-android-tests/src/org/adblockplus/libadblockplus/tests/BaseJsTest.java |
index 7e655ba71e65c7a8bfbfe9a4fa9c6b30a385ba55..c8c66f67396a8a5321b7755068748df226ae1c0d 100644 |
--- a/libadblockplus-android/src/org/adblockplus/libadblockplus/AdblockPlusException.java |
+++ b/libadblockplus-android-tests/src/org/adblockplus/libadblockplus/tests/BaseJsTest.java |
@@ -15,24 +15,27 @@ |
* along with Adblock Plus. If not, see <http://www.gnu.org/licenses/>. |
*/ |
-package org.adblockplus.libadblockplus; |
+package org.adblockplus.libadblockplus.tests; |
-public class AdblockPlusException extends RuntimeException |
-{ |
- private static final long serialVersionUID = -8127654134450836743L; |
+import org.adblockplus.libadblockplus.AppInfo; |
+import org.adblockplus.libadblockplus.JsEngine; |
+import org.adblockplus.libadblockplus.LazyLogSystem; |
+import org.adblockplus.libadblockplus.ThrowingWebRequest; |
- public AdblockPlusException(final String message) |
- { |
- super(message); |
- } |
+import android.test.AndroidTestCase; |
- public AdblockPlusException(final String message, final Throwable throwable) |
- { |
- super(message, throwable); |
- } |
+public abstract class BaseJsTest extends AndroidTestCase |
+{ |
+ protected JsEngine jsEngine; |
- public AdblockPlusException(final Throwable throwable) |
+ @Override |
+ protected void setUp() throws Exception |
{ |
- super(throwable); |
+ super.setUp(); |
+ |
+ jsEngine = new JsEngine(AppInfo.builder().build()); |
+ jsEngine.setDefaultLogSystem(); |
+ jsEngine.setDefaultFileSystem(getContext().getFilesDir().getAbsolutePath()); |
+ jsEngine.setWebRequest(new ThrowingWebRequest()); |
} |
} |