예제 #1
0
        public void ByteBuffer_PutBytePopulatesBufferAtZeroOffset()
        {
            var buffer = new byte[1];
            var uut = new ByteBuffer(buffer);
            uut.PutByte(0, (byte)99);

            Assert.AreEqual((byte)99, buffer[0]);
        }
예제 #2
0
 public void ByteBuffer_PutByteCannotPutAtOffsetPastLength()
 {
     var buffer = new byte[1];
     var uut = new ByteBuffer(buffer);
     Assert.Throws<ArgumentOutOfRangeException>(() => uut.PutByte(1, 99));
 }