Skip to content

Commit

Permalink
Remove magic string from test collection specification
Browse files Browse the repository at this point in the history
  • Loading branch information
reisenberger committed Nov 29, 2017
1 parent 8cf57b8 commit 64b21c8
Show file tree
Hide file tree
Showing 31 changed files with 43 additions and 29 deletions.
2 changes: 1 addition & 1 deletion src/Polly.NetStandard11/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
using System.Runtime.CompilerServices;

[assembly: AssemblyTitle("Polly")]
[assembly: AssemblyVersion("5.6.0.0")]
[assembly: AssemblyVersion("5.6.1.0")]
[assembly: CLSCompliant(true)]

[assembly: InternalsVisibleTo("Polly.NetStandard11.Specs")]
2 changes: 1 addition & 1 deletion src/Polly.SharedSpecs/Caching/AbsoluteTtlSpecs.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

namespace Polly.Specs.Caching
{
[Collection("SystemClockDependantCollection")]
[Collection(Polly.Specs.Helpers.Constants.SystemClockDependentTestCollection)]
public class AbsoluteTtlSpecs : IDisposable
{
[Fact]
Expand Down
2 changes: 1 addition & 1 deletion src/Polly.SharedSpecs/Caching/CacheAsyncSpecs.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

namespace Polly.Specs.Caching
{
[Collection("SystemClockDependantCollection")]
[Collection(Polly.Specs.Helpers.Constants.SystemClockDependentTestCollection)]
public class CacheAsyncSpecs : IDisposable
{
#region Configuration
Expand Down
2 changes: 1 addition & 1 deletion src/Polly.SharedSpecs/Caching/CacheSpecs.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

namespace Polly.Specs.Caching
{
[Collection("SystemClockDependantCollection")]
[Collection(Polly.Specs.Helpers.Constants.SystemClockDependentTestCollection)]
public class CacheSpecs : IDisposable
{
#region Configuration
Expand Down
2 changes: 1 addition & 1 deletion src/Polly.SharedSpecs/Caching/CacheTResultAsyncSpecs.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

namespace Polly.Specs.Caching
{
[Collection("SystemClockDependantCollection")]
[Collection(Polly.Specs.Helpers.Constants.SystemClockDependentTestCollection)]
public class CacheTResultAsyncSpecs : IDisposable
{
#region Configuration
Expand Down
2 changes: 1 addition & 1 deletion src/Polly.SharedSpecs/Caching/CacheTResultSpecs.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

namespace Polly.Specs.Caching
{
[Collection("SystemClockDependantCollection")]
[Collection(Polly.Specs.Helpers.Constants.SystemClockDependentTestCollection)]
public class CacheTResultSpecs : IDisposable
{
#region Configuration
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

namespace Polly.Specs.CircuitBreaker
{
[Collection("SystemClockDependantCollection")]
[Collection(Polly.Specs.Helpers.Constants.SystemClockDependentTestCollection)]
public class AdvancedCircuitBreakerAsyncSpecs : IDisposable
{
#region Configuration tests
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
namespace Polly.Specs.CircuitBreaker
{

[Collection("SystemClockDependantCollection")]
[Collection(Polly.Specs.Helpers.Constants.SystemClockDependentTestCollection)]
public class AdvancedCircuitBreakerSpecs : IDisposable
{
#region Configuration tests
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

namespace Polly.Specs.CircuitBreaker
{
[Collection("SystemClockDependantCollection")]
[Collection(Polly.Specs.Helpers.Constants.SystemClockDependentTestCollection)]
public class CircuitBreakerAsyncSpecs : IDisposable
{
#region Configuration tests
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

namespace Polly.Specs.CircuitBreaker
{
[Collection("SystemClockDependantCollection")]
[Collection(Polly.Specs.Helpers.Constants.SystemClockDependentTestCollection)]
public class CircuitBreakerSpecs : IDisposable
{
#region Configuration tests
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

namespace Polly.Specs.CircuitBreaker
{
[Collection("SystemClockDependantCollection")]
[Collection(Polly.Specs.Helpers.Constants.SystemClockDependentTestCollection)]
public class CircuitBreakerTResultAsyncSpecs : IDisposable
{
#region Configuration tests
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

namespace Polly.Specs.CircuitBreaker
{
[Collection("SystemClockDependantCollection")]
[Collection(Polly.Specs.Helpers.Constants.SystemClockDependentTestCollection)]
public class CircuitBreakerTResultMixedResultExceptionSpecs : IDisposable
{
#region Circuit-breaker threshold-to-break tests
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

namespace Polly.Specs.CircuitBreaker
{
[Collection("SystemClockDependantCollection")]
[Collection(Polly.Specs.Helpers.Constants.SystemClockDependentTestCollection)]
public class CircuitBreakerTResultSpecs : IDisposable
{
#region Configuration tests
Expand Down
13 changes: 13 additions & 0 deletions src/Polly.SharedSpecs/Helpers/Constants.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
namespace Polly.Specs.Helpers
{
/// <summary>
/// Constants supporting tests.
/// </summary>
public class Constants
{
/// <summary>
/// Denotes a test collection dependent on manipulating the abstracted <see cref="Polly.Utilities.SystemClock"/>. <remarks>These tests are not parallelized.</remarks>
/// </summary>
public const string SystemClockDependentTestCollection = "SystemClockDependentTestCollection";
}
}
1 change: 1 addition & 0 deletions src/Polly.SharedSpecs/Polly.SharedSpecs.projitems
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@
<Compile Include="$(MSBuildThisFileDirectory)Helpers\Caching\StubErroringCacheProvider.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Helpers\Caching\StubSerialized.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Helpers\Caching\StubSerializer.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Helpers\Constants.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Helpers\ContextualPolicyExtensions.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Helpers\ContextualPolicyExtensionsAsync.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Helpers\ContextualPolicyTResultExtensions.cs" />
Expand Down
2 changes: 1 addition & 1 deletion src/Polly.SharedSpecs/Retry/WaitAndRetryAsyncSpecs.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

namespace Polly.Specs.Retry
{
[Collection("SystemClockDependantCollection")]
[Collection(Polly.Specs.Helpers.Constants.SystemClockDependentTestCollection)]
public class WaitAndRetryAsyncSpecs : IDisposable
{
public WaitAndRetryAsyncSpecs()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

namespace Polly.Specs.Retry
{
[Collection("SystemClockDependantCollection")]
[Collection(Polly.Specs.Helpers.Constants.SystemClockDependentTestCollection)]
public class WaitAndRetryForeverAsyncSpecs : IDisposable
{
public WaitAndRetryForeverAsyncSpecs()
Expand Down
2 changes: 1 addition & 1 deletion src/Polly.SharedSpecs/Retry/WaitAndRetryForeverSpecs.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

namespace Polly.Specs.Retry
{
[Collection("SystemClockDependantCollection")]
[Collection(Polly.Specs.Helpers.Constants.SystemClockDependentTestCollection)]
public class WaitAndRetryForeverSpecs : IDisposable
{
public WaitAndRetryForeverSpecs()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

namespace Polly.Specs.Retry
{
[Collection("SystemClockDependantCollection")]
[Collection(Polly.Specs.Helpers.Constants.SystemClockDependentTestCollection)]
public class WaitAndRetryForeverTResultAsyncSpecs : IDisposable
{
public WaitAndRetryForeverTResultAsyncSpecs()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

namespace Polly.Specs.Retry
{
[Collection("SystemClockDependantCollection")]
[Collection(Polly.Specs.Helpers.Constants.SystemClockDependentTestCollection)]
public class WaitAndRetryForeverTResultSpecs : IDisposable
{
public WaitAndRetryForeverTResultSpecs()
Expand Down
2 changes: 1 addition & 1 deletion src/Polly.SharedSpecs/Retry/WaitAndRetrySpecs.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

namespace Polly.Specs.Retry
{
[Collection("SystemClockDependantCollection")]
[Collection(Polly.Specs.Helpers.Constants.SystemClockDependentTestCollection)]
public class WaitAndRetrySpecs : IDisposable
{
public WaitAndRetrySpecs()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

namespace Polly.Specs.Retry
{
[Collection("SystemClockDependantCollection")]
[Collection(Polly.Specs.Helpers.Constants.SystemClockDependentTestCollection)]
public class WaitAndRetryTResultAsyncSpecs : IDisposable
{
public WaitAndRetryTResultAsyncSpecs()
Expand Down
2 changes: 1 addition & 1 deletion src/Polly.SharedSpecs/Retry/WaitAndRetryTResultSpecs.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

namespace Polly.Specs.Retry
{
[Collection("SystemClockDependantCollection")]
[Collection(Polly.Specs.Helpers.Constants.SystemClockDependentTestCollection)]
public class WaitAndRetryTResultSpecs : IDisposable
{
public WaitAndRetryTResultSpecs()
Expand Down
2 changes: 1 addition & 1 deletion src/Polly.SharedSpecs/Timeout/TimeoutAsyncSpecs.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

namespace Polly.Specs.Timeout
{
[Collection("SystemClockDependantCollection")]
[Collection(Polly.Specs.Helpers.Constants.SystemClockDependentTestCollection)]
public class TimeoutAsyncSpecs : TimeoutSpecsBase
{
#region Configuration
Expand Down
2 changes: 1 addition & 1 deletion src/Polly.SharedSpecs/Timeout/TimeoutSpecs.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

namespace Polly.Specs.Timeout
{
[Collection("SystemClockDependantCollection")]
[Collection(Polly.Specs.Helpers.Constants.SystemClockDependentTestCollection)]
public class TimeoutSpecs : TimeoutSpecsBase
{
#region Configuration
Expand Down
2 changes: 1 addition & 1 deletion src/Polly.SharedSpecs/Timeout/TimeoutTResultAsyncSpecs.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

namespace Polly.Specs.Timeout
{
[Collection("SystemClockDependantCollection")]
[Collection(Polly.Specs.Helpers.Constants.SystemClockDependentTestCollection)]
public class TimeoutTResultAsyncSpecs : TimeoutSpecsBase
{
#region Configuration
Expand Down
2 changes: 1 addition & 1 deletion src/Polly.SharedSpecs/Timeout/TimeoutTResultSpecs.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

namespace Polly.Specs.Timeout
{
[Collection("SystemClockDependantCollection")]
[Collection(Polly.Specs.Helpers.Constants.SystemClockDependentTestCollection)]
public class TimeoutTResultSpecs : TimeoutSpecsBase
{
#region Configuration
Expand Down
2 changes: 1 addition & 1 deletion src/Polly.SharedSpecs/Wrap/PolicyWrapContextAndKeySpecs.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

namespace Polly.Specs.Wrap
{
[Collection("SystemClockDependantCollection")]
[Collection(Polly.Specs.Helpers.Constants.SystemClockDependentTestCollection)]
public class PolicyWrapContextAndKeySpecs
{
#region PolicyKey and execution Context tests
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

namespace Polly.Specs.Wrap
{
[Collection("SystemClockDependantCollection")]
[Collection(Polly.Specs.Helpers.Constants.SystemClockDependentTestCollection)]
public class PolicyWrapContextAndKeySpecsAsync
{
#region PolicyKey and execution Context tests
Expand Down
2 changes: 1 addition & 1 deletion src/Polly.SharedSpecs/Wrap/PolicyWrapSpecs.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

namespace Polly.Specs.Wrap
{
[Collection("SystemClockDependantCollection")]
[Collection(Polly.Specs.Helpers.Constants.SystemClockDependentTestCollection)]
public class PolicyWrapSpecs
{
#region Instance configuration syntax tests, non-generic outer
Expand Down
2 changes: 1 addition & 1 deletion src/Polly.SharedSpecs/Wrap/PolicyWrapSpecsAsync.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

namespace Polly.Specs.Wrap
{
[Collection("SystemClockDependantCollection")]
[Collection(Polly.Specs.Helpers.Constants.SystemClockDependentTestCollection)]
public class PolicyWrapSpecsAsync
{
#region Instance configuration syntax tests, non-generic outer
Expand Down

0 comments on commit 64b21c8

Please sign in to comment.