@Test
 public void say_valid() {
   IHelloService target = new HelloValidationService();
   String responseXml =
       target.say(ClassLoader.getSystemResourceAsStream("hello-validation-valid.xml"));
   assertThat(extract(responseXml, "/helloValidationResponse/message/text()"), is("Hello, JAXB!"));
 }
Ejemplo n.º 2
0
 @Test
 public void hello() {
   IHelloService service = new HelloService();
   assertThat(service.hello("CXF"), is("Hello, CXF!"));
 }
 @Test(expected = RuntimeException.class)
 public void say_invalid() {
   IHelloService target = new HelloValidationService();
   target.say(ClassLoader.getSystemResourceAsStream("hello-validation-invalid.xml"));
 }