-
Notifications
You must be signed in to change notification settings - Fork 36
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
Showing
9 changed files
with
38 additions
and
122 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
31 changes: 31 additions & 0 deletions
31
src/NServiceBus.SqlServer.UnitTests/ErrorQueueSettingsTests.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,31 @@ | ||
namespace NServiceBus.SqlServer.UnitTests | ||
{ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Configuration; | ||
using NServiceBus.Config.ConfigurationSource; | ||
using NServiceBus.Features; | ||
using NServiceBus.Settings; | ||
using NUnit.Framework; | ||
|
||
[TestFixture] | ||
public class ErrorQueueSettingsTests | ||
{ | ||
[Test] | ||
public void It_can_try_to_obtain_the_error_queue_name_from_the_registry() | ||
{ | ||
var settingsHolder = new SettingsHolder(); | ||
settingsHolder.Set<IConfigurationSource>(new ConfigurationSource()); | ||
settingsHolder.Set("TypesToScan", new List<Type>()); | ||
Assert.Throws<ConfigurationErrorsException>(() => ErrorQueueSettings.GetConfiguredErrorQueue(settingsHolder)); | ||
} | ||
|
||
private class ConfigurationSource : IConfigurationSource | ||
{ | ||
public T GetConfiguration<T>() where T : class, new() | ||
{ | ||
return null; | ||
} | ||
} | ||
} | ||
} |
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
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
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