public void CanReadLongAsShortStringEmpty() { ByteBuffer buffer = ByteBuffer.Allocate(0x1000); EncodingUtils.WriteShortStringBytes(buffer, ""); buffer.Flip(); long value = EncodingUtils.ReadLongAsShortString(buffer); Assert.AreEqual(0, value); }
public void CanReadLongAsShortStringNegative() { ByteBuffer buffer = ByteBuffer.Allocate(0x1000); EncodingUtils.WriteShortStringBytes(buffer, "-98878122"); buffer.Flip(); long value = EncodingUtils.ReadLongAsShortString(buffer); Assert.AreEqual(-98878122, value); }