Example #1
0
 @Test
 public void postRequiredStringHeader() throws Exception {
   try {
     client.getExplicit().postRequiredStringHeader(null);
     fail();
   } catch (ServiceException ex) {
     Assert.assertTrue(ex.getMessage().contains("Parameter headerParameter is required"));
   }
 }
Example #2
0
 @Test
 public void postOptionalStringParameter() throws Exception {
   try {
     client.getExplicit().postOptionalIntegerParameter(null);
     fail();
   } catch (ServiceException ex) {
     // Body parameter cannot be null
   }
 }
Example #3
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"));
   }
 }
Example #4
0
 @Test
 public void postOptionalStringProperty() throws Exception {
   StringOptionalWrapper body = new StringOptionalWrapper();
   body.setValue(null);
   client.getExplicit().postOptionalStringProperty(body);
 }
Example #5
0
 @Test
 public void postOptionalIntegerHeader() throws Exception {
   client.getExplicit().postOptionalIntegerHeader(null);
 }
Example #6
0
 @Test
 public void postOptionalIntegerProperty() throws Exception {
   IntOptionalWrapper body = new IntOptionalWrapper();
   body.setValue(null);
   client.getExplicit().postOptionalIntegerProperty(body);
 }