Commit 54a0c0b1 authored by Brickner_cp's avatar Brickner_cp

Code Coverage 96.34%

parent 9fc92ea2
...@@ -219,5 +219,21 @@ namespace PcapDotNet.Packets.Test ...@@ -219,5 +219,21 @@ namespace PcapDotNet.Packets.Test
{ {
Assert.IsInstanceOfType(IcmpDatagram.CreateDatagram(new byte[0], -1, 0), typeof(IcmpUnknownDatagram)); Assert.IsInstanceOfType(IcmpDatagram.CreateDatagram(new byte[0], -1, 0), typeof(IcmpUnknownDatagram));
} }
[TestMethod]
[ExpectedException(typeof(ArgumentOutOfRangeException), AllowDerivedTypes = false)]
public void IcmpParameterProblemLayerOriginalDatagramLengthNotRound()
{
Layer layer = new IcmpParameterProblemLayer {OriginalDatagramLength = 6};
Assert.IsNotNull(layer);
}
[TestMethod]
[ExpectedException(typeof(ArgumentOutOfRangeException), AllowDerivedTypes = false)]
public void IcmpParameterProblemLayerOriginalDatagramLengthTooBig()
{
Layer layer = new IcmpParameterProblemLayer { OriginalDatagramLength = 2000 };
Assert.IsNotNull(layer);
}
} }
} }
\ No newline at end of file
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