forked from dotnet/runtime
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTlsSystemDefault.cs
More file actions
31 lines (28 loc) · 951 Bytes
/
TlsSystemDefault.cs
File metadata and controls
31 lines (28 loc) · 951 Bytes
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
28
29
30
31
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
using Xunit;
namespace System.Net.Tests
{
public class TlsSystemDefault
{
[Fact]
public void ServicePointManager_SecurityProtocolDefault_Ok()
{
Assert.Equal(SecurityProtocolType.SystemDefault, ServicePointManager.SecurityProtocol);
}
[Fact]
public void ServicePointManager_CheckAllowedProtocols_SystemDefault_Allowed()
{
SecurityProtocolType orig = ServicePointManager.SecurityProtocol;
try
{
ServicePointManager.SecurityProtocol = SecurityProtocolType.SystemDefault;
Assert.Equal(orig, ServicePointManager.SecurityProtocol);
}
finally
{
ServicePointManager.SecurityProtocol = orig;
}
}
}
}