1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package org.springframework.ws.soap;
18
19 import org.junit.Test;
20
21 import static org.junit.Assert.assertNotNull;
22
23 public abstract class AbstractSoapEnvelopeTestCase extends AbstractSoapElementTestCase {
24
25 protected SoapEnvelope soapEnvelope;
26
27 @Override
28 protected final SoapElement createSoapElement() throws Exception {
29 soapEnvelope = createSoapEnvelope();
30 return soapEnvelope;
31 }
32
33 protected abstract SoapEnvelope createSoapEnvelope() throws Exception;
34
35 @Test
36 public void testGetHeader() throws Exception {
37 SoapHeader header = soapEnvelope.getHeader();
38 assertNotNull("No header returned", header);
39 }
40
41 @Test
42 public void testGetBody() throws Exception {
43 SoapBody body = soapEnvelope.getBody();
44 assertNotNull("No body returned", body);
45 }
46 }