Skip to content

Commit

Permalink
Adapt to asserting on failure.
Browse files Browse the repository at this point in the history
  • Loading branch information
henningandersen committed Jan 16, 2020
1 parent 15e4199 commit 2b24d57
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,8 @@ public void onFailure(Exception e) {
}
});

expectThrows(IllegalArgumentException.class, () -> mapped.onResponse(null));
AssertionError assertionError = expectThrows(AssertionError.class, () -> mapped.onResponse(null));
assertThat(assertionError.getCause().getCause(), instanceOf(IllegalArgumentException.class));
assertNull(exReference.get());
mapped.onResponse(false);
assertNull(exReference.get());
Expand Down

0 comments on commit 2b24d57

Please sign in to comment.