michaelpearce-gain commented on a change in pull request #56:
URL: https://github.com/apache/activemq-nms-amqp/pull/56#discussion_r564569796



##########
File path: test/Apache-NMS-AMQP-Test/TestAmqp/TestAmqpPeer.cs
##########
@@ -605,7 +606,49 @@ public void ExpectDurableSubscriberAttach(string 
topicName, string subscriptionN
 
             ExpectReceiverAttach(linkNameMatcher: linkNameMatcher, 
sourceMatcher: sourceMatcher, targetMatcher: targetMatcher, settled: false, 
errorType: null, errorMessage: null);
         }
+        
+        public void ExpectSharedDurableSubscriberAttach(string topicName, 
string subscriptionName)
+        {
+            Action<string> linkNameMatcher = linkName => 
Assert.AreEqual(subscriptionName, linkName);
+
+            Action<object> sourceMatcher = o =>
+            {
+                Assert.IsInstanceOf<Source>(o);
+                var source = (Source) o;
+                Assert.AreEqual(topicName, source.Address);
+                Assert.IsFalse(source.Dynamic);
+                Assert.AreEqual(TerminusDurability.UNSETTLED_STATE, 
(TerminusDurability) source.Durable);
+                Assert.AreEqual(TerminusExpiryPolicy.NEVER, 
source.ExpiryPolicy);
+                CollectionAssert.Contains(source.Capabilities, 
SymbolUtil.ATTACH_CAPABILITIES_TOPIC);
+                CollectionAssert.Contains(source.Capabilities, 
SymbolUtil.SHARED);
+            };
 
+            Action<Target> targetMatcher = Assert.IsNotNull;
+
+            ExpectReceiverAttach(linkNameMatcher: linkNameMatcher, 
sourceMatcher: sourceMatcher, targetMatcher: targetMatcher, settled: false, 
errorType: null, errorMessage: null);
+        }
+
+        public void ExpectSharedSubscriberAttach(string topicName, string 
subscriptionName)
+        {
+            Action<string> linkNameMatcher = linkName => 
Assert.AreEqual(subscriptionName+"|volatile1", linkName);
+
+            Action<object> sourceMatcher = o =>
+            {
+                Assert.IsInstanceOf<Source>(o);
+                var source = (Source) o;
+                Assert.AreEqual(topicName, source.Address);
+                Assert.IsFalse(source.Dynamic);
+                // Assert.AreEqual(TerminusDurability.UNSETTLED_STATE, 
(TerminusDurability) source.Durable);

Review comment:
       @lukeabsent remove commented code?




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to