diff --git a/Tests/CSharpCore/Unit/TrapV2PduTestFixture.cs b/Tests/CSharpCore/Unit/TrapV2PduTestFixture.cs index 840bbd9f..404b1128 100644 --- a/Tests/CSharpCore/Unit/TrapV2PduTestFixture.cs +++ b/Tests/CSharpCore/Unit/TrapV2PduTestFixture.cs @@ -12,12 +12,12 @@ public void TestException() Assert.Throws(() => new TrapV2Pdu(null, null)); Assert.Throws(() => new TrapV2Pdu(new Tuple(0, new byte[] { 0 }), null)); Assert.Throws(() => new TrapV2Pdu(0, null, 0, null)); - Assert.Throws(() => new TrapV2Pdu(0, new ObjectIdentifier("1.3.6"), 0, null)); + Assert.Throws(() => new TrapV2Pdu(0, new ObjectIdentifier("1.3.6"), 0, null)); var pdu = new TrapV2Pdu(0, new ObjectIdentifier("1.3"), 0, new List()); - Assert.Throws(() => { var test = pdu.ErrorIndex; }); - Assert.Throws(() => { var test = pdu.ErrorStatus; }); + Assert.Equal(Integer32.Zero, pdu.ErrorIndex); + Assert.Equal(Integer32.Zero, pdu.ErrorStatus); Assert.Throws(() => pdu.AppendBytesTo(null)); - + Assert.Equal("TRAP v2 PDU: request ID: 0; enterprise: 1.3; time stamp: 00:00:00; variable count: 0", pdu.ToString()); } }