Author: chamikara
Date: Thu Mar 30 23:16:44 2006
New Revision: 390350

URL: http://svn.apache.org/viewcvs?rev=390350&view=rev
Log:
Updated test cases

Removed:
    
webservices/sandesha/trunk/test/src/org/apache/sandesha2/AddressablePingTest.java
    
webservices/sandesha/trunk/test/src/org/apache/sandesha2/AnonymousPingTest.java
Modified:
    
webservices/sandesha/trunk/test/src/org/apache/sandesha2/SandeshaTestCase.java
    
webservices/sandesha/trunk/test/src/org/apache/sandesha2/wsrm/CreateSequenceResponseTest.java
    
webservices/sandesha/trunk/test/src/org/apache/sandesha2/wsrm/CreateSequenceTest.java
    
webservices/sandesha/trunk/test/src/org/apache/sandesha2/wsrm/SequenceTest.java
    
webservices/sandesha/trunk/test/src/org/apache/sandesha2/wsrm/TerminateSequenceTest.java

Modified: 
webservices/sandesha/trunk/test/src/org/apache/sandesha2/SandeshaTestCase.java
URL: 
http://svn.apache.org/viewcvs/webservices/sandesha/trunk/test/src/org/apache/sandesha2/SandeshaTestCase.java?rev=390350&r1=390349&r2=390350&view=diff
==============================================================================
--- 
webservices/sandesha/trunk/test/src/org/apache/sandesha2/SandeshaTestCase.java 
(original)
+++ 
webservices/sandesha/trunk/test/src/org/apache/sandesha2/SandeshaTestCase.java 
Thu Mar 30 23:16:44 2006
@@ -80,7 +80,6 @@
         MessageContext msgCtx = new MessageContext();
         msgCtx.setConfigurationContext(configCtx);
         return msgCtx;
-
     }
 
 

Modified: 
webservices/sandesha/trunk/test/src/org/apache/sandesha2/wsrm/CreateSequenceResponseTest.java
URL: 
http://svn.apache.org/viewcvs/webservices/sandesha/trunk/test/src/org/apache/sandesha2/wsrm/CreateSequenceResponseTest.java?rev=390350&r1=390349&r2=390350&view=diff
==============================================================================
--- 
webservices/sandesha/trunk/test/src/org/apache/sandesha2/wsrm/CreateSequenceResponseTest.java
 (original)
+++ 
webservices/sandesha/trunk/test/src/org/apache/sandesha2/wsrm/CreateSequenceResponseTest.java
 Thu Mar 30 23:16:44 2006
@@ -5,23 +5,18 @@
 import org.apache.sandesha2.Sandesha2Constants;
 import org.apache.axiom.soap.SOAPEnvelope;
 import org.apache.axiom.soap.SOAPFactory;
+import org.apache.axis2.addressing.AddressingConstants;
 import org.apache.axis2.addressing.EndpointReference;
 import org.apache.axiom.om.OMAbstractFactory;
 import org.apache.axiom.om.OMElement;
 
 import javax.xml.namespace.QName;
 
