public async Task SendPingAsyncWithIPAddressAndTimeoutAndBufferAndPingOptions()
{
IPAddress localIpAddress = await TestSettings.GetLocalIPAddress();
var options = new PingOptions();
byte[] buffer = TestSettings.PayloadAsBytes;
await SendBatchPingAsync(
(ping) => ping.SendPingAsync(localIpAddress, TestSettings.PingTimeout, buffer, options),
(pingReply) =>
{
Assert.Equal(IPStatus.Success, pingReply.Status);
Assert.True(pingReply.Address.Equals(localIpAddress));
Assert.Equal(buffer, pingReply.Buffer);
Assert.InRange(pingReply.RoundtripTime, 0, long.MaxValue);
});
}