Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
simonpoole committed Nov 28, 2024
1 parent e4e7216 commit 86d40f6
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/test/java/de/blau/android/osm/ApiErrorTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
Expand All @@ -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);
}
Expand Down

0 comments on commit 86d40f6

Please sign in to comment.