-
-
Notifications
You must be signed in to change notification settings - Fork 142
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f59f000
commit 2a1cf42
Showing
2 changed files
with
39 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 33 additions & 0 deletions
33
src/Transports/RabbitMQ/Wolverine.RabbitMQ.Tests/response_queue_disabling.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
using Microsoft.Extensions.Hosting; | ||
using Shouldly; | ||
using Xunit; | ||
|
||
namespace Wolverine.RabbitMQ.Tests; | ||
|
||
public class response_queue_disabling : IAsyncLifetime | ||
{ | ||
private IHost _host; | ||
|
||
[Fact] | ||
public void reply_queue_should_not_be_declared() | ||
{ | ||
var transport = _host.Get<WolverineOptions>().RabbitMqTransport(); | ||
|
||
transport.ReplyEndpoint() | ||
.ShouldBeNull(); | ||
} | ||
|
||
public async Task InitializeAsync() | ||
{ | ||
_host = await Host.CreateDefaultBuilder() | ||
.UseWolverine(opts => | ||
{ | ||
opts.ServiceName = "MyApp"; | ||
opts.UseRabbitMq() | ||
.DisableSystemRequestReplyQueueDeclaration(); | ||
}).StartAsync(); | ||
} | ||
|
||
public Task DisposeAsync() => _host.StopAsync(); | ||
} | ||
|