Пример #1
0
 public void Should_read_and_write_chars()
 {
     var buffer = new byte[1024];
     using (var wrapper = new UnsafeBufferWrapper(buffer))
     {
         const char value = 'x';
         wrapper.Write(value);
         Assert.AreEqual(wrapper.Position, sizeof (char));
         wrapper.ResetCursor();
         var readValue = wrapper.ReadChar();
         Assert.AreEqual(value, readValue);
     }
 }