Commit 252d0cf2 authored by Brickner_cp's avatar Brickner_cp

--no commit message

--no commit message
parent b8ad42f6
......@@ -242,8 +242,8 @@ namespace PcapDotNet.Core.Test
}
}
private void TestGetStatistics(string sourceMac, string destinationMac, int numPacketsToSend, int numStatisticsToGather, int numStatisticsToBreakLoop, double secondsToWait, int packetSize,
PacketCommunicatorReceiveResult expectedResult, int expectedNumStatistics, int expectedNumPackets, double expectedMinSeconds, double expectedMaxSeconds)
private static void TestGetStatistics(string sourceMac, string destinationMac, int numPacketsToSend, int numStatisticsToGather, int numStatisticsToBreakLoop, double secondsToWait, int packetSize,
PacketCommunicatorReceiveResult expectedResult, int expectedNumStatistics, int expectedNumPackets, double expectedMinSeconds, double expectedMaxSeconds)
{
using (PacketCommunicator communicator = OpenLiveDevice())
{
......@@ -267,6 +267,7 @@ namespace PcapDotNet.Core.Test
result = communicator.GetStatistics(numStatisticsToGather,
delegate(PacketSampleStatistics statistics)
{
Assert.IsNotNull(statistics.ToString());
totalPackets += statistics.AcceptedPackets;
totalBytes += statistics.AcceptedBytes;
++numStatisticsGot;
......
......@@ -270,7 +270,12 @@ namespace PcapDotNet.Core.Test
}
}
communicator = new OfflinePacketDevice(dumpFilename).Open();
IPacketDevice device = new OfflinePacketDevice(dumpFilename);
Assert.AreEqual(0, device.Addresses.Count);
Assert.AreEqual(string.Empty, device.Description);
Assert.AreEqual(DeviceFlags.None, device.Flags);
Assert.AreEqual(dumpFilename, device.Name);
communicator = device.Open();
try
{
Assert.AreEqual(DataLinkKind.Ethernet, communicator.DataLink.Kind);
......
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