You are viewing a plain text version of this content. The canonical link for it is here.
Posted to axis-cvs@ws.apache.org by gd...@apache.org on 2005/07/11 19:49:08 UTC
svn commit: r210165 [19/20] - in /webservices/axis/trunk/java/modules:
addressing/src/org/apache/axis2/handlers/addressing/
addressing/test/org/apache/axis2/handlers/addressing/
addressing/test/org/apache/axis2/handlers/util/ core/src/org/apache/axis2/...
Modified: webservices/axis/trunk/java/modules/xml/test/org/apache/axis2/soap/SOAPFaultSubCodeTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/xml/test/org/apache/axis2/soap/SOAPFaultSubCodeTest.java?rev=210165&r1=210164&r2=210165&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/xml/test/org/apache/axis2/soap/SOAPFaultSubCodeTest.java (original)
+++ webservices/axis/trunk/java/modules/xml/test/org/apache/axis2/soap/SOAPFaultSubCodeTest.java Mon Jul 11 10:48:55 2005
@@ -31,90 +31,152 @@
//SOAP Fault SubCode(In Fault Code) Test (Programaticaly Created)
public void testSetValueInFaultCode() {
- soap12FaultSubCodeInCode.setValue(soap12Factory.createSOAPFaultValue(soap12FaultSubCodeInCode));
- assertFalse("SOAP 1.2 Subcode Test In Fault Code : - After calling setValue method, getValue method returns null", soap12FaultSubCodeInCode.getValue() == null);
+ soap12FaultSubCodeInCode.setValue(
+ soap12Factory.createSOAPFaultValue(soap12FaultSubCodeInCode));
+ assertFalse(
+ "SOAP 1.2 Subcode Test In Fault Code : - After calling setValue method, getValue method returns null",
+ soap12FaultSubCodeInCode.getValue() == null);
try {
- soap12FaultSubCodeInCode.setValue(soap12Factory.createSOAPFaultValue(soap12FaultCode));
+ soap12FaultSubCodeInCode.setValue(
+ soap12Factory.createSOAPFaultValue(soap12FaultCode));
} catch (SOAPProcessingException e) {
- fail("SOAP 1.2 SOAPFaultSubCode Test In FaultCode : - FaultValue whose parent is FaultCode should not be set in to FaultSubCode, as a child");
+ fail(
+ "SOAP 1.2 SOAPFaultSubCode Test In FaultCode : - FaultValue whose parent is FaultCode should not be set in to FaultSubCode, as a child");
}
}
public void testGetValueInFaultCode() {
- assertTrue("After creating SOAP12FaultSubCode In Fault Code, it has a FaultValue", soap12FaultSubCodeInCode.getValue() == null);
- soap12FaultSubCodeInCode.setValue(soap12Factory.createSOAPFaultValue(soap12FaultSubCodeInCode));
- assertFalse("SOAP 1.2 SOAPFaultSubCode Test In FaultCode : - After calling setValue method, getValue method returns null", soap12FaultSubCodeInCode.getValue() == null);
+ assertTrue(
+ "After creating SOAP12FaultSubCode In Fault Code, it has a FaultValue",
+ soap12FaultSubCodeInCode.getValue() == null);
+ soap12FaultSubCodeInCode.setValue(
+ soap12Factory.createSOAPFaultValue(soap12FaultSubCodeInCode));
+ assertFalse(
+ "SOAP 1.2 SOAPFaultSubCode Test In FaultCode : - After calling setValue method, getValue method returns null",
+ soap12FaultSubCodeInCode.getValue() == null);
}
public void testsetSubCodeInFaultCode() {
- soap12FaultSubCodeInCode.setSubCode(soap12Factory.createSOAPFaultSubCode(soap12FaultSubCodeInCode));
- assertFalse("SOAP 1.2 Subcode Test In Fault Code : - After calling setSubCode method, getSubCode method returns null", soap12FaultSubCodeInCode.getSubCode() == null);
+ soap12FaultSubCodeInCode.setSubCode(
+ soap12Factory.createSOAPFaultSubCode(soap12FaultSubCodeInCode));
+ assertFalse(
+ "SOAP 1.2 Subcode Test In Fault Code : - After calling setSubCode method, getSubCode method returns null",
+ soap12FaultSubCodeInCode.getSubCode() == null);
try {
- soap12FaultSubCodeInCode.setSubCode(soap12Factory.createSOAPFaultSubCode(soap12FaultCode));
+ soap12FaultSubCodeInCode.setSubCode(
+ soap12Factory.createSOAPFaultSubCode(soap12FaultCode));
} catch (SOAPProcessingException e) {
- fail("SOAP 1.2 SOAPFaultSubCode Test In FaultCode : - FaultSubCode whose parent is FaultCode should not be set in to FaultSubCode, as a child");
+ fail(
+ "SOAP 1.2 SOAPFaultSubCode Test In FaultCode : - FaultSubCode whose parent is FaultCode should not be set in to FaultSubCode, as a child");
}
}
public void testGetSubCodeInFaultCode() {
//soap12FaultSubCodeInCode has a SubCode because a SubCode was created in setUp method of super class
// assertTrue("After creating SOAP12FaultSubCode In Fault Code, it has a FaultSubCode",soap12FaultSubCodeInCode.getSubCode() == null);
- soap12FaultSubCodeInCode.setSubCode(soap12Factory.createSOAPFaultSubCode(soap12FaultSubCodeInCode));
- assertFalse("SOAP 1.2 SOAPFaultSubCode Test In FaultCode : - After calling setSubCode method, getSubCode method returns null", soap12FaultSubCodeInCode.getSubCode() == null);
+ soap12FaultSubCodeInCode.setSubCode(
+ soap12Factory.createSOAPFaultSubCode(soap12FaultSubCodeInCode));
+ assertFalse(
+ "SOAP 1.2 SOAPFaultSubCode Test In FaultCode : - After calling setSubCode method, getSubCode method returns null",
+ soap12FaultSubCodeInCode.getSubCode() == null);
}
//SOAP Fault SubCode(In Fault SubCode) Test (Programaticaly Created)
public void testSetValueInFaultSubCode() {
- soap12FaultSubCodeInSubCode.setValue(soap12Factory.createSOAPFaultValue(soap12FaultSubCodeInSubCode));
- assertFalse("SOAP 1.2 Subcode Test In Fault SubCode : - After calling setValue method, getValue method returns null", soap12FaultSubCodeInSubCode.getValue() == null);
+ soap12FaultSubCodeInSubCode.setValue(
+ soap12Factory.createSOAPFaultValue(soap12FaultSubCodeInSubCode));
+ assertFalse(
+ "SOAP 1.2 Subcode Test In Fault SubCode : - After calling setValue method, getValue method returns null",
+ soap12FaultSubCodeInSubCode.getValue() == null);
try {
- soap12FaultSubCodeInSubCode.setValue(soap12Factory.createSOAPFaultValue(soap12FaultCode));
+ soap12FaultSubCodeInSubCode.setValue(
+ soap12Factory.createSOAPFaultValue(soap12FaultCode));
} catch (SOAPProcessingException e) {
- fail("SOAP 1.2 SOAPFaultSubCode Test In FaultCode : - FaultValue whose parent is FaultCode should not be set in to FaultSubCode, as a child");
+ fail(
+ "SOAP 1.2 SOAPFaultSubCode Test In FaultCode : - FaultValue whose parent is FaultCode should not be set in to FaultSubCode, as a child");
}
}
public void testGetValueInFaultSubCode() {
- assertTrue("After creating SOAP12FaultSubCode In Fault SubCode, it has a Fault Value", soap12FaultSubCodeInSubCode.getValue() == null);
- soap12FaultSubCodeInSubCode.setValue(soap12Factory.createSOAPFaultValue(soap12FaultSubCodeInSubCode));
- assertFalse("SOAP 1.2 SOAPFaultSubCode Test In FaultSubCode : - After calling setValue method, getValue method returns null", soap12FaultSubCodeInSubCode.getValue() == null);
+ assertTrue(
+ "After creating SOAP12FaultSubCode In Fault SubCode, it has a Fault Value",
+ soap12FaultSubCodeInSubCode.getValue() == null);
+ soap12FaultSubCodeInSubCode.setValue(
+ soap12Factory.createSOAPFaultValue(soap12FaultSubCodeInSubCode));
+ assertFalse(
+ "SOAP 1.2 SOAPFaultSubCode Test In FaultSubCode : - After calling setValue method, getValue method returns null",
+ soap12FaultSubCodeInSubCode.getValue() == null);
}
public void testsetSubCodeInFaultSubCode() {
- soap12FaultSubCodeInSubCode.setSubCode(soap12Factory.createSOAPFaultSubCode(soap12FaultSubCodeInSubCode));
- assertFalse("SOAP 1.2 Subcode Test In Fault SubCode : - After calling setSubCode method, getSubCode method returns null", soap12FaultSubCodeInSubCode.getSubCode() == null);
+ soap12FaultSubCodeInSubCode.setSubCode(
+ soap12Factory.createSOAPFaultSubCode(
+ soap12FaultSubCodeInSubCode));
+ assertFalse(
+ "SOAP 1.2 Subcode Test In Fault SubCode : - After calling setSubCode method, getSubCode method returns null",
+ soap12FaultSubCodeInSubCode.getSubCode() == null);
try {
- soap12FaultSubCodeInSubCode.setSubCode(soap12Factory.createSOAPFaultSubCode(soap12FaultCode));
+ soap12FaultSubCodeInSubCode.setSubCode(
+ soap12Factory.createSOAPFaultSubCode(soap12FaultCode));
} catch (SOAPProcessingException e) {
- fail("SOAP 1.2 SOAPFaultSubCode Test In FaultSubCode : - FaultSubCode whose parent is FaultCode should not be set in to FaultSubCode, as a child");
+ fail(
+ "SOAP 1.2 SOAPFaultSubCode Test In FaultSubCode : - FaultSubCode whose parent is FaultCode should not be set in to FaultSubCode, as a child");
}
}
public void testGetSubCodeInFaultSubCode() {
- assertTrue("After creating SOAP12FaultSubCode In Fault SubCode, it has a FaultSubCode", soap12FaultSubCodeInSubCode.getSubCode() == null);
- soap12FaultSubCodeInSubCode.setSubCode(soap12Factory.createSOAPFaultSubCode(soap12FaultSubCodeInSubCode));
- assertFalse("SOAP 1.2 SOAPFaultSubCode Test In FaultSubCode : - After calling setSubCode method, getSubCode method returns null", soap12FaultSubCodeInSubCode.getSubCode() == null);
+ assertTrue(
+ "After creating SOAP12FaultSubCode In Fault SubCode, it has a FaultSubCode",
+ soap12FaultSubCodeInSubCode.getSubCode() == null);
+ soap12FaultSubCodeInSubCode.setSubCode(
+ soap12Factory.createSOAPFaultSubCode(
+ soap12FaultSubCodeInSubCode));
+ assertFalse(
+ "SOAP 1.2 SOAPFaultSubCode Test In FaultSubCode : - After calling setSubCode method, getSubCode method returns null",
+ soap12FaultSubCodeInSubCode.getSubCode() == null);
}
//SOAP Fault SubCode(In Fault Code) Test (With Parser)
public void testGetValueInFaultCodeWithParser() {
- assertFalse("SOAP 1.2 SOAPFaultSubCode Test In FaultCode With Parser : - getValue method returns null", soap12FaultSubCodeInFaultCodeWithParser.getValue() == null);
- assertTrue("SOAP 1.2 SOAPFaultSubCode Test In FaultCode With Parser : - Value text mismatch", soap12FaultSubCodeInFaultCodeWithParser.getValue().getText().equals("m:MessageTimeout In First SubCode"));
+ assertFalse(
+ "SOAP 1.2 SOAPFaultSubCode Test In FaultCode With Parser : - getValue method returns null",
+ soap12FaultSubCodeInFaultCodeWithParser.getValue() == null);
+ assertTrue(
+ "SOAP 1.2 SOAPFaultSubCode Test In FaultCode With Parser : - Value text mismatch",
+ soap12FaultSubCodeInFaultCodeWithParser.getValue().getText()
+ .equals("m:MessageTimeout In First SubCode"));
}
public void testGetSubCodeInFaultCodeWithParser() {
- assertFalse("SOAP 1.2 SOAPFaultSubCode Test In FaultCode With Parser : - getSubCode method returns null", soap12FaultSubCodeInFaultCodeWithParser.getSubCode() == null);
- assertTrue("SOAP 1.2 SOAPFaultSubCode Test In FaultCode With Parser : - SubCode local name mismatch", soap12FaultSubCodeInFaultCodeWithParser.getSubCode().getLocalName().equals(SOAP12Constants.SOAP_FAULT_SUB_CODE_LOCAL_NAME));
+ assertFalse(
+ "SOAP 1.2 SOAPFaultSubCode Test In FaultCode With Parser : - getSubCode method returns null",
+ soap12FaultSubCodeInFaultCodeWithParser.getSubCode() == null);
+ assertTrue(
+ "SOAP 1.2 SOAPFaultSubCode Test In FaultCode With Parser : - SubCode local name mismatch",
+ soap12FaultSubCodeInFaultCodeWithParser.getSubCode()
+ .getLocalName()
+ .equals(SOAP12Constants.SOAP_FAULT_SUB_CODE_LOCAL_NAME));
}
//SOAP Fault SubCode(In Fault SubCode) Test (With Parser)
public void testGetValueInFaultSubCodeWithParser() {
- assertFalse("SOAP 1.2 SOAPFaultSubCode Test In FaultSubCode With Parser : - getValue method returns null", soap12FaultSubCodeInSubCodeWithParser.getValue() == null);
- assertTrue("SOAP 1.2 SOAPFaultSubCode Test In FaultSubCode With Parser : - Value text mismatch", soap12FaultSubCodeInSubCodeWithParser.getValue().getText().equals("m:MessageTimeout In Second SubCode"));
+ assertFalse(
+ "SOAP 1.2 SOAPFaultSubCode Test In FaultSubCode With Parser : - getValue method returns null",
+ soap12FaultSubCodeInSubCodeWithParser.getValue() == null);
+ assertTrue(
+ "SOAP 1.2 SOAPFaultSubCode Test In FaultSubCode With Parser : - Value text mismatch",
+ soap12FaultSubCodeInSubCodeWithParser.getValue().getText()
+ .equals("m:MessageTimeout In Second SubCode"));
}
public void testGetSubCodeInFaultSubCodeWithParser() {
- assertFalse("SOAP 1.2 SOAPFaultSubCode Test In FaultSubCode With Parser : - getSubCode method returns null", soap12FaultSubCodeInSubCodeWithParser.getSubCode() == null);
- assertTrue("SOAP 1.2 SOAPFaultSubCode Test In FaultSubCode With Parser : - SubCode local name mismatch", soap12FaultSubCodeInSubCodeWithParser.getSubCode().getLocalName().equals(SOAP12Constants.SOAP_FAULT_SUB_CODE_LOCAL_NAME));
+ assertFalse(
+ "SOAP 1.2 SOAPFaultSubCode Test In FaultSubCode With Parser : - getSubCode method returns null",
+ soap12FaultSubCodeInSubCodeWithParser.getSubCode() == null);
+ assertTrue(
+ "SOAP 1.2 SOAPFaultSubCode Test In FaultSubCode With Parser : - SubCode local name mismatch",
+ soap12FaultSubCodeInSubCodeWithParser.getSubCode()
+ .getLocalName()
+ .equals(SOAP12Constants.SOAP_FAULT_SUB_CODE_LOCAL_NAME));
}
}
Modified: webservices/axis/trunk/java/modules/xml/test/org/apache/axis2/soap/SOAPFaultSubCodeTestCase.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/xml/test/org/apache/axis2/soap/SOAPFaultSubCodeTestCase.java?rev=210165&r1=210164&r2=210165&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/xml/test/org/apache/axis2/soap/SOAPFaultSubCodeTestCase.java (original)
+++ webservices/axis/trunk/java/modules/xml/test/org/apache/axis2/soap/SOAPFaultSubCodeTestCase.java Mon Jul 11 10:48:55 2005
@@ -39,17 +39,24 @@
super.setUp();
soap11FaultValue = soap11Factory.createSOAPFaultValue(soap11FaultCode);
- soap12FaultValueInFaultCode = soap12Factory.createSOAPFaultValue(soap12FaultCode);
- soap12FaultSubCodeInCode = soap12Factory.createSOAPFaultSubCode(soap12FaultCode);
+ soap12FaultValueInFaultCode =
+ soap12Factory.createSOAPFaultValue(soap12FaultCode);
+ soap12FaultSubCodeInCode =
+ soap12Factory.createSOAPFaultSubCode(soap12FaultCode);
- soap12FaultSubCodeInSubCode = soap12Factory.createSOAPFaultSubCode(soap12FaultSubCodeInCode);
+ soap12FaultSubCodeInSubCode =
+ soap12Factory.createSOAPFaultSubCode(soap12FaultSubCodeInCode);
soap11FaultValueWithParser = soap11FaultCodeWithParser.getValue();
- soap12FaultValueInFaultCodeWithParser = soap12FaultCodeWithParser.getValue();
- soap12FaultSubCodeInFaultCodeWithParser = soap12FaultCodeWithParser.getSubCode();
+ soap12FaultValueInFaultCodeWithParser =
+ soap12FaultCodeWithParser.getValue();
+ soap12FaultSubCodeInFaultCodeWithParser =
+ soap12FaultCodeWithParser.getSubCode();
- soap12FaultValueInFaultSubCodeWithParser = soap12FaultSubCodeInFaultCodeWithParser.getValue();
- soap12FaultSubCodeInSubCodeWithParser = soap12FaultSubCodeInFaultCodeWithParser.getSubCode();
+ soap12FaultValueInFaultSubCodeWithParser =
+ soap12FaultSubCodeInFaultCodeWithParser.getValue();
+ soap12FaultSubCodeInSubCodeWithParser =
+ soap12FaultSubCodeInFaultCodeWithParser.getSubCode();
}
}
Modified: webservices/axis/trunk/java/modules/xml/test/org/apache/axis2/soap/SOAPFaultTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/xml/test/org/apache/axis2/soap/SOAPFaultTest.java?rev=210165&r1=210164&r2=210165&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/xml/test/org/apache/axis2/soap/SOAPFaultTest.java (original)
+++ webservices/axis/trunk/java/modules/xml/test/org/apache/axis2/soap/SOAPFaultTest.java Mon Jul 11 10:48:55 2005
@@ -33,7 +33,9 @@
//SOAP 1.1 Fault Test (Programaticaly created)-----------------------------------------------------------------------------------
public void testSOAP11SetCode() {
soap11Fault.setCode(soap11Factory.createSOAPFaultCode(soap11Fault));
- assertNotNull("SOAP 1.1 Fault Test:- After calling setCode method, Fault has no code", soap11Fault.getCode());
+ assertNotNull(
+ "SOAP 1.1 Fault Test:- After calling setCode method, Fault has no code",
+ soap11Fault.getCode());
try {
soap11Fault.setCode(soap12Factory.createSOAPFaultCode(soap12Fault));
fail("SOAP12FaultCode should not not be set in to a SOAP11Fault");
@@ -42,16 +44,23 @@
}
public void testSOAP11GetCode() {
- assertTrue("SOAP 1.1 Fault Test:- After creating a SOAP11Fault, it has a code", soap11Fault.getCode() == null);
+ assertTrue(
+ "SOAP 1.1 Fault Test:- After creating a SOAP11Fault, it has a code",
+ soap11Fault.getCode() == null);
soap11Fault.setCode(soap11Factory.createSOAPFaultCode(soap11Fault));
- assertFalse("SOAP 1.1 Fault Test:- After calling setCode method, Fault has no code", soap11Fault.getCode() == null);
+ assertFalse(
+ "SOAP 1.1 Fault Test:- After calling setCode method, Fault has no code",
+ soap11Fault.getCode() == null);
}
public void testSOAP11SetReason() {
soap11Fault.setReason(soap11Factory.createSOAPFaultReason(soap11Fault));
- assertFalse("SOAP 1.1 Fault Test:- After calling setReason method, Fault has no reason", soap11Fault.getReason() == null);
+ assertFalse(
+ "SOAP 1.1 Fault Test:- After calling setReason method, Fault has no reason",
+ soap11Fault.getReason() == null);
try {
- soap11Fault.setReason(soap12Factory.createSOAPFaultReason(soap12Fault));
+ soap11Fault.setReason(
+ soap12Factory.createSOAPFaultReason(soap12Fault));
fail("SOAP12FaultReason should not be set in to a SOAP11Fault");
} catch (Exception e) {
@@ -60,14 +69,20 @@
}
public void testSOAP11GetReason() {
- assertTrue("SOAP 1.1 Fault Test:- After creating a SOAP11Fault, it has a reason", soap11Fault.getReason() == null);
+ assertTrue(
+ "SOAP 1.1 Fault Test:- After creating a SOAP11Fault, it has a reason",
+ soap11Fault.getReason() == null);
soap11Fault.setReason(soap11Factory.createSOAPFaultReason(soap11Fault));
- assertFalse("SOAP 1.1 Fault Test:- After calling setReason method, Fault has no reason", soap11Fault.getReason() == null);
+ assertFalse(
+ "SOAP 1.1 Fault Test:- After calling setReason method, Fault has no reason",
+ soap11Fault.getReason() == null);
}
public void testSOAP11SetNode() {
soap11Fault.setNode(soap11Factory.createSOAPFaultNode(soap11Fault));
- assertFalse("SOAP 1.1 Fault Test:- After calling setNode method, Fault has no node", soap11Fault.getNode() == null);
+ assertFalse(
+ "SOAP 1.1 Fault Test:- After calling setNode method, Fault has no node",
+ soap11Fault.getNode() == null);
try {
soap11Fault.setNode(soap12Factory.createSOAPFaultNode(soap12Fault));
fail("SOAP12FaultNode should not be set in to a SOAP11Fault");
@@ -79,14 +94,20 @@
}
public void testSOAP11GetNode() {
- assertTrue("SOAP 1.1 Fault Test:- After creating a SOAP11Fault, it has a node", soap11Fault.getNode() == null);
+ assertTrue(
+ "SOAP 1.1 Fault Test:- After creating a SOAP11Fault, it has a node",
+ soap11Fault.getNode() == null);
soap11Fault.setNode(soap11Factory.createSOAPFaultNode(soap11Fault));
- assertFalse("SOAP 1.1 Fault Test:- After calling setNode method, Fault has no node", soap11Fault.getNode() == null);
+ assertFalse(
+ "SOAP 1.1 Fault Test:- After calling setNode method, Fault has no node",
+ soap11Fault.getNode() == null);
}
public void testSOAP11SetRole() {
soap11Fault.setRole(soap11Factory.createSOAPFaultRole(soap11Fault));
- assertFalse("SOAP 1.1 Fault Test:- After calling setRole method, Fault has no role", soap11Fault.getRole() == null);
+ assertFalse(
+ "SOAP 1.1 Fault Test:- After calling setRole method, Fault has no role",
+ soap11Fault.getRole() == null);
try {
soap11Fault.setRole(soap12Factory.createSOAPFaultRole(soap12Fault));
fail("SOAP12FaultRole should not be set in to a SOAP11Fault");
@@ -96,16 +117,23 @@
}
public void testSOAP11GetRole() {
- assertTrue("SOAP 1.1 Fault Test:- After creating a SOAP11Fault, it has a role", soap11Fault.getRole() == null);
+ assertTrue(
+ "SOAP 1.1 Fault Test:- After creating a SOAP11Fault, it has a role",
+ soap11Fault.getRole() == null);
soap11Fault.setRole(soap11Factory.createSOAPFaultRole(soap11Fault));
- assertFalse("SOAP 1.1 Fault Test:- After calling setRole method, Fault has no role", soap11Fault.getRole() == null);
+ assertFalse(
+ "SOAP 1.1 Fault Test:- After calling setRole method, Fault has no role",
+ soap11Fault.getRole() == null);
}
public void testSOAP11SetDetail() {
soap11Fault.setDetail(soap11Factory.createSOAPFaultDetail(soap11Fault));
- assertFalse("SOAP 1.1 Fault Test:- After calling setDetail method, Fault has no detail", soap11Fault.getDetail() == null);
+ assertFalse(
+ "SOAP 1.1 Fault Test:- After calling setDetail method, Fault has no detail",
+ soap11Fault.getDetail() == null);
try {
- soap11Fault.setDetail(soap12Factory.createSOAPFaultDetail(soap12Fault));
+ soap11Fault.setDetail(
+ soap12Factory.createSOAPFaultDetail(soap12Fault));
fail("SOAP12FaultDetail should not be set in to a SOAP11Fault");
} catch (Exception e) {
assertTrue(true);
@@ -113,16 +141,24 @@
}
public void testSOAP11GetDetail() {
- assertTrue("SOAP 1.1 Fault Test:- After creating a SOAP11Fault, it has a detail", soap11Fault.getDetail() == null);
+ assertTrue(
+ "SOAP 1.1 Fault Test:- After creating a SOAP11Fault, it has a detail",
+ soap11Fault.getDetail() == null);
soap11Fault.setDetail(soap11Factory.createSOAPFaultDetail(soap11Fault));
- assertFalse("SOAP 1.1 Fault Test:- After calling setDetail method, Fault has no detail", soap11Fault.getDetail() == null);
+ assertFalse(
+ "SOAP 1.1 Fault Test:- After calling setDetail method, Fault has no detail",
+ soap11Fault.getDetail() == null);
}
//SOAP 1.2 Fault Test ((Programaticaly created)--------------------------------------------------------------------------------
public void testSOAP12SetCode() {
soap12Fault.setCode(soap12Factory.createSOAPFaultCode(soap12Fault));
- assertFalse("SOAP 1.2 Fault Test:- After calling setCode method, Fault has no code", soap12Fault.getCode() == null);
- assertTrue("SOAP 1.2 Fault Test:- Code local name mismatch", soap12Fault.getCode().getLocalName().equals(SOAP12Constants.SOAP_FAULT_CODE_LOCAL_NAME));
+ assertFalse(
+ "SOAP 1.2 Fault Test:- After calling setCode method, Fault has no code",
+ soap12Fault.getCode() == null);
+ assertTrue("SOAP 1.2 Fault Test:- Code local name mismatch",
+ soap12Fault.getCode().getLocalName().equals(
+ SOAP12Constants.SOAP_FAULT_CODE_LOCAL_NAME));
try {
soap12Fault.setCode(soap11Factory.createSOAPFaultCode(soap11Fault));
fail("SOAP11FaultCode should not be set in to a SOAP12Fault");
@@ -132,18 +168,29 @@
}
public void testSOAP12GetCode() {
- assertTrue("SOAP 1.2 Fault Test:- After creating a SOAP12Fault, it has a code", soap12Fault.getCode() == null);
+ assertTrue(
+ "SOAP 1.2 Fault Test:- After creating a SOAP12Fault, it has a code",
+ soap12Fault.getCode() == null);
soap12Fault.setCode(soap12Factory.createSOAPFaultCode(soap12Fault));
- assertFalse("SOAP 1.2 Fault Test:- After calling setCode method, Fault has no code", soap12Fault.getCode() == null);
- assertTrue("SOAP 1.2 Fault Test:- Fault code local name mismatch", soap12Fault.getCode().getLocalName().equals(SOAP12Constants.SOAP_FAULT_CODE_LOCAL_NAME));
+ assertFalse(
+ "SOAP 1.2 Fault Test:- After calling setCode method, Fault has no code",
+ soap12Fault.getCode() == null);
+ assertTrue("SOAP 1.2 Fault Test:- Fault code local name mismatch",
+ soap12Fault.getCode().getLocalName().equals(
+ SOAP12Constants.SOAP_FAULT_CODE_LOCAL_NAME));
}
public void testSOAP12SetReason() {
soap12Fault.setReason(soap12Factory.createSOAPFaultReason(soap12Fault));
- assertFalse("SOAP 1.2 Fault Test:- After calling setReason method, Fault has no reason", soap12Fault.getReason() == null);
- assertTrue("SOAP 1.2 Fault Test:- Fault reason local name mismatch", soap12Fault.getReason().getLocalName().equals(SOAP12Constants.SOAP_FAULT_REASON_LOCAL_NAME));
+ assertFalse(
+ "SOAP 1.2 Fault Test:- After calling setReason method, Fault has no reason",
+ soap12Fault.getReason() == null);
+ assertTrue("SOAP 1.2 Fault Test:- Fault reason local name mismatch",
+ soap12Fault.getReason().getLocalName().equals(
+ SOAP12Constants.SOAP_FAULT_REASON_LOCAL_NAME));
try {
- soap12Fault.setReason(soap11Factory.createSOAPFaultReason(soap11Fault));
+ soap12Fault.setReason(
+ soap11Factory.createSOAPFaultReason(soap11Fault));
fail("SOAP11FaultReason should not be set in to a SOAP12Fault");
} catch (Exception e) {
@@ -152,16 +199,26 @@
}
public void testSOAP12GetReason() {
- assertTrue("SOAP 1.2 Fault Test:- After creating a SOAP12Fault, it has a reason", soap12Fault.getReason() == null);
+ assertTrue(
+ "SOAP 1.2 Fault Test:- After creating a SOAP12Fault, it has a reason",
+ soap12Fault.getReason() == null);
soap12Fault.setReason(soap12Factory.createSOAPFaultReason(soap12Fault));
- assertFalse("SOAP 1.2 Fault Test:- After calling setReason method, Fault has no reason", soap12Fault.getReason() == null);
- assertTrue("SOAP 1.2 Fault Test:- Fault reason local name mismatch", soap12Fault.getReason().getLocalName().equals(SOAP12Constants.SOAP_FAULT_REASON_LOCAL_NAME));
+ assertFalse(
+ "SOAP 1.2 Fault Test:- After calling setReason method, Fault has no reason",
+ soap12Fault.getReason() == null);
+ assertTrue("SOAP 1.2 Fault Test:- Fault reason local name mismatch",
+ soap12Fault.getReason().getLocalName().equals(
+ SOAP12Constants.SOAP_FAULT_REASON_LOCAL_NAME));
}
public void testSOAP12SetNode() {
soap12Fault.setNode(soap12Factory.createSOAPFaultNode(soap12Fault));
- assertFalse("SOAP 1.2 Fault Test:- After calling setNode method, Fault has no node", soap12Fault.getNode() == null);
- assertTrue("SOAP 1.2 Fault Test:- Fault node local name mismatch", soap12Fault.getNode().getLocalName().equals(SOAP12Constants.SOAP_FAULT_NODE_LOCAL_NAME));
+ assertFalse(
+ "SOAP 1.2 Fault Test:- After calling setNode method, Fault has no node",
+ soap12Fault.getNode() == null);
+ assertTrue("SOAP 1.2 Fault Test:- Fault node local name mismatch",
+ soap12Fault.getNode().getLocalName().equals(
+ SOAP12Constants.SOAP_FAULT_NODE_LOCAL_NAME));
try {
soap12Fault.setNode(soap11Factory.createSOAPFaultNode(soap11Fault));
fail("SOAP11FaultNode should nott be set in to a SOAP12Fault");
@@ -172,16 +229,26 @@
}
public void testSOAP12GetNode() {
- assertTrue("SOAP 1.2 Fault Test:- After creating a SOAP12Fault, it has a node", soap12Fault.getNode() == null);
+ assertTrue(
+ "SOAP 1.2 Fault Test:- After creating a SOAP12Fault, it has a node",
+ soap12Fault.getNode() == null);
soap12Fault.setNode(soap12Factory.createSOAPFaultNode(soap12Fault));
- assertFalse("SOAP 1.2 Fault Test:- After calling setNode method, Fault has no node", soap12Fault.getNode() == null);
- assertTrue("SOAP 1.2 Fault Test:- Fault node local name mismatch", soap12Fault.getNode().getLocalName().equals(SOAP12Constants.SOAP_FAULT_NODE_LOCAL_NAME));
+ assertFalse(
+ "SOAP 1.2 Fault Test:- After calling setNode method, Fault has no node",
+ soap12Fault.getNode() == null);
+ assertTrue("SOAP 1.2 Fault Test:- Fault node local name mismatch",
+ soap12Fault.getNode().getLocalName().equals(
+ SOAP12Constants.SOAP_FAULT_NODE_LOCAL_NAME));
}
public void testSOAP12SetRole() {
soap12Fault.setRole(soap12Factory.createSOAPFaultRole(soap12Fault));
- assertFalse("SOAP 1.2 :- After calling setRole method, Fault has no role", soap12Fault.getRole() == null);
- assertTrue("SOAP 1.2 Fault Test:- Fault role local name mismatch", soap12Fault.getRole().getLocalName().equals(SOAP12Constants.SOAP_FAULT_ROLE_LOCAL_NAME));
+ assertFalse(
+ "SOAP 1.2 :- After calling setRole method, Fault has no role",
+ soap12Fault.getRole() == null);
+ assertTrue("SOAP 1.2 Fault Test:- Fault role local name mismatch",
+ soap12Fault.getRole().getLocalName().equals(
+ SOAP12Constants.SOAP_FAULT_ROLE_LOCAL_NAME));
try {
soap12Fault.setRole(soap11Factory.createSOAPFaultRole(soap11Fault));
fail("SOAP11FaultRole should not be set in to a SOAP12Fault");
@@ -191,18 +258,29 @@
}
public void testSOAP12GetRole() {
- assertTrue("SOAP 1.2 Fault Test:- After creating a SOAP11Fault, it has a role", soap12Fault.getRole() == null);
+ assertTrue(
+ "SOAP 1.2 Fault Test:- After creating a SOAP11Fault, it has a role",
+ soap12Fault.getRole() == null);
soap12Fault.setRole(soap12Factory.createSOAPFaultRole(soap12Fault));
- assertFalse("SOAP 1.2 Fault Test:- After calling setRole method, Fault has no role", soap12Fault.getRole() == null);
- assertTrue("SOAP 1.2 Fault Test:- Fault role local name mismatch", soap12Fault.getRole().getLocalName().equals(SOAP12Constants.SOAP_FAULT_ROLE_LOCAL_NAME));
+ assertFalse(
+ "SOAP 1.2 Fault Test:- After calling setRole method, Fault has no role",
+ soap12Fault.getRole() == null);
+ assertTrue("SOAP 1.2 Fault Test:- Fault role local name mismatch",
+ soap12Fault.getRole().getLocalName().equals(
+ SOAP12Constants.SOAP_FAULT_ROLE_LOCAL_NAME));
}
public void testSOAP12SetDetail() {
soap12Fault.setDetail(soap12Factory.createSOAPFaultDetail(soap12Fault));
- assertFalse("SOAP 1.2 Fault Test:- After calling setDetaile method, Fault has no detail", soap12Fault.getDetail() == null);
- assertTrue("SOAP 1.2 Fault Test:- Fault detail local name mismatch", soap12Fault.getDetail().getLocalName().equals(SOAP12Constants.SOAP_FAULT_DETAIL_LOCAL_NAME));
+ assertFalse(
+ "SOAP 1.2 Fault Test:- After calling setDetaile method, Fault has no detail",
+ soap12Fault.getDetail() == null);
+ assertTrue("SOAP 1.2 Fault Test:- Fault detail local name mismatch",
+ soap12Fault.getDetail().getLocalName().equals(
+ SOAP12Constants.SOAP_FAULT_DETAIL_LOCAL_NAME));
try {
- soap12Fault.setDetail(soap11Factory.createSOAPFaultDetail(soap11Fault));
+ soap12Fault.setDetail(
+ soap11Factory.createSOAPFaultDetail(soap11Fault));
fail("SOAP11FaultDetail should not be set in to a SOAP12Fault");
} catch (Exception e) {
@@ -211,49 +289,86 @@
}
public void testSOAP12GetDetail() {
- assertTrue("SOAP 1.2 Fault Test:- After creating a SOAP12Fault, it has a detail", soap12Fault.getDetail() == null);
+ assertTrue(
+ "SOAP 1.2 Fault Test:- After creating a SOAP12Fault, it has a detail",
+ soap12Fault.getDetail() == null);
soap12Fault.setDetail(soap12Factory.createSOAPFaultDetail(soap12Fault));
- assertFalse("SOAP 1.2 Fault Test:- After calling setDetail method, Fault has no detail", soap12Fault.getDetail() == null);
- assertTrue("SOAP 1.2 Fault Test:- Fault detail local name mismatch", soap12Fault.getDetail().getLocalName().equals(SOAP12Constants.SOAP_FAULT_DETAIL_LOCAL_NAME));
+ assertFalse(
+ "SOAP 1.2 Fault Test:- After calling setDetail method, Fault has no detail",
+ soap12Fault.getDetail() == null);
+ assertTrue("SOAP 1.2 Fault Test:- Fault detail local name mismatch",
+ soap12Fault.getDetail().getLocalName().equals(
+ SOAP12Constants.SOAP_FAULT_DETAIL_LOCAL_NAME));
}
//SOAP 1.1 Fault Test (With parser)
public void testSOAP11GetCodeWithParser() {
- assertFalse("SOAP 1.1 Fault Test with parser: - getCode method returns null", soap11FaultWithParser.getCode() == null);
+ assertFalse(
+ "SOAP 1.1 Fault Test with parser: - getCode method returns null",
+ soap11FaultWithParser.getCode() == null);
}
public void testSOAP11GetRoleWithParser() {
- assertFalse("SOAP 1.1 Fault Test with parser: - getRole method returns null", soap11FaultWithParser.getRole() == null);
+ assertFalse(
+ "SOAP 1.1 Fault Test with parser: - getRole method returns null",
+ soap11FaultWithParser.getRole() == null);
}
public void testSOAP11GetDetailWithParser() {
- assertFalse("SOAP 1.1 Fault Test with parser: - getDetail method returns null", soap11FaultWithParser.getDetail() == null);
+ assertFalse(
+ "SOAP 1.1 Fault Test with parser: - getDetail method returns null",
+ soap11FaultWithParser.getDetail() == null);
}
//SOAP 1.2 Fault Test (With parser)
public void testSOAP12GetCodeWithParser() {
- assertFalse("SOAP 1.2 Fault Test with parser: - getCode method returns null", soap12FaultWithParser.getCode() == null);
- assertTrue("SOAP 1.2 Fault Test with parser: - Fault code local name mismatch", soap12FaultWithParser.getCode().getLocalName().equals(SOAP12Constants.SOAP_FAULT_CODE_LOCAL_NAME));
+ assertFalse(
+ "SOAP 1.2 Fault Test with parser: - getCode method returns null",
+ soap12FaultWithParser.getCode() == null);
+ assertTrue(
+ "SOAP 1.2 Fault Test with parser: - Fault code local name mismatch",
+ soap12FaultWithParser.getCode().getLocalName().equals(
+ SOAP12Constants.SOAP_FAULT_CODE_LOCAL_NAME));
}
public void testSOAP12GetReasonWithParser() {
- assertFalse("SOAP 1.2 Fault Test with parser: - getReason method returns null", soap12FaultWithParser.getReason() == null);
- assertTrue("SOAP 1.2 Fault Test with parser: - Fault reason local name mismatch", soap12FaultWithParser.getReason().getLocalName().equals(SOAP12Constants.SOAP_FAULT_REASON_LOCAL_NAME));
+ assertFalse(
+ "SOAP 1.2 Fault Test with parser: - getReason method returns null",
+ soap12FaultWithParser.getReason() == null);
+ assertTrue(
+ "SOAP 1.2 Fault Test with parser: - Fault reason local name mismatch",
+ soap12FaultWithParser.getReason().getLocalName().equals(
+ SOAP12Constants.SOAP_FAULT_REASON_LOCAL_NAME));
}
public void testSOAP12GetNodeWithParser() {
- assertFalse("SOAP 1.2 Fault Test with parser: - getNode method returns null", soap12FaultWithParser.getNode() == null);
- assertTrue("SOAP 1.2 Fault Test with parser: - Fault node local name mismatch", soap12FaultWithParser.getNode().getLocalName().equals(SOAP12Constants.SOAP_FAULT_NODE_LOCAL_NAME));
+ assertFalse(
+ "SOAP 1.2 Fault Test with parser: - getNode method returns null",
+ soap12FaultWithParser.getNode() == null);
+ assertTrue(
+ "SOAP 1.2 Fault Test with parser: - Fault node local name mismatch",
+ soap12FaultWithParser.getNode().getLocalName().equals(
+ SOAP12Constants.SOAP_FAULT_NODE_LOCAL_NAME));
}
public void testSOAP12GetRoleWithParser() {
- assertFalse("SOAP 1.2 Fault Test with parser: - getRole method returns null", soap12FaultWithParser.getRole() == null);
- assertTrue("SOAP 1.2 Fault Test with parser: - Fault role local name mismatch", soap12FaultWithParser.getRole().getLocalName().equals(SOAP12Constants.SOAP_FAULT_ROLE_LOCAL_NAME));
+ assertFalse(
+ "SOAP 1.2 Fault Test with parser: - getRole method returns null",
+ soap12FaultWithParser.getRole() == null);
+ assertTrue(
+ "SOAP 1.2 Fault Test with parser: - Fault role local name mismatch",
+ soap12FaultWithParser.getRole().getLocalName().equals(
+ SOAP12Constants.SOAP_FAULT_ROLE_LOCAL_NAME));
}
public void testSOAP12GetDetailWithParser() {
- assertFalse("SOAP 1.2 Fault Test with parser: - getDetail method returns null", soap12FaultWithParser.getDetail() == null);
- assertTrue("SOAP 1.2 Fault Test with parser: - Fault detail local name mismatch", soap12FaultWithParser.getDetail().getLocalName().equals(SOAP12Constants.SOAP_FAULT_DETAIL_LOCAL_NAME));
+ assertFalse(
+ "SOAP 1.2 Fault Test with parser: - getDetail method returns null",
+ soap12FaultWithParser.getDetail() == null);
+ assertTrue(
+ "SOAP 1.2 Fault Test with parser: - Fault detail local name mismatch",
+ soap12FaultWithParser.getDetail().getLocalName().equals(
+ SOAP12Constants.SOAP_FAULT_DETAIL_LOCAL_NAME));
}
public void testMoreChildrenAddition() {
@@ -263,23 +378,38 @@
SOAPFactory soapFactory = OMAbstractFactory.getSOAP12Factory();
SOAPEnvelope envelope = soapFactory.getDefaultFaultEnvelope();
- assertNotNull("Default FaultEnvelope must have a SOAPFault in it", envelope.getBody().getFault());
- assertNotNull("Default FaultEnvelope must have a SOAPFaultCode in it", envelope.getBody().getFault().getCode());
- assertNotNull("Default FaultEnvelope must have a SOAPFaultCodeValue in it", envelope.getBody().getFault().getCode().getValue());
- assertNotNull("Default FaultEnvelope must have a SOAPFaultReason in it", envelope.getBody().getFault().getReason());
- assertNotNull("Default FaultEnvelope must have a SOAPFaultText in it", envelope.getBody().getFault().getReason().getSOAPText());
+ assertNotNull("Default FaultEnvelope must have a SOAPFault in it",
+ envelope.getBody().getFault());
+ assertNotNull(
+ "Default FaultEnvelope must have a SOAPFaultCode in it",
+ envelope.getBody().getFault().getCode());
+ assertNotNull(
+ "Default FaultEnvelope must have a SOAPFaultCodeValue in it",
+ envelope.getBody().getFault().getCode().getValue());
+ assertNotNull(
+ "Default FaultEnvelope must have a SOAPFaultReason in it",
+ envelope.getBody().getFault().getReason());
+ assertNotNull(
+ "Default FaultEnvelope must have a SOAPFaultText in it",
+ envelope.getBody().getFault().getReason().getSOAPText());
SOAPEnvelope soapEnvelope = soapFactory.getDefaultFaultEnvelope();
String errorCodeString = "Some Error occurred !!";
- soapEnvelope.getBody().getFault().getCode().getValue().setText(errorCodeString);
+ soapEnvelope.getBody().getFault().getCode().getValue().setText(
+ errorCodeString);
SOAPFaultCode code = soapEnvelope.getBody().getFault().getCode();
envelope.getBody().getFault().setCode(code);
- assertTrue("Parent Value of Code has not been set to new fault", code.getParent() == envelope.getBody().getFault());
- assertTrue("Parent Value of Code is still pointing to old fault", code.getParent() != soapEnvelope.getBody().getFault());
- assertNull("Old fault must not have a fault code", soapEnvelope.getBody().getFault().getCode());
- assertEquals("The SOAP Code value must be " + errorCodeString, errorCodeString, envelope.getBody().getFault().getCode().getValue().getText());
+ assertTrue("Parent Value of Code has not been set to new fault",
+ code.getParent() == envelope.getBody().getFault());
+ assertTrue("Parent Value of Code is still pointing to old fault",
+ code.getParent() != soapEnvelope.getBody().getFault());
+ assertNull("Old fault must not have a fault code",
+ soapEnvelope.getBody().getFault().getCode());
+ assertEquals("The SOAP Code value must be " + errorCodeString,
+ errorCodeString,
+ envelope.getBody().getFault().getCode().getValue().getText());
} catch (Exception e) {
fail(e.getMessage());
Modified: webservices/axis/trunk/java/modules/xml/test/org/apache/axis2/soap/SOAPFaultTestCase.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/xml/test/org/apache/axis2/soap/SOAPFaultTestCase.java?rev=210165&r1=210164&r2=210165&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/xml/test/org/apache/axis2/soap/SOAPFaultTestCase.java (original)
+++ webservices/axis/trunk/java/modules/xml/test/org/apache/axis2/soap/SOAPFaultTestCase.java Mon Jul 11 10:48:55 2005
@@ -30,8 +30,12 @@
protected void setUp() throws Exception {
super.setUp();
- soap11Fault = OMAbstractFactory.getSOAP11Factory().createSOAPFault(soap11Body);
- soap12Fault = OMAbstractFactory.getSOAP12Factory().createSOAPFault(soap12Body);
+ soap11Fault =
+ OMAbstractFactory.getSOAP11Factory().createSOAPFault(
+ soap11Body);
+ soap12Fault =
+ OMAbstractFactory.getSOAP12Factory().createSOAPFault(
+ soap12Body);
soap11FaultWithParser = soap11BodyWithParser.getFault();
soap12FaultWithParser = soap12BodyWithParser.getFault();
}
Modified: webservices/axis/trunk/java/modules/xml/test/org/apache/axis2/soap/SOAPFaultTextTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/xml/test/org/apache/axis2/soap/SOAPFaultTextTest.java?rev=210165&r1=210164&r2=210165&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/xml/test/org/apache/axis2/soap/SOAPFaultTextTest.java (original)
+++ webservices/axis/trunk/java/modules/xml/test/org/apache/axis2/soap/SOAPFaultTextTest.java Mon Jul 11 10:48:55 2005
@@ -40,77 +40,137 @@
//SOAP 1.1 Fault Text Test (Programaticaly Created)
public void testSOAP11SetLang() {
soap11FaultText.setLang("en");
- assertTrue("SOAP 1.1 Fault Text Test : - After calling setLang method, Lang attribute value mismatch", soap11FaultText.getLang().equals("en"));
- OMAttribute langAttribute = (OMAttribute) soap11FaultText.getAttributes().next();
- assertTrue("SOAP 1.1 Fault Text Test : - After calling setLang method, Lang attribute local name mismaatch", langAttribute.getLocalName().equals(SOAP12Constants.SOAP_FAULT_TEXT_LANG_ATTR_LOCAL_NAME));
- assertTrue("SOAP 1.1 Fault Text Test : - After calling setLang method, Lang attribute namespace prefix mismatch", langAttribute.getNamespace().getPrefix().equals(SOAP12Constants.SOAP_FAULT_TEXT_LANG_ATTR_NS_PREFIX));
- assertTrue("SOAP 1.1 Fault Text Test : - After calling setLang method, Lang attribute namespace uri mismatch", langAttribute.getNamespace().getName().equals(SOAP12Constants.SOAP_FAULT_TEXT_LANG_ATTR_NS_URI));
+ assertTrue(
+ "SOAP 1.1 Fault Text Test : - After calling setLang method, Lang attribute value mismatch",
+ soap11FaultText.getLang().equals("en"));
+ OMAttribute langAttribute = (OMAttribute) soap11FaultText.getAttributes()
+ .next();
+ assertTrue(
+ "SOAP 1.1 Fault Text Test : - After calling setLang method, Lang attribute local name mismaatch",
+ langAttribute.getLocalName().equals(
+ SOAP12Constants.SOAP_FAULT_TEXT_LANG_ATTR_LOCAL_NAME));
+ assertTrue(
+ "SOAP 1.1 Fault Text Test : - After calling setLang method, Lang attribute namespace prefix mismatch",
+ langAttribute.getNamespace().getPrefix().equals(
+ SOAP12Constants.SOAP_FAULT_TEXT_LANG_ATTR_NS_PREFIX));
+ assertTrue(
+ "SOAP 1.1 Fault Text Test : - After calling setLang method, Lang attribute namespace uri mismatch",
+ langAttribute.getNamespace().getName().equals(
+ SOAP12Constants.SOAP_FAULT_TEXT_LANG_ATTR_NS_URI));
}
public void testSOAP11GetLang() {
- assertNull("SOAP 1.1 Fault Text Test : - After creating SOAPFaultText, it has a Lnag attribute", soap11FaultText.getLang());
+ assertNull(
+ "SOAP 1.1 Fault Text Test : - After creating SOAPFaultText, it has a Lnag attribute",
+ soap11FaultText.getLang());
soap11FaultText.setLang("en");
- assertTrue("SOAP 1.1 Fault Text Test : - After calling setLang method, Lang attribute value mismatch", soap11FaultText.getLang().equals("en"));
+ assertTrue(
+ "SOAP 1.1 Fault Text Test : - After calling setLang method, Lang attribute value mismatch",
+ soap11FaultText.getLang().equals("en"));
}
public void testSOAP11SetText() {
soap11FaultText.setText("This is only a test");
- assertTrue("SOAP 1.1 Fault Text Test : - After calling setText method, getText method return incorrect string", soap11FaultText.getText().equals("This is only a test"));
+ assertTrue(
+ "SOAP 1.1 Fault Text Test : - After calling setText method, getText method return incorrect string",
+ soap11FaultText.getText().equals("This is only a test"));
}
public void testSOAP11GetText() {
- assertTrue("SOAP 1.1 Fault Text Test : - After creating SOAPFaultText, it has a text", soap11FaultText.getText().equals(""));
+ assertTrue(
+ "SOAP 1.1 Fault Text Test : - After creating SOAPFaultText, it has a text",
+ soap11FaultText.getText().equals(""));
soap11FaultText.setText("This is only a test");
- assertTrue("SOAP 1.1 Fault Text Test : - After calling setText method, getText method return incorrect string", soap11FaultText.getText().equals("This is only a test"));
+ assertTrue(
+ "SOAP 1.1 Fault Text Test : - After calling setText method, getText method return incorrect string",
+ soap11FaultText.getText().equals("This is only a test"));
}
//SOAP 1.2 Fault Text Test (Programaticaly Created)
public void testSOAP12SetLang() {
soap12FaultText.setLang("en");
- assertTrue("SOAP 1.2 Fault Text Test : - After calling setLang method, Lang attribute value mismatch", soap12FaultText.getLang().equals("en"));
- OMAttribute langAttribute = (OMAttribute) soap12FaultText.getAttributes().next();
- assertTrue("SOAP 1.2 Fault Text Test : - After calling setLang method, Lang attribute local name mismaatch", langAttribute.getLocalName().equals(SOAP12Constants.SOAP_FAULT_TEXT_LANG_ATTR_LOCAL_NAME));
- assertTrue("SOAP 1.2 Fault Text Test : - After calling setLang method, Lang attribute namespace prefix mismatch", langAttribute.getNamespace().getPrefix().equals(SOAP12Constants.SOAP_FAULT_TEXT_LANG_ATTR_NS_PREFIX));
- assertTrue("SOAP 1.2 Fault Text Test : - After calling setLang method, Lang attribute namespace uri mismatch", langAttribute.getNamespace().getName().equals(SOAP12Constants.SOAP_FAULT_TEXT_LANG_ATTR_NS_URI));
+ assertTrue(
+ "SOAP 1.2 Fault Text Test : - After calling setLang method, Lang attribute value mismatch",
+ soap12FaultText.getLang().equals("en"));
+ OMAttribute langAttribute = (OMAttribute) soap12FaultText.getAttributes()
+ .next();
+ assertTrue(
+ "SOAP 1.2 Fault Text Test : - After calling setLang method, Lang attribute local name mismaatch",
+ langAttribute.getLocalName().equals(
+ SOAP12Constants.SOAP_FAULT_TEXT_LANG_ATTR_LOCAL_NAME));
+ assertTrue(
+ "SOAP 1.2 Fault Text Test : - After calling setLang method, Lang attribute namespace prefix mismatch",
+ langAttribute.getNamespace().getPrefix().equals(
+ SOAP12Constants.SOAP_FAULT_TEXT_LANG_ATTR_NS_PREFIX));
+ assertTrue(
+ "SOAP 1.2 Fault Text Test : - After calling setLang method, Lang attribute namespace uri mismatch",
+ langAttribute.getNamespace().getName().equals(
+ SOAP12Constants.SOAP_FAULT_TEXT_LANG_ATTR_NS_URI));
}
public void testSOAP12GetLang() {
- assertNull("SOAP 1.2 Fault Text Test : - After creating SOAPFaultText, it has a Lnag attribute", soap12FaultText.getLang());
+ assertNull(
+ "SOAP 1.2 Fault Text Test : - After creating SOAPFaultText, it has a Lnag attribute",
+ soap12FaultText.getLang());
soap12FaultText.setLang("en");
- assertTrue("SOAP 1.2 Fault Text Test : - After calling setLang method, Lang attribute value mismatch", soap12FaultText.getLang().equals("en"));
+ assertTrue(
+ "SOAP 1.2 Fault Text Test : - After calling setLang method, Lang attribute value mismatch",
+ soap12FaultText.getLang().equals("en"));
}
public void testSOAP12SetText() {
soap12FaultText.setText("This is only a test");
- assertTrue("SOAP 1.2 Fault Text Test : - After calling setText method, getText method return incorrect string", soap12FaultText.getText().equals("This is only a test"));
+ assertTrue(
+ "SOAP 1.2 Fault Text Test : - After calling setText method, getText method return incorrect string",
+ soap12FaultText.getText().equals("This is only a test"));
}
public void testSOAP12GetText() {
- assertTrue("SOAP 1.2 Fault Text Test : - After creating SOAPFaultText, it has a text", soap12FaultText.getText().equals(""));
+ assertTrue(
+ "SOAP 1.2 Fault Text Test : - After creating SOAPFaultText, it has a text",
+ soap12FaultText.getText().equals(""));
soap12FaultText.setText("This is only a test");
- assertTrue("SOAP 1.2 Fault Text Test : - After calling setText method, getText method return incorrect string", soap12FaultText.getText().equals("This is only a test"));
+ assertTrue(
+ "SOAP 1.2 Fault Text Test : - After calling setText method, getText method return incorrect string",
+ soap12FaultText.getText().equals("This is only a test"));
}
//SOAP 1.1 Fault Text Test (With Parser)
public void testSOAP11GetTextWithParser() {
- assertTrue("SOAP 1.1 Fault Text Test With Parser : - getText method returns incorrect string", soap11FaultTextWithParser.getText().equals("Sender Timeout"));
+ assertTrue(
+ "SOAP 1.1 Fault Text Test With Parser : - getText method returns incorrect string",
+ soap11FaultTextWithParser.getText().equals("Sender Timeout"));
}
//SOAP 1.2 Fault Text Test (With Parser)
public void testSOAP12GetLangWithParser() {
- assertTrue("SOAP 1.2 Fault Text Test With Parser : - getLang method returns incorrect string", soap12FaultTextWithParser.getLang().equals("en"));
- OMAttribute langAttribute = (OMAttribute) soap12FaultTextWithParser.getAttributes().next();
- assertTrue("SOAP 1.2 Fault Text Test With Parser : - Lang attribute local name mismaatch", langAttribute.getLocalName().equals(SOAP12Constants.SOAP_FAULT_TEXT_LANG_ATTR_LOCAL_NAME));
- assertTrue("SOAP 1.2 Fault Text Test With Parser : - Lang attribute namespace prefix mismatch", langAttribute.getNamespace().getPrefix().equals(SOAP12Constants.SOAP_FAULT_TEXT_LANG_ATTR_NS_PREFIX));
- assertTrue("SOAP 1.2 Fault Text Test With Parser : - Lang attribute namespace uri mismatch", langAttribute.getNamespace().getName().equals(SOAP12Constants.SOAP_FAULT_TEXT_LANG_ATTR_NS_URI));
+ assertTrue(
+ "SOAP 1.2 Fault Text Test With Parser : - getLang method returns incorrect string",
+ soap12FaultTextWithParser.getLang().equals("en"));
+ OMAttribute langAttribute = (OMAttribute) soap12FaultTextWithParser.getAttributes()
+ .next();
+ assertTrue(
+ "SOAP 1.2 Fault Text Test With Parser : - Lang attribute local name mismaatch",
+ langAttribute.getLocalName().equals(
+ SOAP12Constants.SOAP_FAULT_TEXT_LANG_ATTR_LOCAL_NAME));
+ assertTrue(
+ "SOAP 1.2 Fault Text Test With Parser : - Lang attribute namespace prefix mismatch",
+ langAttribute.getNamespace().getPrefix().equals(
+ SOAP12Constants.SOAP_FAULT_TEXT_LANG_ATTR_NS_PREFIX));
+ assertTrue(
+ "SOAP 1.2 Fault Text Test With Parser : - Lang attribute namespace uri mismatch",
+ langAttribute.getNamespace().getName().equals(
+ SOAP12Constants.SOAP_FAULT_TEXT_LANG_ATTR_NS_URI));
}
public void testSOAP12GetTextWithParser() {
- assertTrue("SOAP 1.2 Fault Text Test With Parser : - getText method returns incorrect string", soap12FaultTextWithParser.getText().equals("Sender Timeout"));
+ assertTrue(
+ "SOAP 1.2 Fault Text Test With Parser : - getText method returns incorrect string",
+ soap12FaultTextWithParser.getText().equals("Sender Timeout"));
}
}
Modified: webservices/axis/trunk/java/modules/xml/test/org/apache/axis2/soap/SOAPFaultValueTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/xml/test/org/apache/axis2/soap/SOAPFaultValueTest.java?rev=210165&r1=210164&r2=210165&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/xml/test/org/apache/axis2/soap/SOAPFaultValueTest.java (original)
+++ webservices/axis/trunk/java/modules/xml/test/org/apache/axis2/soap/SOAPFaultValueTest.java Mon Jul 11 10:48:55 2005
@@ -24,60 +24,95 @@
protected void setUp() throws Exception {
super.setUp();
- soap12FaultValueInFaultSubCode = soap12Factory.createSOAPFaultValue(soap12FaultSubCodeInCode);
+ soap12FaultValueInFaultSubCode =
+ soap12Factory.createSOAPFaultValue(soap12FaultSubCodeInCode);
}
//SOAP 1.1 Fault Value Test (Programaticaly Created)
public void testSOAP11setText() {
soap11FaultValue.setText("This is only Test");
- assertTrue("SOAP 1.1 Fault Value Test : - value text mismatch", soap11FaultValue.getText().equals("This is only Test"));
+ assertTrue("SOAP 1.1 Fault Value Test : - value text mismatch",
+ soap11FaultValue.getText().equals("This is only Test"));
}
public void testSOAP11GetText() {
- assertTrue("SOAP 1.1 Fault Value Test : - After creating Fault Value, it has a text", soap11FaultValue.getText().equals(""));
+ assertTrue(
+ "SOAP 1.1 Fault Value Test : - After creating Fault Value, it has a text",
+ soap11FaultValue.getText().equals(""));
soap11FaultValue.setText("This is only Test");
- assertFalse("SOAP 1.1 Fault Value Test : - After calling setText method, getText method returns null", soap11FaultValue.getText().equals(""));
- assertTrue("SOAP 1.1 Fault Value Test : - value text mismatch", soap11FaultValue.getText().equals("This is only Test"));
+ assertFalse(
+ "SOAP 1.1 Fault Value Test : - After calling setText method, getText method returns null",
+ soap11FaultValue.getText().equals(""));
+ assertTrue("SOAP 1.1 Fault Value Test : - value text mismatch",
+ soap11FaultValue.getText().equals("This is only Test"));
}
//SOAP 1.2 Fault Value(In Fault Code) Test (Programaticaly Created)
public void testSOAP12setTextInFaultCode() {
soap12FaultValueInFaultCode.setText("This is only Test");
- assertTrue("SOAP 1.2 Fault Value Test in Fault Code : - value text mismatch", soap12FaultValueInFaultCode.getText().equals("This is only Test"));
+ assertTrue(
+ "SOAP 1.2 Fault Value Test in Fault Code : - value text mismatch",
+ soap12FaultValueInFaultCode.getText().equals(
+ "This is only Test"));
}
public void testSOAP12GetTextInFaultCode() {
- assertTrue("SOAP 1.2 Fault Value Test in Fault Code : - After creating Fault Value, it has a text", soap12FaultValueInFaultCode.getText().equals(""));
+ assertTrue(
+ "SOAP 1.2 Fault Value Test in Fault Code : - After creating Fault Value, it has a text",
+ soap12FaultValueInFaultCode.getText().equals(""));
soap12FaultValueInFaultCode.setText("This is only Test");
- assertFalse("SOAP 1.2 Fault Value Test in Fault Code : - After calling setText method, getText method returns null", soap12FaultValueInFaultCode.getText().equals(""));
- assertTrue("SOAP 1.2 Fault Value Test in Fault Code : - value text mismatch", soap12FaultValueInFaultCode.getText().equals("This is only Test"));
+ assertFalse(
+ "SOAP 1.2 Fault Value Test in Fault Code : - After calling setText method, getText method returns null",
+ soap12FaultValueInFaultCode.getText().equals(""));
+ assertTrue(
+ "SOAP 1.2 Fault Value Test in Fault Code : - value text mismatch",
+ soap12FaultValueInFaultCode.getText().equals(
+ "This is only Test"));
}
//SOAP 1.2 Fault Value(In Fault SubCode) Test (Programaticaly Created)
public void testSOAP12setTextInFaultSubCode() {
soap12FaultValueInFaultSubCode.setText("This is only Test");
- assertTrue("SOAP 1.2 Fault Value Test in Fault SubCode : - value text mismatch", soap12FaultValueInFaultSubCode.getText().equals("This is only Test"));
+ assertTrue(
+ "SOAP 1.2 Fault Value Test in Fault SubCode : - value text mismatch",
+ soap12FaultValueInFaultSubCode.getText().equals(
+ "This is only Test"));
}
public void testSOAP12GetTextInFaultSubCode() {
- assertTrue("SOAP 1.2 Fault Value Test in Fault SubCode : - After creating Fault Value, it has a text", soap12FaultValueInFaultSubCode.getText().equals(""));
+ assertTrue(
+ "SOAP 1.2 Fault Value Test in Fault SubCode : - After creating Fault Value, it has a text",
+ soap12FaultValueInFaultSubCode.getText().equals(""));
soap12FaultValueInFaultSubCode.setText("This is only Test");
- assertFalse("SOAP 1.2 Fault Value Test in Fault SubCode : - After calling setText method, getText method returns null", soap12FaultValueInFaultSubCode.getText().equals(""));
- assertTrue("SOAP 1.2 Fault Value Test in Fault SubCode : - value text mismatch", soap12FaultValueInFaultSubCode.getText().equals("This is only Test"));
+ assertFalse(
+ "SOAP 1.2 Fault Value Test in Fault SubCode : - After calling setText method, getText method returns null",
+ soap12FaultValueInFaultSubCode.getText().equals(""));
+ assertTrue(
+ "SOAP 1.2 Fault Value Test in Fault SubCode : - value text mismatch",
+ soap12FaultValueInFaultSubCode.getText().equals(
+ "This is only Test"));
}
//SOAP 1.1 Fault Value Test (With Parser)
public void testSOAP11GetTextWithParser() {
- assertTrue("SOAP 1.1 Fault Value Test with parser : - value text mismatch", soap11FaultValueWithParser.getText().equals("env:Sender"));
+ assertTrue(
+ "SOAP 1.1 Fault Value Test with parser : - value text mismatch",
+ soap11FaultValueWithParser.getText().equals("env:Sender"));
}
//SOAP 1.2 Fault Value(In Fault Code) Test (With Parser)
public void testSOAP12setTextWithParserInFaultCode() {
- assertTrue("SOAP 1.2 Fault Value Test with parser in Fault Code : - value text mismatch", soap12FaultValueInFaultCodeWithParser.getText().equals("env:Sender"));
+ assertTrue(
+ "SOAP 1.2 Fault Value Test with parser in Fault Code : - value text mismatch",
+ soap12FaultValueInFaultCodeWithParser.getText().equals(
+ "env:Sender"));
}
//SOAP 1.2 Fault Value(In Fault SubCode) Test (With Parser)
public void testSOAP12setTextWithParserInFaultSubCode() {
- assertTrue("SOAP 1.2 Fault Value Test with parser in Fault SubCode : - value text mismatch", soap12FaultValueInFaultSubCodeWithParser.getText().equals("m:MessageTimeout In First SubCode"));
+ assertTrue(
+ "SOAP 1.2 Fault Value Test with parser in Fault SubCode : - value text mismatch",
+ soap12FaultValueInFaultSubCodeWithParser.getText().equals(
+ "m:MessageTimeout In First SubCode"));
}
}
Modified: webservices/axis/trunk/java/modules/xml/test/org/apache/axis2/soap/SOAPHeaderBlockTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/xml/test/org/apache/axis2/soap/SOAPHeaderBlockTest.java?rev=210165&r1=210164&r2=210165&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/xml/test/org/apache/axis2/soap/SOAPHeaderBlockTest.java (original)
+++ webservices/axis/trunk/java/modules/xml/test/org/apache/axis2/soap/SOAPHeaderBlockTest.java Mon Jul 11 10:48:55 2005
@@ -34,8 +34,14 @@
protected void setUp() throws Exception {
super.setUp();
- soap11HeaderBlock = soap11Factory.createSOAPHeaderBlock("testHeaderBlock", namespace, soap11Header);
- soap12HeaderBlock = soap12Factory.createSOAPHeaderBlock("testHeaderBlock", namespace, soap12Header);
+ soap11HeaderBlock =
+ soap11Factory.createSOAPHeaderBlock("testHeaderBlock",
+ namespace,
+ soap11Header);
+ soap12HeaderBlock =
+ soap12Factory.createSOAPHeaderBlock("testHeaderBlock",
+ namespace,
+ soap12Header);
Iterator iterator = soap11HeaderWithParser.examineAllHeaderBlocks();
iterator.next();
soap11HeaderBlock1WithParser = (SOAPHeaderBlock) iterator.next();
@@ -55,76 +61,124 @@
//SOAP 1.1 SOAPHeaderBlock Test (Programaticaly Created)
public void testSOAP11SetRole() {
- soap11HeaderBlock.setRole("http://schemas.xmlsoap.org/soap/envelope/actor/next");
- assertTrue("SOAP 1.1 HeaderBlock Test : - After calling setRole method, getRole method returns incorrect role value", soap11HeaderBlock.getRole().equals("http://schemas.xmlsoap.org/soap/envelope/actor/next"));
+ soap11HeaderBlock.setRole(
+ "http://schemas.xmlsoap.org/soap/envelope/actor/next");
+ assertTrue(
+ "SOAP 1.1 HeaderBlock Test : - After calling setRole method, getRole method returns incorrect role value",
+ soap11HeaderBlock.getRole().equals(
+ "http://schemas.xmlsoap.org/soap/envelope/actor/next"));
try {
soap11HeaderBlock.setRole("Any Value");
} catch (Exception e) {
- fail("SOAP 1.1 HeaderBlock Test : - role value can not be set to any value");
+ fail(
+ "SOAP 1.1 HeaderBlock Test : - role value can not be set to any value");
}
}
public void testSOAP11GetRole() {
- assertTrue("SOAP 1.1 HeaderBlock Test : - After creating SOAPHeaderBlock, it has a role", soap11HeaderBlock.getRole() == null);
- soap11HeaderBlock.setRole("http://schemas.xmlsoap.org/soap/envelope/actor/next");
- assertTrue("SOAP 1.1 HeaderBlock Test : - After calling setRole method, getRole method returns incorrect role value", soap11HeaderBlock.getRole().equals("http://schemas.xmlsoap.org/soap/envelope/actor/next"));
+ assertTrue(
+ "SOAP 1.1 HeaderBlock Test : - After creating SOAPHeaderBlock, it has a role",
+ soap11HeaderBlock.getRole() == null);
+ soap11HeaderBlock.setRole(
+ "http://schemas.xmlsoap.org/soap/envelope/actor/next");
+ assertTrue(
+ "SOAP 1.1 HeaderBlock Test : - After calling setRole method, getRole method returns incorrect role value",
+ soap11HeaderBlock.getRole().equals(
+ "http://schemas.xmlsoap.org/soap/envelope/actor/next"));
}
public void testSOAP11SetMustUnderstand() {
soap11HeaderBlock.setMustUnderstand(true);
- assertTrue("SOAP 1.1 HeaderBlock Test : - After setting MustUnderstand true calling setMustUnderstand method , getMustUnderstand method returns false", soap11HeaderBlock.getMustUnderstand());
+ assertTrue(
+ "SOAP 1.1 HeaderBlock Test : - After setting MustUnderstand true calling setMustUnderstand method , getMustUnderstand method returns false",
+ soap11HeaderBlock.getMustUnderstand());
soap11HeaderBlock.setMustUnderstand(false);
- assertFalse("SOAP 1.1 HeaderBlock Test : - After setting MustUnderstand false calling setMustUnderstand method , getMustUnderstand method returns true", soap11HeaderBlock.getMustUnderstand());
+ assertFalse(
+ "SOAP 1.1 HeaderBlock Test : - After setting MustUnderstand false calling setMustUnderstand method , getMustUnderstand method returns true",
+ soap11HeaderBlock.getMustUnderstand());
soap11HeaderBlock.setMustUnderstand("1");
- assertTrue("SOAP 1.1 HeaderBlock Test : - After setting MustUnderstand \"1\" calling setMustUnderstand method , getMustUnderstand method returns false", soap11HeaderBlock.getMustUnderstand());
+ assertTrue(
+ "SOAP 1.1 HeaderBlock Test : - After setting MustUnderstand \"1\" calling setMustUnderstand method , getMustUnderstand method returns false",
+ soap11HeaderBlock.getMustUnderstand());
soap11HeaderBlock.setMustUnderstand("0");
- assertFalse("SOAP 1.1 HeaderBlock Test : - After setting MustUnderstand \"0\" calling setMustUnderstand method , getMustUnderstand method returns true", soap11HeaderBlock.getMustUnderstand());
+ assertFalse(
+ "SOAP 1.1 HeaderBlock Test : - After setting MustUnderstand \"0\" calling setMustUnderstand method , getMustUnderstand method returns true",
+ soap11HeaderBlock.getMustUnderstand());
try {
soap11HeaderBlock.setMustUnderstand("true");
} catch (Exception e) {
- fail("SOAP 1.1 HeaderBlock Test : - MustUnderstatnd value can not be set to any value rather than 1 or 0");
+ fail(
+ "SOAP 1.1 HeaderBlock Test : - MustUnderstatnd value can not be set to any value rather than 1 or 0");
}
}
public void testSOAP11GetMustUnderstand() {
- assertFalse("SOAP 1.1 HeaderBlock Test : - After creating SOAPHeaderBlock, default MustUnderstand value true", soap11HeaderBlock.getMustUnderstand());
+ assertFalse(
+ "SOAP 1.1 HeaderBlock Test : - After creating SOAPHeaderBlock, default MustUnderstand value true",
+ soap11HeaderBlock.getMustUnderstand());
soap11HeaderBlock.setMustUnderstand(true);
- assertTrue("SOAP 1.1 HeaderBlock Test : - After setting MustUnderstand true calling setMustUnderstand method , getMustUnderstand method returns false", soap11HeaderBlock.getMustUnderstand());
+ assertTrue(
+ "SOAP 1.1 HeaderBlock Test : - After setting MustUnderstand true calling setMustUnderstand method , getMustUnderstand method returns false",
+ soap11HeaderBlock.getMustUnderstand());
}
//SOAP 1.2 SOAPHeaderBlock Test (Programaticaly Created)
public void testSOAP12SetRole() {
- soap12HeaderBlock.setRole("http://www.w3.org/2003/05/soap-envelope/role/ultimateReceiver");
- assertTrue("SOAP 1.2 HeaderBlock Test : - After calling setRole method, getRole method returns incorrect role value", soap12HeaderBlock.getRole().equals("http://www.w3.org/2003/05/soap-envelope/role/ultimateReceiver"));
+ soap12HeaderBlock.setRole(
+ "http://www.w3.org/2003/05/soap-envelope/role/ultimateReceiver");
+ assertTrue(
+ "SOAP 1.2 HeaderBlock Test : - After calling setRole method, getRole method returns incorrect role value",
+ soap12HeaderBlock.getRole().equals(
+ "http://www.w3.org/2003/05/soap-envelope/role/ultimateReceiver"));
try {
soap12HeaderBlock.setRole("Any Value");
} catch (Exception e) {
- fail("SOAP 1.2 HeaderBlock Test : - role value can not be set to any value");
+ fail(
+ "SOAP 1.2 HeaderBlock Test : - role value can not be set to any value");
}
}
public void testSOAP12GetRole() {
- assertTrue("SOAP 1.2 HeaderBlock Test : - After creating SOAPHeaderBlock, it has a role", soap12HeaderBlock.getRole() == null);
- soap12HeaderBlock.setRole("http://www.w3.org/2003/05/soap-envelope/role/ultimateReceiver");
- assertTrue("SOAP 1.2 HeaderBlock Test : - After calling setRole method, getRole method returns incorrect role value", soap12HeaderBlock.getRole().equals("http://www.w3.org/2003/05/soap-envelope/role/ultimateReceiver"));
+ assertTrue(
+ "SOAP 1.2 HeaderBlock Test : - After creating SOAPHeaderBlock, it has a role",
+ soap12HeaderBlock.getRole() == null);
+ soap12HeaderBlock.setRole(
+ "http://www.w3.org/2003/05/soap-envelope/role/ultimateReceiver");
+ assertTrue(
+ "SOAP 1.2 HeaderBlock Test : - After calling setRole method, getRole method returns incorrect role value",
+ soap12HeaderBlock.getRole().equals(
+ "http://www.w3.org/2003/05/soap-envelope/role/ultimateReceiver"));
}
public void testSOAP12SetMustUnderstand() {
soap12HeaderBlock.setMustUnderstand(true);
- assertTrue("SOAP 1.2 HeaderBlock Test : - After setting MustUnderstand true calling setMustUnderstand method , getMustUnderstand method returns false", soap12HeaderBlock.getMustUnderstand());
+ assertTrue(
+ "SOAP 1.2 HeaderBlock Test : - After setting MustUnderstand true calling setMustUnderstand method , getMustUnderstand method returns false",
+ soap12HeaderBlock.getMustUnderstand());
soap12HeaderBlock.setMustUnderstand(false);
- assertFalse("SOAP 1.2 HeaderBlock Test : - After setting MustUnderstand false calling setMustUnderstand method , getMustUnderstand method returns true", soap12HeaderBlock.getMustUnderstand());
+ assertFalse(
+ "SOAP 1.2 HeaderBlock Test : - After setting MustUnderstand false calling setMustUnderstand method , getMustUnderstand method returns true",
+ soap12HeaderBlock.getMustUnderstand());
soap12HeaderBlock.setMustUnderstand("true");
- assertTrue("SOAP 1.2 HeaderBlock Test : - After setting MustUnderstand \"true\" calling setMustUnderstand method , getMustUnderstand method returns false", soap12HeaderBlock.getMustUnderstand());
+ assertTrue(
+ "SOAP 1.2 HeaderBlock Test : - After setting MustUnderstand \"true\" calling setMustUnderstand method , getMustUnderstand method returns false",
+ soap12HeaderBlock.getMustUnderstand());
soap12HeaderBlock.setMustUnderstand("false");
- assertFalse("SOAP 1.2 HeaderBlock Test : - After setting MustUnderstand \"false\" calling setMustUnderstand method , getMustUnderstand method returns true", soap12HeaderBlock.getMustUnderstand());
+ assertFalse(
+ "SOAP 1.2 HeaderBlock Test : - After setting MustUnderstand \"false\" calling setMustUnderstand method , getMustUnderstand method returns true",
+ soap12HeaderBlock.getMustUnderstand());
soap12HeaderBlock.setMustUnderstand("1");
- assertTrue("SOAP 1.2 HeaderBlock Test : - After setting MustUnderstand \"1\" calling setMustUnderstand method , getMustUnderstand method returns false", soap12HeaderBlock.getMustUnderstand());
+ assertTrue(
+ "SOAP 1.2 HeaderBlock Test : - After setting MustUnderstand \"1\" calling setMustUnderstand method , getMustUnderstand method returns false",
+ soap12HeaderBlock.getMustUnderstand());
soap12HeaderBlock.setMustUnderstand("0");
- assertFalse("SOAP 1.2 HeaderBlock Test : - After setting MustUnderstand \"0\" calling setMustUnderstand method , getMustUnderstand method returns true", soap12HeaderBlock.getMustUnderstand());
+ assertFalse(
+ "SOAP 1.2 HeaderBlock Test : - After setting MustUnderstand \"0\" calling setMustUnderstand method , getMustUnderstand method returns true",
+ soap12HeaderBlock.getMustUnderstand());
try {
soap12HeaderBlock.setMustUnderstand("otherValue");
- fail("SOAP 1.2 HeaderBlock Test : - MustUnderstatnd value can not be set to any value rather than 1 , 0 , true , false");
+ fail(
+ "SOAP 1.2 HeaderBlock Test : - MustUnderstatnd value can not be set to any value rather than 1 , 0 , true , false");
} catch (Exception e) {
assertTrue(true);
@@ -132,34 +186,53 @@
}
public void testSOAP12GetMustUnderstand() {
- assertFalse("SOAP 1.2 HeaderBlock Test : - After creating SOAPHeaderBlock, default MustUnderstand value true", soap12HeaderBlock.getMustUnderstand());
+ assertFalse(
+ "SOAP 1.2 HeaderBlock Test : - After creating SOAPHeaderBlock, default MustUnderstand value true",
+ soap12HeaderBlock.getMustUnderstand());
soap12HeaderBlock.setMustUnderstand(true);
- assertTrue("SOAP 1.2 HeaderBlock Test : - After setting MustUnderstand true calling setMustUnderstand method , getMustUnderstand method returns false", soap12HeaderBlock.getMustUnderstand());
+ assertTrue(
+ "SOAP 1.2 HeaderBlock Test : - After setting MustUnderstand true calling setMustUnderstand method , getMustUnderstand method returns false",
+ soap12HeaderBlock.getMustUnderstand());
}
//SOAP 1.1 SOAPHeaderBlock Test (With Parser)
public void testSOAP11GetRoleWithParser() {
- assertTrue("SOAP 1.1 HeaderBlock Test Wiht Parser : - getRole method returns incorrect role value", soap11HeaderBlock1WithParser.getRole().equals("http://schemas.xmlsoap.org/soap/actor/next"));
+ assertTrue(
+ "SOAP 1.1 HeaderBlock Test Wiht Parser : - getRole method returns incorrect role value",
+ soap11HeaderBlock1WithParser.getRole().equals(
+ "http://schemas.xmlsoap.org/soap/actor/next"));
}
public void testSOAP11GetMustUnderstandWithParser() {
- assertTrue("SOAP 1.1 HeaderBlock Test Wiht Parser : - getMustUnderstatnd method returns incorrect value", soap11HeaderBlock2WithParser.getMustUnderstand());
- assertFalse("SOAP 1.1 HeaderBlock Test Wiht Parser : - getMustUnderstatnd method returns incorrect value", soap11HeaderBlock3WithParser.getMustUnderstand());
+ assertTrue(
+ "SOAP 1.1 HeaderBlock Test Wiht Parser : - getMustUnderstatnd method returns incorrect value",
+ soap11HeaderBlock2WithParser.getMustUnderstand());
+ assertFalse(
+ "SOAP 1.1 HeaderBlock Test Wiht Parser : - getMustUnderstatnd method returns incorrect value",
+ soap11HeaderBlock3WithParser.getMustUnderstand());
}
//SOAP 1.2 SOAPHeaderBlock Test (With Parser)
public void testSOAP12GetRoleWithParser() {
- assertTrue("SOAP 1.2 HeaderBlock Test Wiht Parser : - getRole method returns incorrect role value", soap12HeaderBlock1WithParser.getRole().equals("http://www.w3.org/2003/05/soap-envelope/role/ultimateReceiver"));
+ assertTrue(
+ "SOAP 1.2 HeaderBlock Test Wiht Parser : - getRole method returns incorrect role value",
+ soap12HeaderBlock1WithParser.getRole().equals(
+ "http://www.w3.org/2003/05/soap-envelope/role/ultimateReceiver"));
}
public void testSOAP12GetMustUnderstandWithParser() {
- assertTrue("SOAP 1.2 HeaderBlock Test Wiht Parser : - getMustUnderstatnd method returns incorrect value", soap12HeaderBlock1WithParser.getMustUnderstand());
- assertFalse("SOAP 1.2 HeaderBlock Test Wiht Parser : - getMustUnderstatnd method returns incorrect value", soap12HeaderBlock2WithParser.getMustUnderstand());
+ assertTrue(
+ "SOAP 1.2 HeaderBlock Test Wiht Parser : - getMustUnderstatnd method returns incorrect value",
+ soap12HeaderBlock1WithParser.getMustUnderstand());
+ assertFalse(
+ "SOAP 1.2 HeaderBlock Test Wiht Parser : - getMustUnderstatnd method returns incorrect value",
+ soap12HeaderBlock2WithParser.getMustUnderstand());
try {
soap12HeaderBlock3WithParser.getMustUnderstand();
} catch (Exception e) {
- fail("SOAP 1.2 HeaderBlock Test Wiht Parser : - getMustUnderstatnd method should returns exception when mustunderstand value is incorrect");
+ fail(
+ "SOAP 1.2 HeaderBlock Test Wiht Parser : - getMustUnderstatnd method should returns exception when mustunderstand value is incorrect");
}
}
}