Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
StackExchange.Redis
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
tsai
StackExchange.Redis
Commits
f4a3d964
Unverified
Commit
f4a3d964
authored
Mar 14, 2020
by
Nick Craver
Committed by
GitHub
Mar 14, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add test for #1183 (#1384)
Clarifies how IPv6 needs to be expressed in example usage.
parent
c7cb6df9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
0 deletions
+17
-0
Config.cs
tests/StackExchange.Redis.Tests/Config.cs
+17
-0
No files found.
tests/StackExchange.Redis.Tests/Config.cs
View file @
f4a3d964
using
System
;
using
System.IO
;
using
System.Linq
;
using
System.Net
;
using
System.Net.Sockets
;
using
System.Security.Authentication
;
using
System.Threading.Tasks
;
using
Xunit
;
...
...
@@ -111,6 +113,21 @@ public void ConfigurationOptionsSyncTimeout()
Assert
.
Equal
(
20
,
options
.
SyncTimeout
);
}
[
Theory
]
[
InlineData
(
"127.1:6379"
,
AddressFamily
.
InterNetwork
,
"127.0.0.1"
,
6379
)]
[
InlineData
(
"127.0.0.1:6379"
,
AddressFamily
.
InterNetwork
,
"127.0.0.1"
,
6379
)]
[
InlineData
(
"2a01:9820:1:24::1:1:6379"
,
AddressFamily
.
InterNetworkV6
,
"2a01:9820:1:24:0:1:1:6379"
,
0
)]
[
InlineData
(
"[2a01:9820:1:24::1:1]:6379"
,
AddressFamily
.
InterNetworkV6
,
"2a01:9820:1:24::1:1"
,
6379
)]
public
void
ConfigurationOptionsIPv6Parsing
(
string
configString
,
AddressFamily
family
,
string
address
,
int
port
)
{
var
options
=
ConfigurationOptions
.
Parse
(
configString
);
Assert
.
Single
(
options
.
EndPoints
);
var
ep
=
Assert
.
IsType
<
IPEndPoint
>(
options
.
EndPoints
[
0
]);
Assert
.
Equal
(
family
,
ep
.
AddressFamily
);
Assert
.
Equal
(
address
,
ep
.
Address
.
ToString
());
Assert
.
Equal
(
port
,
ep
.
Port
);
}
[
Fact
]
public
void
TalkToNonsenseServer
()
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment