Commit faa30217 authored by Brickner_cp's avatar Brickner_cp

Test LivePacketDeviceExtensions.GetMacAddress()

parent c1dde0d3
......@@ -7,6 +7,7 @@ using System.Threading;
using PcapDotNet.Core.Extensions;
using PcapDotNet.Packets;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using PcapDotNet.Packets.Ethernet;
using PcapDotNet.Packets.IpV6;
using PcapDotNet.Packets.TestUtils;
using PcapDotNet.TestUtils;
......@@ -798,6 +799,7 @@ namespace PcapDotNet.Core.Test
LivePacketDevice device = devices[0];
MoreAssert.IsMatch(@"Network adapter '.*' on local host", device.Description);
Assert.AreEqual(DeviceAttributes.None, device.Attributes);
Assert.AreNotEqual(MacAddress.Zero, device.GetMacAddress());
MoreAssert.IsInRange(1, 2, device.Addresses.Count);
foreach (DeviceAddress address in device.Addresses)
{
......
......@@ -575,7 +575,7 @@ namespace PcapDotNet.Packets.TestUtils
public static IcmpLayer NextIcmpLayer(this Random random)
{
IcmpMessageType icmpMessageType = random.NextEnum<IcmpMessageType>(IcmpMessageType.DomainNameReply);
IcmpMessageType icmpMessageType = random.NextEnum(IcmpMessageType.DomainNameReply);
switch (icmpMessageType)
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment