cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From andreasm...@apache.org
Subject svn commit: r464918 [2/2] - in /incubator/cxf/trunk/rt: frontend/simple/ ws/rm/ ws/rm/src/main/java/org/apache/cxf/ws/rm/ ws/rm/src/main/java/org/apache/cxf/ws/rm/impl/ ws/rm/src/test/java/org/apache/cxf/ws/rm/impl/
Date Tue, 17 Oct 2006 12:42:33 GMT
Modified: incubator/cxf/trunk/rt/ws/rm/src/test/java/org/apache/cxf/ws/rm/impl/SourceSequenceImplTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/ws/rm/src/test/java/org/apache/cxf/ws/rm/impl/SourceSequenceImplTest.java?view=diff&rev=464918&r1=464917&r2=464918
==============================================================================
--- incubator/cxf/trunk/rt/ws/rm/src/test/java/org/apache/cxf/ws/rm/impl/SourceSequenceImplTest.java
(original)
+++ incubator/cxf/trunk/rt/ws/rm/src/test/java/org/apache/cxf/ws/rm/impl/SourceSequenceImplTest.java
Tue Oct 17 05:42:32 2006
@@ -23,6 +23,7 @@
 import java.util.Date;
 
 import javax.xml.datatype.Duration;
+import javax.xml.namespace.QName;
 
 import junit.framework.TestCase;
 
@@ -45,7 +46,6 @@
     private Identifier id;
 
     private Source source;
-    // Destination destination;
     private RMInterceptor interceptor;
     private SourcePolicyType sp;
     private SequenceTerminationPolicyType stp;
@@ -57,20 +57,6 @@
         id.setValue("seq");
         
         control = EasyMock.createNiceControl();
-        
-        /*
-        ap = RMUtils.getWSRMConfFactory().createAcksPolicyType();
-        rma = RMUtils.getWSRMPolicyFactory().createRMAssertionType();
-        BaseRetransmissionInterval bri =
-            RMUtils.getWSRMPolicyFactory().createRMAssertionTypeBaseRetransmissionInterval();
-        bri.setMilliseconds(new BigInteger("3000"));
-        rma.setBaseRetransmissionInterval(bri);
-        ExponentialBackoff eb = 
-            RMUtils.getWSRMPolicyFactory().createRMAssertionTypeExponentialBackoff();
-        eb.getOtherAttributes().put(ConfigurationHelper.EXPONENTIAL_BACKOFF_BASE_ATTR,
-                                    RetransmissionQueue.DEFAULT_EXPONENTIAL_BACKOFF);
-                                    */
-        
     }
     
     public void tearDown() {
@@ -270,34 +256,27 @@
         // termination policy max unacknowledged 
     }
     
-    /*
     public void testGetEndpointIdentfier() {
-        SourceSequence seq = null;
-        control = EasyMock.createNiceControl();
-        source = control.createMock(RMSource.class); 
-        handler = control.createMock(RMHandler.class);
-        configurationHelper = control.createMock(ConfigurationHelper.class);  
-        
-        expect(source.getHandler()).andReturn(handler);
-        expect(handler.getConfigurationHelper()).andReturn(configurationHelper);
-        expect(configurationHelper.getEndpointId())
-            .andReturn("abc.xyz");
+        setUpSource();
+        QName qn = new QName("abc", "xyz");
+        EasyMock.expect(source.getName()).andReturn(qn);
         control.replay();
         
-        seq = new SourceSequence(id);
+        SourceSequenceImpl seq = new SourceSequenceImpl(id);
         seq.setSource(source);
-        assertEquals("abc.xyz", seq.getEndpointIdentifier());      
-        control.verify();       
+        assertEquals("Unexpected endpoint identifier", "{abc}xyz", seq.getEndpointIdentifier());
+        control.verify();
     }
-    */
     
     public void testCheckOfferingSequenceClosed() {
         SourceSequenceImpl seq = null;
         
         setUpSource();
  
+        RMEndpoint rme = control.createMock(RMEndpoint.class);
+        EasyMock.expect(source.getReliableEndpoint()).andReturn(rme).anyTimes();
         Destination destination = control.createMock(Destination.class);
-        EasyMock.expect(interceptor.getDestination(source)).andReturn(destination).anyTimes();
+        EasyMock.expect(rme.getDestination()).andReturn(destination).anyTimes();
         DestinationSequenceImpl dseq = control.createMock(DestinationSequenceImpl.class);

         Identifier did = control.createMock(Identifier.class);
         EasyMock.expect(destination.getSequenceImpl(did)).andReturn(dseq).anyTimes();
@@ -313,28 +292,7 @@
         
         control.verify();
     }
-    
-    /*
-    public void testIdentifierEquals() {
-        control = EasyMock.createNiceControl();
-        Identifier id1 = null;
-        Identifier id2 = null;   
-        assertTrue(AbstractSequenceImpl.identifierEquals(id1, id2));
-        
-        id1 = factory.createIdentifier();
-        id1.setValue("seq1"); 
-        assertTrue(!AbstractSequenceImpl.identifierEquals(id1, id2));
-        
-        id2 = factory.createIdentifier();
-        id2.setValue("seq2"); 
-        assertTrue(!AbstractSequenceImpl.identifierEquals(id1, id2));
-        
-        id2.setValue("seq1");
-        assertTrue(AbstractSequenceImpl.identifierEquals(id1, id2));
-    }
-    */
- 
-    
+   
     private boolean nextMessages(SourceSequenceImpl seq, 
                                  int n) {
         int i = 0;



Mime
View raw message