public void WriteTagInvalid(uint tag) { var ms = new MemoryStream(); Assert.ThrowsException <TlvException>(() => { TlvEncoding.WriteTag(ms, tag); }); }
public void WriteTagSuccess(uint tag, byte[] expectedOutput) { var ms = new MemoryStream(); TlvEncoding.WriteTag(ms, tag); ms.Position = 0; var buf = new byte[ms.Length]; ms.Read(buf, 0, buf.Length); AssertByteArrayEqual(expectedOutput, buf); }