1 16 17 package org.apache.axis2.soap; 18 19 public class SOAPFaultValueTest extends SOAPFaultSubCodeTestCase { 20 21 public SOAPFaultValueTest(String testName) { 22 super(testName); 23 } 24 25 protected void setUp() throws Exception { 26 super.setUp(); 27 soap12FaultValueInFaultSubCode = soap12Factory.createSOAPFaultValue(soap12FaultSubCodeInCode); 28 } 29 30 public void testSOAP11setText() { 32 soap11FaultValue.setText("This is only Test"); 33 assertTrue("SOAP 1.1 Fault Value Test : - value text mismatch",soap11FaultValue.getText().equals("This is only Test")); 34 } 35 36 public void testSOAP11GetText() { 37 assertTrue("SOAP 1.1 Fault Value Test : - After creating Fault Value, it has a text",soap11FaultValue.getText().equals("")); 38 soap11FaultValue.setText("This is only Test"); 39 assertFalse("SOAP 1.1 Fault Value Test : - After calling setText method, getText method returns null",soap11FaultValue.getText().equals("")); 40 assertTrue("SOAP 1.1 Fault Value Test : - value text mismatch",soap11FaultValue.getText().equals("This is only Test")); 41 } 42 43 public void testSOAP12setTextInFaultCode() { 45 soap12FaultValueInFaultCode.setText("This is only Test"); 46 assertTrue("SOAP 1.2 Fault Value Test in Fault Code : - value text mismatch",soap12FaultValueInFaultCode.getText().equals("This is only Test")); 47 } 48 49 public void testSOAP12GetTextInFaultCode() { 50 assertTrue("SOAP 1.2 Fault Value Test in Fault Code : - After creating Fault Value, it has a text",soap12FaultValueInFaultCode.getText().equals("")); 51 soap12FaultValueInFaultCode.setText("This is only Test"); 52 assertFalse("SOAP 1.2 Fault Value Test in Fault Code : - After calling setText method, getText method returns null",soap12FaultValueInFaultCode.getText().equals("")); 53 assertTrue("SOAP 1.2 Fault Value Test in Fault Code : - value text mismatch",soap12FaultValueInFaultCode.getText().equals("This is only Test")); 54 } 55 56 public void testSOAP12setTextInFaultSubCode() { 58 soap12FaultValueInFaultSubCode.setText("This is only Test"); 59 assertTrue("SOAP 1.2 Fault Value Test in Fault SubCode : - value text mismatch",soap12FaultValueInFaultSubCode.getText().equals("This is only Test")); 60 } 61 62 public void testSOAP12GetTextInFaultSubCode() { 63 assertTrue("SOAP 1.2 Fault Value Test in Fault SubCode : - After creating Fault Value, it has a text",soap12FaultValueInFaultSubCode.getText().equals("")); 64 soap12FaultValueInFaultSubCode.setText("This is only Test"); 65 assertFalse("SOAP 1.2 Fault Value Test in Fault SubCode : - After calling setText method, getText method returns null",soap12FaultValueInFaultSubCode.getText().equals("")); 66 assertTrue("SOAP 1.2 Fault Value Test in Fault SubCode : - value text mismatch",soap12FaultValueInFaultSubCode.getText().equals("This is only Test")); 67 } 68 69 public void testSOAP11GetTextWithParser() { 71 assertTrue("SOAP 1.1 Fault Value Test with parser : - value text mismatch",soap11FaultValueWithParser.getText().equals("env:Sender")); 72 } 73 74 public void testSOAP12setTextWithParserInFaultCode() { 76 assertTrue("SOAP 1.2 Fault Value Test with parser in Fault Code : - value text mismatch",soap12FaultValueInFaultCodeWithParser.getText().equals("env:Sender")); 77 } 78 79 public void testSOAP12setTextWithParserInFaultSubCode() { 81 assertTrue("SOAP 1.2 Fault Value Test with parser in Fault SubCode : - value text mismatch",soap12FaultValueInFaultSubCodeWithParser.getText().equals("m:MessageTimeout In First SubCode")); 82 } 83 } 84 | Popular Tags |