@@ -52,7 +52,6 @@ public void TestPersistentPropertyChangesDeliveryMode_PersistentTrueDelivery2()
5252 // Arrange
5353 var subject = new Framing . BasicProperties
5454 {
55-
5655 // Act
5756 Persistent = true
5857 } ;
@@ -120,5 +119,35 @@ public void TestNullableProperties_CanWrite(
120119 Assert . AreEqual ( isCorrelationIdPresent , propertiesFromStream . IsCorrelationIdPresent ( ) ) ;
121120 Assert . AreEqual ( isMessageIdPresent , propertiesFromStream . IsMessageIdPresent ( ) ) ;
122121 }
122+
123+ [ Test ]
124+ public void TestProperties_ReplyTo ( [ Values ( null , "foo_1" , "fanout://name/key" ) ] string replyTo )
125+ {
126+ // Arrange
127+ var subject = new Framing . BasicProperties
128+ {
129+ // Act
130+ ReplyTo = replyTo ,
131+ } ;
132+
133+ // Assert
134+ bool isReplyToPresent = replyTo != null ;
135+ PublicationAddress result ;
136+ PublicationAddress . TryParse ( replyTo , out result ) ;
137+ string replyToAddress = result ? . ToString ( ) ;
138+ Assert . AreEqual ( isReplyToPresent , subject . IsReplyToPresent ( ) ) ;
139+
140+ var writer = new Impl . ContentHeaderPropertyWriter ( new byte [ 1024 ] ) ;
141+ subject . WritePropertiesTo ( ref writer ) ;
142+
143+ // Read from Stream
144+ var propertiesFromStream = new Framing . BasicProperties ( ) ;
145+ var reader = new Impl . ContentHeaderPropertyReader ( writer . Memory . Slice ( 0 , writer . Offset ) ) ;
146+ propertiesFromStream . ReadPropertiesFrom ( ref reader ) ;
147+
148+ Assert . AreEqual ( replyTo , propertiesFromStream . ReplyTo ) ;
149+ Assert . AreEqual ( isReplyToPresent , propertiesFromStream . IsReplyToPresent ( ) ) ;
150+ Assert . AreEqual ( replyToAddress , propertiesFromStream . ReplyToAddress ? . ToString ( ) ) ;
151+ }
123152 }
124153}
0 commit comments