diff --git a/src/test/java/de/blau/android/osm/ApiErrorTest.java b/src/test/java/de/blau/android/osm/ApiErrorTest.java index 327580339..9d6b9eb2d 100644 --- a/src/test/java/de/blau/android/osm/ApiErrorTest.java +++ b/src/test/java/de/blau/android/osm/ApiErrorTest.java @@ -93,7 +93,7 @@ public void onSuccess() { @Override public void onError(AsyncResult result) { - System.out.println("FailOnErrorHandler onError"); + System.out.println("FailOnSuccessHandler onError " + expectedError + " " + result.getCode()); assertEquals(expectedError, result.getCode()); signal.countDown(); } @@ -106,14 +106,15 @@ public void onError(AsyncResult result) { public void setup() { mockServer = new MockWebServerPlus(); HttpUrl mockBaseUrl = mockServer.server().url("/api/0.6/"); + App.getDelegator().reset(true); main = Robolectric.buildActivity(Main.class).create().resume().get(); prefDB = new AdvancedPrefDatabase(main); prefDB.deleteAPI("Test"); prefDB.addAPI("Test", "Test", mockBaseUrl.toString(), null, null, "user", "pass", API.Auth.BASIC); prefDB.selectAPI("Test"); - System.out.println("mock api url " + mockBaseUrl.toString()); // NOSONAR - Logic logic = App.getLogic(); + System.out.println("mock api url " + mockBaseUrl.toString()); // NOSONAR prefs = new Preferences(main); + Logic logic = App.getLogic(); logic.setPrefs(prefs); logic.getMap().setPrefs(main, prefs); }