public void ReadNull() { var buffer = new [] { DataCodes.Nil }; MsgPackSpec.ReadNil(buffer.ToSingleSegment(), out var readSize); readSize.ShouldBe(buffer.Length); }
public void BadReadNull() { var buffer = new [] { DataCodes.True }; var e = Should.Throw <InvalidOperationException>(() => MsgPackSpec.ReadNil(buffer.ToSingleSegment(), out _)); e.Message.ShouldBe("Wrong data code: 0xc3. Expected: 0xc0."); }