public virtual void FrameTypeEncode() { Debug.WriteLine("=================================================================================\r\n"); DateTime date = cal; Debug.WriteLine("Encoding date '" + date.ToString() + "'"); Debug.WriteLine("Expecting an encoding of:\r\n" + ByteUtil.Dump(datedata)); byte[] data = datatype.Encode(date); Assert.NotNull(data); Debug.WriteLine("Encoded as:\r\n" + ByteUtil.Dump(data)); Assert.True(data.Length == 8); for (int i = 0; i < datedata.Length; i++) { Assert.True(data[i] == datedata[i], "element " + i + " should be " + datedata[i] + " but is '" + data[i] + "'"); } Debug.WriteLine("Test Completed Successfully =====================================================\r\n"); }