Exemple #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"));
   }
 }
Exemple #2
0
 @Test
 public void postOptionalStringParameter() throws Exception {
   try {
     client.getExplicit().postOptionalIntegerParameter(null);
     fail();
   } catch (ServiceException ex) {
     // Body parameter cannot be null
   }
 }
Exemple #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"));
   }
 }
Exemple #4
0
 @Test
 public void postOptionalStringProperty() throws Exception {
   StringOptionalWrapper body = new StringOptionalWrapper();
   body.setValue(null);
   client.getExplicit().postOptionalStringProperty(body);
 }
Exemple #5
0
 @Test
 public void postOptionalIntegerHeader() throws Exception {
   client.getExplicit().postOptionalIntegerHeader(null);
 }
Exemple #6
0
 @Test
 public void postOptionalIntegerProperty() throws Exception {
   IntOptionalWrapper body = new IntOptionalWrapper();
   body.setValue(null);
   client.getExplicit().postOptionalIntegerProperty(body);
 }