-
Notifications
You must be signed in to change notification settings - Fork 330
Expand file tree
/
Copy pathLocalAppContextSwitchesTests.cs
More file actions
27 lines (23 loc) · 1.04 KB
/
LocalAppContextSwitchesTests.cs
File metadata and controls
27 lines (23 loc) · 1.04 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using System.Reflection;
using Xunit;
namespace Microsoft.Data.SqlClient.Tests
{
public class LocalAppContextSwitchesTests
{
[Theory]
[InlineData("SuppressInsecureTLSWarning", false)]
[InlineData("LegacyRowVersionNullBehavior", false)]
[InlineData("MakeReadAsyncBlocking", false)]
[InlineData("UseMinimumLoginTimeout", true)]
[InlineData("EnableMultiSubnetFailoverByDefault", false)]
public void DefaultSwitchValue(string property, bool expectedDefaultValue)
{
var switchesType = typeof(SqlCommand).Assembly.GetType("Microsoft.Data.SqlClient.LocalAppContextSwitches");
var switchValue = (bool)switchesType.GetProperty(property, BindingFlags.Public | BindingFlags.Static).GetValue(null);
Assert.Equal(expectedDefaultValue, switchValue);
}
}
}