public void Should_read_and_write_shorts() { var buffer = new byte[1024]; using (var wrapper = new UnsafeBufferWrapper(buffer)) { const short value = 42; wrapper.Write(value); Assert.AreEqual(wrapper.Position, sizeof (short)); wrapper.ResetCursor(); var readValue = wrapper.ReadInt16(); Assert.AreEqual(value, readValue); } }