public void TestException() { Assert.Throws <ArgumentNullException>(() => new GetNextRequestPdu(null)); Assert.Throws <ArgumentNullException>(() => new GetNextRequestPdu(0, null)); var pdu = new GetNextRequestPdu(0, ErrorCode.NoError, 0, new List <Variable>()); Assert.Throws <ArgumentNullException>(() => pdu.AppendBytesTo(null)); Assert.AreEqual("GET NEXT request PDU: seq: 0; status: 0; index: 0; variable count: 0", pdu.ToString()); }
public void TestException() { Assert.Throws <ArgumentNullException>(() => new GetNextRequestPdu(new Tuple <int, byte[]>(0, new byte[] { 0 }), null)); Assert.Throws <ArgumentNullException>(() => new GetNextRequestPdu(0, null)); var pdu = new GetNextRequestPdu(0, new List <Variable>()); Assert.Throws <ArgumentNullException>(() => pdu.AppendBytesTo(null)); Assert.Equal("GET NEXT request PDU: seq: 0; status: 0; index: 0; variable count: 0", pdu.ToString()); }
public void TestException() { Assert.Throws<ArgumentNullException>(() => new GetNextRequestPdu(new Tuple<int, byte[]>(0, new byte[] { 0 }), null)); Assert.Throws<ArgumentNullException>(() => new GetNextRequestPdu(0, null)); var pdu = new GetNextRequestPdu(0, ErrorCode.NoError, 0, new List<Variable>()); Assert.Throws<ArgumentNullException>(() => pdu.AppendBytesTo(null)); Assert.AreEqual("GET NEXT request PDU: seq: 0; status: 0; index: 0; variable count: 0", pdu.ToString()); }