Skip to content

Commit ab717b9

Browse files
committed
my 2cents.
Add more conditions to the test Signed-off-by: Gabriele Santomaggio <[email protected]>
1 parent 5b62dff commit ab717b9

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

projects/Test/Integration/TestBasicPublishAsync.cs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,18 +70,23 @@ public async Task TestQueuePurgeAsync()
7070
[Fact]
7171
public async Task TestBasicReturnAsync()
7272
{
73+
string routingKey = Guid.NewGuid().ToString();
7374
try
7475
{
75-
await _channel.BasicPublishAsync(exchange: string.Empty, routingKey: Guid.NewGuid().ToString(),
76+
await _channel.BasicPublishAsync(exchange: string.Empty, routingKey: routingKey,
7677
mandatory: true, body: GetRandomBody());
7778
}
7879
catch (PublishReturnException prex)
7980
{
8081
Assert.True(prex.IsReturn);
8182
Assert.NotNull(prex.Exchange);
83+
Assert.Equal(string.Empty, prex.Exchange);
8284
Assert.NotNull(prex.RoutingKey);
85+
Assert.Equal(routingKey, prex.RoutingKey);
8386
Assert.NotEqual(0, prex.ReplyCode);
8487
Assert.NotNull(prex.ReplyText);
88+
Assert.Equal("NO_ROUTE", prex.ReplyText);
89+
8590
}
8691
}
8792
}

0 commit comments

Comments
 (0)