@Test public void dateTimeNull() throws Exception { try { client.getQueries().dateTimeNull(null); } catch (ServiceException ex) { Assert.assertTrue(ex.getMessage().contains("Parameter dateTimePath is required")); } }
@Test public void get200ModelA202Valid() throws Exception { try { client.getMultipleResponsesOperations().get200ModelA202Valid(); fail(); } catch (ServiceException ex) { Assert.assertEquals(202, ex.getResponse().code()); } }
@Test public void postRequiredStringHeader() throws Exception { try { client.getExplicit().postRequiredStringHeader(null); fail(); } catch (ServiceException ex) { Assert.assertTrue(ex.getMessage().contains("Parameter headerParameter is required")); } }
@Test public void getDefaultNone400None() throws Exception { try { client.getMultipleResponsesOperations().getDefaultNone400None(); fail(); } catch (ServiceException ex) { Assert.assertEquals(400, ex.getResponse().code()); } }
@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")); } }