コード例 #1
0
 @Test
 public void getDefaultModelA400None() throws Exception {
   try {
     client.getMultipleResponsesOperations().getDefaultModelA400None();
     fail();
   } catch (MyException ex) {
     Assert.assertEquals(400, ex.getResponse().code());
   }
 }
コード例 #2
0
 @Test
 public void getDefaultModelA400Valid() throws Exception {
   try {
     client.getMultipleResponsesOperations().getDefaultModelA400Valid();
     fail();
   } catch (MyException ex) {
     Assert.assertEquals(400, ex.getResponse().code());
     A model = new JacksonMapperAdapter().getObjectMapper().convertValue(ex.getBody(), A.class);
     Assert.assertEquals("400", model.getStatusCode());
   }
 }