protected void runTest() throws Exception { // create input parameter InputReportIncident input = new InputReportIncident(); input.setIncidentId("123"); input.setIncidentDate("2008-08-18"); input.setGivenName("Claus"); input.setFamilyName("Ibsen"); input.setSummary("Bla"); input.setDetails("Bla bla"); input.setEmail("*****@*****.**"); input.setPhone("0045 2962 7576"); // create the webservice client and send the request ReportIncidentEndpoint client = createCXFClient(); OutputReportIncident out = client.reportIncident(input); // assert we got a OK back assertEquals("OK;456", out.getCode()); // let some time pass to allow Camel to pickup the file and send it as an email Thread.sleep(3000); }
@Test public void testRendportIncident() throws Exception { assertNotNull(camelContext); // create input parameter InputReportIncident input = new InputReportIncident(); input.setIncidentId("123"); input.setIncidentDate("2008-08-18"); input.setGivenName("Claus"); input.setFamilyName("Ibsen"); input.setSummary("Bla"); input.setDetails("Bla bla"); input.setEmail("*****@*****.**"); input.setPhone("0045 2962 7576"); // create the webservice client and send the request ReportIncidentEndpoint client = createCXFClient(); OutputReportIncident out = client.reportIncident(input); // assert we got a OK back Assert.assertNotNull(out); Assert.assertEquals("0", out.getCode()); }