public void StandardNonMemberDataContractClassTest() { var model = new StandardNonMemberDataContractClassModel { IntValue = 0x12345678, InternalIntValue = 0x76543210, StringValue = "ABCDEFG", InternalStringValue = "GFEDCBA" }; using (var ms = new MemoryStream()) { ms.WriteValue(model); Assert.IsTrue( ms.ToArray().SequenceEqual(new byte[] { 0x01, 0x10, 0x32, 0x54, 0x76, 0x07, 0x00, (byte)'G', (byte)'F', (byte)'E', (byte)'D', (byte)'C', (byte)'B', (byte)'A' })); } }