mirror of
https://github.com/oliverbooth/X10D
synced 2024-11-22 19:28:48 +00:00
[ci skip] Assert that null throws
This commit is contained in:
parent
e88494fae4
commit
7086d36faa
@ -1,4 +1,4 @@
|
||||
using System.Net;
|
||||
using System.Net;
|
||||
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||
using X10D.Net;
|
||||
|
||||
@ -7,6 +7,20 @@ namespace X10D.Tests.Net;
|
||||
[TestClass]
|
||||
public class EndPointTests
|
||||
{
|
||||
[TestMethod]
|
||||
public void GetHost_Null_ShouldThrow()
|
||||
{
|
||||
Assert.ThrowsException<ArgumentNullException>(() => ((IPEndPoint?)null)!.GetHost());
|
||||
Assert.ThrowsException<ArgumentNullException>(() => ((DnsEndPoint?)null)!.GetHost());
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
public void GetPort_Null_ShouldThrow()
|
||||
{
|
||||
Assert.ThrowsException<ArgumentNullException>(() => ((IPEndPoint?)null)!.GetPort());
|
||||
Assert.ThrowsException<ArgumentNullException>(() => ((DnsEndPoint?)null)!.GetPort());
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
public void DnsEndPoint_GetHost_Localhost()
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user