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
efcd07c
commit cdb8c6d
Showing
3 changed files
with
41 additions
and
27 deletions.
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
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,39 @@ | ||
using System; | ||
using Microsoft.ServiceBus; | ||
using NUnit.Framework; | ||
using Rebus.Activation; | ||
using Rebus.AzureServiceBus.Config; | ||
using Rebus.AzureServiceBus.Tests.Factories; | ||
using Rebus.Config; | ||
using Rebus.Tests; | ||
|
||
namespace Rebus.AzureServiceBus.Tests | ||
{ | ||
[TestFixture] | ||
public class NotCreatingQueueTest : FixtureBase | ||
{ | ||
[TestCase(AzureServiceBusMode.Basic)] | ||
[TestCase(AzureServiceBusMode.Standard)] | ||
public void ShouldNotCreateInputQueueWhenConfiguredNotTo(AzureServiceBusMode mode) | ||
{ | ||
var connectionString = StandardAzureServiceBusTransportFactory.ConnectionString; | ||
var manager = NamespaceManager.CreateFromConnectionString(connectionString); | ||
var queueName = Guid.NewGuid().ToString("N"); | ||
|
||
Assert.IsFalse(manager.QueueExists(queueName)); | ||
|
||
var activator = Using(new BuiltinHandlerActivator()); | ||
|
||
Configure.With(activator) | ||
.Logging(l => l.ColoredConsole()) | ||
.Transport(t => | ||
{ | ||
t.UseAzureServiceBus(connectionString, queueName, mode) | ||
.DoNotCreateQueues(); | ||
}) | ||
.Start(); | ||
|
||
Assert.IsFalse(manager.QueueExists(queueName)); | ||
} | ||
} | ||
} |
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