Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,33 @@ please modify the original csharp file found at the link and submit the PR with
[[address-parsing]]
== Address Parsing

[source,csharp]
----
var testcases = new[,]
{
{"helloworld/[::1]:9200", "helloworld", "[::1]", "9200"},
{"elastic.co/192.168.2.1:231", "elastic.co", "192.168.2.1", "231"}
};

var address = testcases[i, 0];

var fqdn = testcases[i, 1];

var ip = testcases[i, 2];

var port = testcases[i, 3];

var match = SniffParser.AddressRegex.Match(address);

match.Success.Should().BeTrue();

match.Groups["fqdn"].Value.ShouldBeEquivalentTo(fqdn);

match.Groups["ip"].Value.ShouldBeEquivalentTo(ip);

match.Groups["port"].Value.ShouldBeEquivalentTo(port);
----

[source,csharp]
----
var testcases = new[,]
Expand Down
1 change: 1 addition & 0 deletions paket.dependencies
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ nuget System.Collections.Immutable
nuget FluentAssertions
nuget Bogus
nuget DiffPlex
nuget SemanticVersioning

// profiling / benchmarking
nuget JetBrains.Profiler.Kernel.Windows.Api
Expand Down
347 changes: 172 additions & 175 deletions paket.lock

Large diffs are not rendered by default.

Loading