-/**
- * Created by IntelliJ IDEA.
- * User: sanka
- * Date: Oct 7, 2005
- * Time: 2:43:50 AM
- * To change this template use File | Settings | File Templates.
- */
 public class CreateSequenceResponseTest extends SandeshaTestCase {
 
        SOAPFactory factory = OMAbstractFactory.getSOAP11Factory();
-       String rmNamespace = Sandesha2Constants.SPEC_2005_02.NS_URI;
+       String rmNamespaceValue = Sandesha2Constants.SPEC_2005_02.NS_URI;
+       String addressingNamespaceValue = 
AddressingConstants.Final.WSA_NAMESPACE;
        
     public CreateSequenceResponseTest() {
         super("CreateSequenceResponseTest");
@@ -29,7 +24,7 @@
     }
 
     public void testFromOMElement() throws SandeshaException {
-        CreateSequenceResponse res = new 
CreateSequenceResponse(factory,rmNamespace);
+        CreateSequenceResponse res = new 
CreateSequenceResponse(factory,rmNamespaceValue,addressingNamespaceValue);
         SOAPEnvelope env = getSOAPEnvelope("", "CreateSequenceResponse.xml");
         res.fromOMElement(env.getBody());
 
@@ -44,15 +39,15 @@
     }
 
     public void testToSOAPEnvelope()  throws SandeshaException {
-        CreateSequenceResponse res = new 
CreateSequenceResponse(factory,rmNamespace);
+        CreateSequenceResponse res = new 
CreateSequenceResponse(factory,rmNamespaceValue,addressingNamespaceValue);
 
-        Identifier identifier = new Identifier(factory,rmNamespace);
+        Identifier identifier = new Identifier(factory,rmNamespaceValue);
         identifier.setIndentifer("uuid:88754b00-161a-11da-b6d6-8198de3c47c5");
         res.setIdentifier(identifier);
 
-        Accept accept = new Accept(factory,rmNamespace);
-        AcksTo acksTo = new AcksTo(factory,rmNamespace);
-        Address address = new Address(factory);
+        Accept accept = new 
Accept(factory,rmNamespaceValue,addressingNamespaceValue);
+        AcksTo acksTo = new 
AcksTo(factory,rmNamespaceValue,addressingNamespaceValue);
+        Address address = new Address(factory,addressingNamespaceValue);
         address.setEpr(new 
EndpointReference("http://localhost:8070/axis/services/TestService";));
         acksTo.setAddress(address);
         accept.setAcksTo(acksTo);
@@ -62,17 +57,17 @@
         res.toSOAPEnvelope(env);
 
         OMElement createSeqResponsePart = env.getBody().getFirstChildWithName(
-                new QName(rmNamespace, 
Sandesha2Constants.WSRM_COMMON.CREATE_SEQUENCE_RESPONSE));
+                new QName(rmNamespaceValue, 
Sandesha2Constants.WSRM_COMMON.CREATE_SEQUENCE_RESPONSE));
         OMElement identifierPart = createSeqResponsePart.getFirstChildWithName(
-                new QName(rmNamespace, 
Sandesha2Constants.WSRM_COMMON.IDENTIFIER));
+                new QName(rmNamespaceValue, 
Sandesha2Constants.WSRM_COMMON.IDENTIFIER));
         assertEquals("uuid:88754b00-161a-11da-b6d6-8198de3c47c5", 
identifierPart.getText());
 
         OMElement acceptPart = createSeqResponsePart.getFirstChildWithName(
-                new QName(rmNamespace, Sandesha2Constants.WSRM_COMMON.ACCEPT));
+                new QName(rmNamespaceValue, 
Sandesha2Constants.WSRM_COMMON.ACCEPT));
         OMElement acksToPart = acceptPart.getFirstChildWithName(
-                new QName(rmNamespace, 
Sandesha2Constants.WSRM_COMMON.ACKS_TO));
+                new QName(rmNamespaceValue, 
Sandesha2Constants.WSRM_COMMON.ACKS_TO));
         OMElement addressPart = acksToPart.getFirstChildWithName(new QName(
-                               Sandesha2Constants.WSA.NS_URI_ADDRESSING, 
Sandesha2Constants.WSA.ADDRESS));
+                               addressingNamespaceValue, 
Sandesha2Constants.WSA.ADDRESS));
         assertEquals("http://localhost:8070/axis/services/TestService";, 
addressPart.getText());
     }
 }

Modified: 
webservices/sandesha/trunk/test/src/org/apache/sandesha2/wsrm/CreateSequenceTest.java
URL: 
http://svn.apache.org/viewcvs/webservices/sandesha/trunk/test/src/org/apache/sandesha2/wsrm/CreateSequenceTest.java?rev=390350&r1=390349&r2=390350&view=diff
==============================================================================
--- 
webservices/sandesha/trunk/test/src/org/apache/sandesha2/wsrm/CreateSequenceTest.java
 (original)
+++ 
webservices/sandesha/trunk/test/src/org/apache/sandesha2/wsrm/CreateSequenceTest.java
 Thu Mar 30 23:16:44 2006
@@ -6,6 +6,7 @@
 import org.apache.sandesha2.wsrm.*;
 import org.apache.axiom.soap.SOAPEnvelope;
 import org.apache.axiom.soap.SOAPFactory;
+import org.apache.axis2.addressing.AddressingConstants;
 import org.apache.axis2.addressing.EndpointReference;
 import org.apache.axiom.om.OMAbstractFactory;
 import org.apache.axiom.om.OMElement;
@@ -22,14 +23,15 @@
 public class CreateSequenceTest extends SandeshaTestCase {
 
        SOAPFactory factory = OMAbstractFactory.getSOAP11Factory();
-       String rmNamespace = Sandesha2Constants.SPEC_2005_02.NS_URI;
+       String rmNamespaceValue = Sandesha2Constants.SPEC_2005_02.NS_URI;
+       String addressingNamespaceValue = 
AddressingConstants.Final.WSA_NAMESPACE;
        
     public CreateSequenceTest() {
         super("CreateSequenceTest");
     }
 
     public void testfromOMElement()  throws SandeshaException {
-        CreateSequence createSequence = new 
CreateSequence(factory,rmNamespace);
+        CreateSequence createSequence = new 
CreateSequence(factory,rmNamespaceValue,addressingNamespaceValue);
         createSequence.fromOMElement(getSOAPEnvelope("", 
"CreateSequence.xml").getBody());
 
         AcksTo acksTo = createSequence.getAcksTo();
@@ -43,16 +45,16 @@
     }
 
     public void testToSOAPEnvelope()  throws SandeshaException {
-        CreateSequence createSequence = new 
CreateSequence(factory,rmNamespace);
+        CreateSequence createSequence = new 
CreateSequence(factory,rmNamespaceValue,addressingNamespaceValue);
 
-        AcksTo acksTo = new AcksTo(factory,rmNamespace);
-        Address address = new Address(factory);
+        AcksTo acksTo = new 
AcksTo(factory,rmNamespaceValue,addressingNamespaceValue);
+        Address address = new Address(factory,addressingNamespaceValue);
         address.setEpr(new 
EndpointReference("http://127.0.0.1:9090/axis/services/RMService";));
         acksTo.setAddress(address);
         createSequence.setAcksTo(acksTo);
 
-        SequenceOffer sequenceOffer = new SequenceOffer(factory,rmNamespace);
-        Identifier identifier = new Identifier(factory,rmNamespace);
+        SequenceOffer sequenceOffer = new 
SequenceOffer(factory,rmNamespaceValue);
+        Identifier identifier = new Identifier(factory,rmNamespaceValue);
         identifier.setIndentifer("uuid:c3671020-15e0-11da-9b3b-f0439d4867bd");
         sequenceOffer.setIdentifier(identifier);
         createSequence.setSequenceOffer(sequenceOffer);
@@ -60,18 +62,18 @@
         SOAPEnvelope envelope = getEmptySOAPEnvelope();
         createSequence.toSOAPEnvelope(envelope);
 
-        OMElement createSequencePart = 
envelope.getBody().getFirstChildWithName(new QName(rmNamespace,
+        OMElement createSequencePart = 
envelope.getBody().getFirstChildWithName(new QName(rmNamespaceValue,
                         Sandesha2Constants.WSRM_COMMON.CREATE_SEQUENCE));
         OMElement acksToPart = createSequencePart.getFirstChildWithName(new 
QName(
-                       rmNamespace, Sandesha2Constants.WSRM_COMMON.ACKS_TO));
+                       rmNamespaceValue, 
Sandesha2Constants.WSRM_COMMON.ACKS_TO));
                OMElement addressPart = acksToPart.getFirstChildWithName(new 
QName(
-                Sandesha2Constants.WSA.NS_URI_ADDRESSING, 
Sandesha2Constants.WSA.ADDRESS));
+                addressingNamespaceValue, Sandesha2Constants.WSA.ADDRESS));
         assertEquals("http://127.0.0.1:9090/axis/services/RMService";, 
addressPart.getText());
 
         OMElement offerPart = createSequencePart.getFirstChildWithName(
-                new QName(rmNamespace, 
Sandesha2Constants.WSRM_COMMON.SEQUENCE_OFFER));
+                new QName(rmNamespaceValue, 
Sandesha2Constants.WSRM_COMMON.SEQUENCE_OFFER));
         OMElement identifierPart = offerPart.getFirstChildWithName(
-                new QName(rmNamespace, 
Sandesha2Constants.WSRM_COMMON.IDENTIFIER));
+                new QName(rmNamespaceValue, 
Sandesha2Constants.WSRM_COMMON.IDENTIFIER));
         assertEquals("uuid:c3671020-15e0-11da-9b3b-f0439d4867bd", 
identifierPart.getText());
     }
 }

Modified: 
webservices/sandesha/trunk/test/src/org/apache/sandesha2/wsrm/SequenceTest.java
URL: 
http://svn.apache.org/viewcvs/webservices/sandesha/trunk/test/src/org/apache/sandesha2/wsrm/SequenceTest.java?rev=390350&r1=390349&r2=390350&view=diff
==============================================================================
--- 
webservices/sandesha/trunk/test/src/org/apache/sandesha2/wsrm/SequenceTest.java 
(original)
+++ 
webservices/sandesha/trunk/test/src/org/apache/sandesha2/wsrm/SequenceTest.java 
Thu Mar 30 23:16:44 2006
@@ -10,7 +10,13 @@
 
 import javax.xml.namespace.QName;
 
-
+/**
+ * Created by IntelliJ IDEA.
+ * User: sanka
+ * Date: Oct 7, 2005
+ * Time: 4:31:54 AM
+ * To change this template use File | Settings | File Templates.
+ */
 public class SequenceTest extends SandeshaTestCase {
 
        SOAPFactory factory = OMAbstractFactory.getSOAP11Factory();

Modified: 
webservices/sandesha/trunk/test/src/org/apache/sandesha2/wsrm/TerminateSequenceTest.java
URL: 
http://svn.apache.org/viewcvs/webservices/sandesha/trunk/test/src/org/apache/sandesha2/wsrm/TerminateSequenceTest.java?rev=390350&r1=390349&r2=390350&view=diff
==============================================================================
--- 
webservices/sandesha/trunk/test/src/org/apache/sandesha2/wsrm/TerminateSequenceTest.java
 (original)
+++ 
webservices/sandesha/trunk/test/src/org/apache/sandesha2/wsrm/TerminateSequenceTest.java
 Thu Mar 30 23:16:44 2006
@@ -10,6 +10,13 @@
 
 import javax.xml.namespace.QName;
 
+/**
+ * Created by IntelliJ IDEA.
+ * User: sanka
+ * Date: Oct 7, 2005
+ * Time: 3:36:59 AM
+ * To change this template use File | Settings | File Templates.
+ */
 public class TerminateSequenceTest extends SandeshaTestCase {
 
        SOAPFactory factory = OMAbstractFactory.getSOAP11Factory();



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to