Skip to content

Commit dbcd329

Browse files
committed
Fix Test names
1 parent 0b5090a commit dbcd329

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/libraries/System.Net.Primitives/tests/FunctionalTests/IPAddressTest.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -353,30 +353,30 @@ public static void Address_ReadOnlyStatics_Set_Failure()
353353
}
354354

355355
[Fact]
356-
public static void ScopeId_ThrowsIPv4SpecificMessage()
356+
public static void ScopeId_Throws_SocketException_IPv4SpecificMessage()
357357
{
358358
var ip = IPV4Address1();
359359
SocketException ex = Assert.Throws<SocketException>(() => _ = ip.ScopeId);
360360
Assert.Equal((int)SocketError.OperationNotSupported, ex.ErrorCode);
361-
Assert.Contains($"'{ip.AddressFamily}' {nameof(AddressFamily)}.", ex.Message);
361+
Assert.Contains($"'{ip.AddressFamily}' {nameof(AddressFamily)}.", ex.Message, StringComparison.OrdinalIgnoreCase);
362362
}
363363

364364
[Fact]
365-
public static void Address_ThrowsIPv6SpecificMessage()
365+
public static void Address_Throws_SocketException_IPv6SpecificMessage()
366366
{
367367
var ip = IPV6Address1();
368368
SocketException ex = Assert.Throws<SocketException>(() => _ = ip.Address);
369369
Assert.Equal((int)SocketError.OperationNotSupported, ex.ErrorCode);
370-
Assert.Contains($"'{ip.AddressFamily}' {nameof(AddressFamily)}.", ex.Message);
370+
Assert.Contains($"'{ip.AddressFamily}' {nameof(AddressFamily)}.", ex.Message, StringComparison.OrdinalIgnoreCase);
371371
}
372372

373373
[Fact]
374-
public static void Address_ReadOnlyStatic_ThrowsReadOnlyException()
374+
public static void Address_Throws_SocketException_ReadOnlyMessage()
375375
{
376376
var readOnlyIp = IPAddress.Loopback;
377377
var ex = Assert.Throws<SocketException>(() => readOnlyIp.Address = 0x0A000001L);
378378
Assert.Equal((int)SocketError.OperationNotSupported, ex.ErrorCode);
379-
Assert.Contains("read-only", ex.Message);
379+
Assert.Contains("read-only", ex.Message, StringComparison.OrdinalIgnoreCase);
380380
}
381381
#pragma warning restore 618
382382
}

0 commit comments

Comments
 (0)