Jo Shields a575963da9 Imported Upstream version 3.6.0
Former-commit-id: da6be194a6b1221998fc28233f2503bd61dd9d14
2014-08-13 10:39:27 +01:00

28 lines
1.2 KiB
C#

// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information.
namespace System.Data.Entity.SqlServer
{
using System.Data.Entity.Infrastructure;
using System.Reflection;
using Xunit;
public class SqlAzureExecutionStrategyTests
{
[Fact]
public void Default_constructor_uses_ExponentialRetryDelayStrategy_and_SqlAzureRetriableExceptionDetector()
{
var executionStrategy = new SqlAzureExecutionStrategy();
var retryDelayStrategyProperty = executionStrategy.GetType().GetProperty(
"RetryDelayStrategy",
BindingFlags.Instance | BindingFlags.NonPublic);
Assert.IsType<ExponentialRetryDelayStrategy>(retryDelayStrategyProperty.GetValue(executionStrategy, null));
var retriableExceptionDetectorProperty = executionStrategy.GetType().GetProperty(
"RetriableExceptionDetector",
BindingFlags.Instance | BindingFlags.NonPublic);
Assert.IsType<SqlAzureRetriableExceptionDetector>(retriableExceptionDetectorProperty.GetValue(executionStrategy, null));
}
}
}