Beispiel #1
0
 @Test
 public void postRequiredStringParameter() throws Exception {
   try {
     client.getExplicit().postRequiredStringParameter(null);
     fail();
   } catch (ServiceException ex) {
     Assert.assertTrue(ex.getCause().getMessage().contains("Parameter bodyParameter is required"));
   }
 }
Beispiel #2
0
 @Test
 public void postRequiredStringProperty() throws Exception {
   try {
     StringWrapper body = new StringWrapper();
     body.setValue(null);
     client.getExplicit().postRequiredStringProperty(body);
     fail();
   } catch (ServiceException ex) {
     Assert.assertEquals(IllegalArgumentException.class, ex.getCause().getClass());
     Assert.assertTrue(ex.getMessage().contains("value is required"));
   }
 }