@@ -57,7 +57,7 @@ Task<IMessage> RpcHandler(IRpcServer.IContext context, IMessage request)
5757
5858 await p . PublishAsync ( new AmqpMessage ( "test" ) ) ;
5959 IMessage m = await WhenTcsCompletes ( tcs ) ;
60- Assert . Equal ( "pong" , m . Body ( ) ) ;
60+ Assert . Equal ( "pong" , m . BodyAsString ( ) ) ;
6161 await rpcServer . CloseAsync ( ) ;
6262 }
6363
@@ -143,7 +143,7 @@ Task MessageHandler(IContext context, IMessage message)
143143 Assert . Equal ( OutcomeState . Accepted , pr . Outcome . State ) ;
144144
145145 IMessage m = await WhenTcsCompletes ( tcs ) ;
146- Assert . Equal ( "pong" , m . Body ( ) ) ;
146+ Assert . Equal ( "pong" , m . BodyAsString ( ) ) ;
147147
148148 await rpcServer . CloseAsync ( ) ;
149149 await consumer . CloseAsync ( ) ;
@@ -173,7 +173,7 @@ public async Task RpcServerClientPingPongWithDefault()
173173 IMessage message = new AmqpMessage ( "ping" ) ;
174174
175175 IMessage response = await rpcClient . PublishAsync ( message ) ;
176- Assert . Equal ( "pong" , response . Body ( ) ) ;
176+ Assert . Equal ( "pong" , response . BodyAsString ( ) ) ;
177177 await rpcClient . CloseAsync ( ) ;
178178 await rpcServer . CloseAsync ( ) ;
179179 }
@@ -209,7 +209,7 @@ public async Task RpcServerClientPingPongWithCustomReplyToQueueAndCorrelationIdS
209209 IMessage message = new AmqpMessage ( "ping" ) ;
210210
211211 IMessage response = await rpcClient . PublishAsync ( message ) ;
212- Assert . Equal ( "pong" , response . Body ( ) ) ;
212+ Assert . Equal ( "pong" , response . BodyAsString ( ) ) ;
213213 Assert . Equal ( _correlationId , response . CorrelationId ( ) ) ;
214214 await rpcClient . CloseAsync ( ) ;
215215 await rpcServer . CloseAsync ( ) ;
@@ -265,7 +265,7 @@ public async Task RpcServerClientOverridingTheRequestAndResponsePostProcessor()
265265 while ( i < 30 )
266266 {
267267 IMessage response = await rpcClient . PublishAsync ( message ) ;
268- Assert . Equal ( "pong" , response . Body ( ) ) ;
268+ Assert . Equal ( "pong" , response . BodyAsString ( ) ) ;
269269 // the server replies with the correlation id in the application properties
270270 Assert . Equal ( $ "{ _correlationId } _{ i } ", response . Property ( "correlationId" ) ) ;
271271 Assert . Equal ( $ "{ _correlationId } _{ i } ", response . Properties ( ) [ "correlationId" ] ) ;
@@ -324,7 +324,7 @@ Task<IMessage> RpcHandler(IRpcServer.IContext context, IMessage request)
324324 {
325325 IMessage message = new AmqpMessage ( "ping" ) . Property ( "id" , i1 ) ;
326326 IMessage response = await rpcClient . PublishAsync ( message ) ;
327- Assert . Equal ( "pong" , response . Body ( ) ) ;
327+ Assert . Equal ( "pong" , response . BodyAsString ( ) ) ;
328328 } ) ) ;
329329 }
330330
@@ -376,7 +376,7 @@ static async Task<IMessage> RpcHandler(IRpcServer.IContext context, IMessage req
376376
377377 IMessage msg = new AmqpMessage ( "ping" ) . Property ( "wait" , 1 ) ;
378378 IMessage reply = await rpcClient . PublishAsync ( msg ) ;
379- Assert . Equal ( "pong" , reply . Body ( ) ) ;
379+ Assert . Equal ( "pong" , reply . BodyAsString ( ) ) ;
380380
381381 await Assert . ThrowsAsync < TimeoutException > ( ( ) => rpcClient . PublishAsync (
382382 new AmqpMessage ( "ping" ) . Property ( "wait" , 700 ) ) ) ;
0 commit comments