public void DeserializationReturnsSurplusData() { var extra = Random.UInt(); var buffer = new ArrayBufferWriter <Byte>(); buffer.WriteSerializable(new BasicRecoverOk()) .WriteUInt32LE(extra); BasicRecoverOk.Deserialize(buffer.WrittenMemory.Span, out var _, out var surplus); Assert.Equal(expected: sizeof(UInt32), actual: surplus.Length); Assert.Equal(expected: extra, actual: BitConverter.ToUInt32(surplus)); }
private void Model_BasicRecoverOk(object sender, EventArgs e) { BasicRecoverOk?.Invoke(sender, e); }