1 16 17 package org.apache.axis2.soap; 18 19 public class SOAPFaultRoleTest extends SOAPFaultTestCase { 20 21 protected SOAPFaultRole soap11FaultRole; 22 protected SOAPFaultRole soap12FaultRole; 23 protected SOAPFaultRole soap11FaultRoleWithParser; 24 protected SOAPFaultRole soap12FaultRoleWithParser; 25 26 public SOAPFaultRoleTest(String testName) { 27 super(testName); 28 } 29 30 protected void setUp() throws Exception { 31 super.setUp(); 32 soap11FaultRole = soap11Factory.createSOAPFaultRole(soap11Fault); 33 soap12FaultRole = soap12Factory.createSOAPFaultRole(soap12Fault); 34 soap11FaultRoleWithParser = soap11FaultWithParser.getRole(); 35 soap12FaultRoleWithParser = soap12FaultWithParser.getRole(); 36 } 37 38 public void testSOAP11SetRoleValue() { 40 soap11FaultRole.setRoleValue("This is only a test"); 41 assertTrue("SOAP 1.1 Fault Role Test : - After calling setRoleValue method, getRoleValue method returns incorrect value",soap11FaultRole.getRoleValue().equals("This is only a test")); 42 } 43 44 public void testSOAP11GetRoleValue() { 45 assertTrue("SOAP 1.1 Fault Role Test : - After creating SOAPFaultRole, it has a value",soap11FaultRole.getRoleValue().equals("")); 46 soap11FaultRole.setRoleValue("This is only a test"); 47 assertTrue("SOAP 1.1 Fault Role Test : - After calling setRoleValue method, getRoleValue method returns incorrect value",soap11FaultRole.getRoleValue().equals("This is only a test")); 48 } 49 50 public void testSOAP12SetRoleValue() { 52 soap12FaultRole.setRoleValue("This is only a test"); 53 assertTrue("SOAP 1.2 Fault Role Test : - After calling setRoleValue method, getRoleValue method returns incorrect value",soap12FaultRole.getRoleValue().equals("This is only a test")); 54 } 55 56 public void testSOAP12GetRoleValue() { 57 assertTrue("SOAP 1.2 Fault Role Test : - After creating SOAPFaultRole, it has a value",soap12FaultRole.getRoleValue().equals("")); 58 soap12FaultRole.setRoleValue("This is only a test"); 59 assertTrue("SOAP 1.2 Fault Role Test : - After calling setRoleValue method, getRoleValue method returns incorrect value",soap12FaultRole.getRoleValue().equals("This is only a test")); 60 } 61 62 public void testSOAP11GetRoleValueWithParser() { 64 assertTrue("SOAP 1.1 Fault Role Test With Parser : - getRoleValue method returns incorrect value",soap11FaultRoleWithParser.getRoleValue().equals("http://schemas.xmlsoap.org/soap/envelope/actor/ultimateReceiver")); 65 } 66 67 public void testSOAP12GetRoleValueWithParser() { 69 assertTrue("SOAP 1.2 Fault Role Test With Parser : - getRoleValue method returns incorrect value",soap12FaultRoleWithParser.getRoleValue().equals("ultimateReceiver")); 70 } 71 } 72 | Popular Tags |