Skip to content

Commit ff67f45

Browse files
committed
Fixed DNAT-related tests of TransparentProxyServer
1 parent 2c94e05 commit ff67f45

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

TechnitiumLibrary.UnitTests/TechnitiumLibrary.Net/Proxy/TransparentProxyServerTests.cs

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -71,9 +71,6 @@ await Assert.ThrowsExactlyAsync<SocketException>(
7171
[TestMethod]
7272
public void Constructor_DNAT_OnNonUnix_MustThrowNotSupportedException()
7373
{
74-
if (Environment.OSVersion.Platform == PlatformID.Unix)
75-
Assert.Inconclusive("DNAT platform restriction applies only on non-Unix systems.");
76-
7774
Assert.ThrowsExactly<NotSupportedException>(
7875
() => new TransparentProxyServer(
7976
localEP: new IPEndPoint(IPAddress.Loopback, 0),
@@ -83,11 +80,9 @@ public void Constructor_DNAT_OnNonUnix_MustThrowNotSupportedException()
8380
}
8481

8582
[TestMethod]
83+
[OSCondition(OperatingSystems.Linux | OperatingSystems.OSX | OperatingSystems.FreeBSD)]
8684
public void Constructor_DNAT_WithIPv6_MustThrowNotSupportedException()
8785
{
88-
if (Environment.OSVersion.Platform != PlatformID.Unix)
89-
return; // explicitly skip, not inconclusive
90-
9186
Assert.ThrowsExactly<NotSupportedException>(
9287
() => new TransparentProxyServer(
9388
localEP: new IPEndPoint(IPAddress.IPv6Loopback, 0),

0 commit comments

Comments
 (0)