コード例 #1
0
 @Test
 public void get200Model204NoModelDefaultError200Valid() throws Exception {
   A result =
       client
           .getMultipleResponsesOperations()
           .get200Model204NoModelDefaultError200Valid()
           .getBody();
   Assert.assertEquals(A.class, result.getClass());
   Assert.assertEquals("200", result.getStatusCode());
 }
コード例 #2
0
 @Test
 public void get200ModelA201ModelC404ModelDDefaultError200Valid() throws Exception {
   Object result =
       client
           .getMultipleResponsesOperations()
           .get200ModelA201ModelC404ModelDDefaultError200Valid()
           .getBody();
   A actual = (A) result;
   Assert.assertEquals("200", actual.getStatusCode());
 }
コード例 #3
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());
   }
 }
コード例 #4
0
 @Test
 public void get200ModelA200Valid() throws Exception {
   A result = client.getMultipleResponsesOperations().get200ModelA200Valid().getBody();
   Assert.assertEquals("200", result.getStatusCode());
 }