Skip to content

Commit

Permalink
Test fixes for android
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesagnew committed May 31, 2018
1 parent acc43d6 commit 1999e23
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ public void testParserJson() {
* android uses) and see if this passes
*/
@SuppressWarnings("deprecation")
@Test
public void testClient() {
FhirContext ctx = FhirContext.forDstu2();
try {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ public void testBinaryCreateWithNoContentType() throws Exception {
@Test
public void testClientFailures() throws Exception {
ResponseBody body = mock(ResponseBody.class);
when(body.source()).thenThrow(IllegalStateException.class, RuntimeException.class, Exception.class);
when(body.source()).thenThrow(IllegalStateException.class, RuntimeException.class);

myHttpResponse = new Response.Builder()
.request(myRequest)
Expand All @@ -216,12 +216,6 @@ public void testClientFailures() throws Exception {
assertEquals("java.lang.RuntimeException", e.toString());
}

try {
client.read().resource(Patient.class).withId("1").execute();
fail();
} catch (FhirClientConnectionException e) {
assertEquals("java.lang.Exception", e.getMessage());
}
}


Expand Down

0 comments on commit 1999e23

Please sign in to comment.