public void WriteOpDeletion() { var writeOp = new WriteOpLCS { WriteOpType = WriteOpType.Deletion }; var actual = LCSCore.LCSDeserialization(writeOp).ByteArrayToString(); var expected = "00000000".ToLower(); Assert.Equal(expected, actual); }
public void WriteOpValue() { var writeOp = new WriteOpLCS { WriteOpType = WriteOpType.Value, Value = "cafed00d".FromHexToBytes() }; var actual = LCSCore.LCSDeserialization(writeOp).ByteArrayToString(); var expected = "0100000004000000CAFED00D".ToLower(); Assert.Equal(expected, actual); }
public WriteOpLCS GetWriteOp(byte[] source, ref int cursor) { var retVal = new WriteOpLCS(); retVal.WriteOpType = source.LCSerialization <uint>(ref cursor); if (retVal.WriteOpTypeEnum == Enum.EWriteOpLCS.Value) { retVal.Value = source.LCSerialization <byte[]>(ref cursor); } return(retVal); }