1 16 17 package org.apache.axis2.soap; 18 19 public class SOAPFaultNodeTest extends SOAPFaultTestCase { 20 protected SOAPFaultNode soap11FaultNode; 21 protected SOAPFaultNode soap12FaultNode; 22 protected SOAPFaultNode soap12FaultNodeWithParser; 23 24 public SOAPFaultNodeTest(String testName) { 25 super(testName); 26 } 27 28 protected void setUp() throws Exception { 29 super.setUp(); 30 soap11FaultNode = soap11Factory.createSOAPFaultNode(soap11Fault); 31 soap12FaultNode = soap12Factory.createSOAPFaultNode(soap12Fault); 32 soap12FaultNodeWithParser = soap12FaultWithParser.getNode(); 33 } 34 35 public void testSOAP11SetNodeValue() { 37 soap11FaultNode.setNodeValue("This is only a test"); 38 assertTrue("SOAP 1.1 Fault Node Test : - After calling setNodeValue method, getNodeValue method returns incorrect value",soap11FaultNode.getNodeValue().equals("This is only a test")); 39 } 40 41 public void testSOAP11GetNodeValue() { 42 assertTrue("SOAP 1.1 Fault Node Test : - After creating SOAPFaultNode, it has a value",soap11FaultNode.getNodeValue().equals("")); 43 soap11FaultNode.setNodeValue("This is only a test"); 44 assertTrue("SOAP 1.1 Fault Node Test : - After calling setNodeValue method, getNodeValue method returns incorrect value",soap11FaultNode.getNodeValue().equals("This is only a test")); 45 } 46 47 public void testSOAP12SetNodeValue() { 49 soap12FaultNode.setNodeValue("This is only a test"); 50 assertTrue("SOAP 1.2 Fault Node Test : - After calling setNodeValue method, getNodeValue method returns incorrect value",soap12FaultNode.getNodeValue().equals("This is only a test")); 51 } 52 53 public void testSOAP12GetNodeValue() { 54 assertTrue("SOAP 1.2 Fault Node Test : - After creating SOAPFaultNode, it has a value",soap12FaultNode.getNodeValue().equals("")); 55 soap12FaultNode.setNodeValue("This is only a test"); 56 assertTrue("SOAP 1.2 Fault Node Test : - After calling setNodeValue method, getNodeValue method returns incorrect value",soap12FaultNode.getNodeValue().equals("This is only a test")); 57 } 58 59 public void testSOAP12GetNodeValueWithParser() { 61 assertTrue("SOAP 1.2 Fault Node Test With Parser : - getNodeValue method returns incorrect value",soap12FaultNodeWithParser.getNodeValue().equals("http://www.w3.org/2003/05/soap-envelope/role/ultimateReceiver")); 62 } 63 } 64 | Popular Tags |