Commit c284d8e7 authored by Brickner_cp's avatar Brickner_cp

Improve SendAndReceievePacketTest.

parent eeeea13e
......@@ -81,12 +81,15 @@ namespace PcapDotNet.Core.Test
DateTime endSendingTime = DateTime.Now;
result = communicator.ReceivePacket(out packet);
for (int i = 0; i != NumPacketsToSend; ++i)
{
result = communicator.ReceivePacket(out packet);
Assert.AreEqual(PacketCommunicatorReceiveResult.Ok, result);
Assert.AreEqual(PacketCommunicatorReceiveResult.Ok, result);
Assert.AreEqual(sentPacket.Length, packet.Length);
MoreAssert.IsInRange(startSendingTime - TimeSpan.FromSeconds(1), endSendingTime + TimeSpan.FromSeconds(30), packet.Timestamp);
}
Assert.AreEqual<uint>(NumPacketsToSend, communicator.TotalStatistics.PacketsCaptured);
Assert.AreEqual(sentPacket.Length, packet.Length);
MoreAssert.IsInRange(startSendingTime - TimeSpan.FromSeconds(1), endSendingTime + TimeSpan.FromSeconds(30), packet.Timestamp);
}
}
......
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