public void ParseTest() { Data target = new Data() { Value = new byte[] { 9, 8, 7, 6, 5, 4, 3, 2, 1 }, }; byte[] expected = new byte[] { 0xee, 0xee, 0xee, 0xee, 0x00, 0x13, 0x00, 0x09, 0x09, 0x08, 0x07, 0x06, 0x05, 0x04, 0x03, 0x02, 0x01, }; byte[] actual = new byte[] { 0xee, 0xee, 0xee, 0xee, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }; int startIndex = 4; target.GetBytes(actual, ref startIndex); Assert.AreEqual(17, startIndex); Helpers.AreArrayEqual(expected, actual); }