Test fixes for android
This commit is contained in:
parent
acc43d6a6c
commit
1999e23dc9
|
@ -72,6 +72,7 @@ public class BuiltJarDstu2IT {
|
||||||
* android uses) and see if this passes
|
* android uses) and see if this passes
|
||||||
*/
|
*/
|
||||||
@SuppressWarnings("deprecation")
|
@SuppressWarnings("deprecation")
|
||||||
|
@Test
|
||||||
public void testClient() {
|
public void testClient() {
|
||||||
FhirContext ctx = FhirContext.forDstu2();
|
FhirContext ctx = FhirContext.forDstu2();
|
||||||
try {
|
try {
|
||||||
|
|
|
@ -190,7 +190,7 @@ public class GenericClientDstu3IT {
|
||||||
@Test
|
@Test
|
||||||
public void testClientFailures() throws Exception {
|
public void testClientFailures() throws Exception {
|
||||||
ResponseBody body = mock(ResponseBody.class);
|
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()
|
myHttpResponse = new Response.Builder()
|
||||||
.request(myRequest)
|
.request(myRequest)
|
||||||
|
@ -216,12 +216,6 @@ public class GenericClientDstu3IT {
|
||||||
assertEquals("java.lang.RuntimeException", e.toString());
|
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());
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue