1 16 17 package org.apache.axis2.soap; 18 19 public class SOAPFaultReasonTest extends SOAPFaultReasonTestCase { 20 21 public SOAPFaultReasonTest(String testName) { 22 super(testName); 23 } 24 25 protected void setUp() throws Exception { 26 super.setUp(); 27 } 28 29 public void testSOAP11SetSOAPText() { 31 soap11FaultReason.setSOAPText(soap11Factory.createSOAPFaultText(soap11FaultReason)); 32 assertFalse("SOAP 1.1 FaultReason Test : - After calling setSOAPText, getSOAPText returns null",soap11FaultReason.getSOAPText() == null); 33 try { 34 soap11FaultReason.setSOAPText(soap12Factory.createSOAPFaultText(soap12FaultReason)); 35 fail("SOAP12FaultText should not be added to SOAP11FaultReason"); 36 37 } catch (Exception e) { 38 assertTrue(true); 39 } 40 } 41 42 public void testSOAP11GetSOAPText() { 43 assertTrue("SOAP 1.1 FaultReason Test : - After creating SOAP11FaultReason, it has a SOAPFaultText",soap11FaultReason.getSOAPText()==null); 44 soap11FaultReason.setSOAPText(soap11Factory.createSOAPFaultText(soap11FaultReason)); 45 assertFalse("SOAP 1.1 FaultReason Test : - After calling setSOAPText, getSOAPText returns null",soap11FaultReason.getSOAPText()==null); 46 } 47 48 public void testSOAP12SetSOAPText() { 50 soap12FaultReason.setSOAPText(soap12Factory.createSOAPFaultText(soap12FaultReason)); 51 assertFalse("SOAP 1.2 FaultReason Test : - After calling setSOAPText, getSOAPText returns null",soap12FaultReason.getSOAPText() == null); 52 try { 53 soap12FaultReason.setSOAPText(soap11Factory.createSOAPFaultText(soap11FaultReason)); 54 fail("SOAP11FaultText should not be added to SOAP12FaultReason"); 55 } catch (Exception e) { 56 assertTrue(true); 57 } 58 } 59 60 public void testSOAP12GetSOAPText() { 61 assertTrue("SOAP 1.2 FaultReason Test : - After creating SOAP12FaultReason, it has a SOAPFaultText",soap12FaultReason.getSOAPText()==null); 62 soap12FaultReason.setSOAPText(soap12Factory.createSOAPFaultText(soap12FaultReason)); 63 assertFalse("SOAP 1.2 FaultReason Test : - After calling setSOAPText, getSOAPText returns null",soap12FaultReason.getSOAPText()==null); 64 } 65 66 public void testSOAP11GetSOAPTextWithParser() { 68 assertFalse("SOAP 1.1 FaultReason Test With Parser : - getSOAPText method returns null",soap11FaultReasonWithParser.getSOAPText()==null); 69 } 70 71 public void testSOAP12GetSOAPTextWithParser() { 73 assertFalse("SOAP 1.2 FaultReason Test With Parser : - getSOAPText method returns null",soap12FaultReasonWithParser.getSOAPText()==null); 74 } 75 } 76 | Popular Tags |