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