From e50c683159e1dc4bfdbd6395f781b404b48d7a9c Mon Sep 17 00:00:00 2001 From: inorichi Date: Tue, 9 Feb 2016 22:07:14 +0100 Subject: [PATCH] Fix tests failing after upgrading EventBus --- app/src/main/java/eu/kanade/tachiyomi/App.java | 8 ++++++-- app/src/test/java/eu/kanade/tachiyomi/TestApp.java | 9 +++++++++ 2 files changed, 15 insertions(+), 2 deletions(-) create mode 100644 app/src/test/java/eu/kanade/tachiyomi/TestApp.java diff --git a/app/src/main/java/eu/kanade/tachiyomi/App.java b/app/src/main/java/eu/kanade/tachiyomi/App.java index 1a2ef055c..63dfa0cc7 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/App.java +++ b/app/src/main/java/eu/kanade/tachiyomi/App.java @@ -40,12 +40,16 @@ public class App extends Application { componentInjector = new ComponentReflectionInjector<>(AppComponent.class, applicationComponent); + setupEventBus(); + + ACRA.init(this); + } + + protected void setupEventBus() { EventBus.builder() .addIndex(new EventBusIndex()) .logNoSubscriberMessages(false) .installDefaultEventBus(); - - ACRA.init(this); } public AppComponent getComponent() { diff --git a/app/src/test/java/eu/kanade/tachiyomi/TestApp.java b/app/src/test/java/eu/kanade/tachiyomi/TestApp.java new file mode 100644 index 000000000..ba670b624 --- /dev/null +++ b/app/src/test/java/eu/kanade/tachiyomi/TestApp.java @@ -0,0 +1,9 @@ +package eu.kanade.tachiyomi; + +public class TestApp extends App { + + @Override + protected void setupEventBus() { + // Do nothing + } +}