From 86d40f6db2f6129d9fd93cfb44c68620102aa525 Mon Sep 17 00:00:00 2001 From: simonpoole Date: Sun, 10 Nov 2024 14:37:10 +0100 Subject: [PATCH] WIP --- src/test/java/de/blau/android/osm/ApiErrorTest.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/test/java/de/blau/android/osm/ApiErrorTest.java b/src/test/java/de/blau/android/osm/ApiErrorTest.java index 3275803394..9d6b9eb2d1 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); }