public WriteBinary ( byte bin ) : void | ||
bin | byte | The array of bytes to write. |
리턴 | void |
public void Write_Binary() { var r = new Random(); byte[] rnd = new byte[65536]; r.NextBytes(rnd); byte[] want = BuildBinBuffer(rnd); byte[] got; using (var os = new OtpOutputStream()) { os.WriteBinary(rnd); Assert.AreEqual(want.Length, os.Position); got = os.ToArray(); } CollectionAssert.AreEqual(want, got); }