This is an automated email from the ASF dual-hosted git repository.

tabish pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/qpid-protonj2.git

commit 06341414b44ca796cd7d4fa09da83bc66920be26
Author: Timothy Bish <tabish...@gmail.com>
AuthorDate: Tue Jul 11 16:09:39 2023 -0400

    PROTON-2750 Add API for expecting null source or target in Attach
    
    Allows easier scripting of expecting null source or target in Attach
    response which would inidcate incoming detach from remote.
---
 .../qpid/protonj2/test/driver/expectations/AttachExpectation.java | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git 
a/protonj2-test-driver/src/main/java/org/apache/qpid/protonj2/test/driver/expectations/AttachExpectation.java
 
b/protonj2-test-driver/src/main/java/org/apache/qpid/protonj2/test/driver/expectations/AttachExpectation.java
index 1efc4bdb..636d9a40 100644
--- 
a/protonj2-test-driver/src/main/java/org/apache/qpid/protonj2/test/driver/expectations/AttachExpectation.java
+++ 
b/protonj2-test-driver/src/main/java/org/apache/qpid/protonj2/test/driver/expectations/AttachExpectation.java
@@ -342,6 +342,10 @@ public class AttachExpectation extends 
AbstractExpectation<Attach> {
         return matcher;
     }
 
+    public AttachExpectation withNullSource() {
+        return withSource(nullValue());
+    }
+
     public AttachExpectation withSource(Source source) {
         if (source != null) {
             SourceMatcher sourceMatcher = new SourceMatcher(source);
@@ -351,6 +355,10 @@ public class AttachExpectation extends 
AbstractExpectation<Attach> {
         }
     }
 
+    public AttachExpectation withNullTarget() {
+        return withTarget(nullValue());
+    }
+
     public AttachExpectation withTarget(Target target) {
         if (target != null) {
             TargetMatcher targetMatcher = new TargetMatcher(target);


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@qpid.apache.org
For additional commands, e-mail: commits-h...@qpid.apache.org

Reply via email to