コード例 #1
0
ファイル: ExplicitTests.java プロジェクト: koolraap/autorest
 @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
ファイル: ExplicitTests.java プロジェクト: koolraap/autorest
 @Test
 public void postOptionalStringParameter() throws Exception {
   try {
     client.getExplicit().postOptionalIntegerParameter(null);
     fail();
   } catch (ServiceException ex) {
     // Body parameter cannot be null
   }
 }
コード例 #3
0
ファイル: ExplicitTests.java プロジェクト: koolraap/autorest
 @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
ファイル: ExplicitTests.java プロジェクト: koolraap/autorest
 @Test
 public void postOptionalStringProperty() throws Exception {
   StringOptionalWrapper body = new StringOptionalWrapper();
   body.setValue(null);
   client.getExplicit().postOptionalStringProperty(body);
 }
コード例 #5
0
ファイル: ExplicitTests.java プロジェクト: koolraap/autorest
 @Test
 public void postOptionalIntegerHeader() throws Exception {
   client.getExplicit().postOptionalIntegerHeader(null);
 }
コード例 #6
0
ファイル: ExplicitTests.java プロジェクト: koolraap/autorest
 @Test
 public void postOptionalIntegerProperty() throws Exception {
   IntOptionalWrapper body = new IntOptionalWrapper();
   body.setValue(null);
   client.getExplicit().postOptionalIntegerProperty(body);
 }