You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

25 regels
806 B

  1. using System;
  2. using System.Collections.Generic;
  3. using System.Text;
  4. using Xunit;
  5. using JTNE.Protocol.Extensions;
  6. using JTNE.Protocol.Enums;
  7. namespace JTNE.Protocol.Test
  8. {
  9. public class JTNEPackageTest
  10. {
  11. [Fact]
  12. public void Test1()
  13. {
  14. var hex = "23 23 05 FE 4C 47 48 43 34 56 31 44 33 48 45 32 30 32 36 35 32 01 00 08 12 06 08 12 06 3A 00 01 E9".ToHexBytes();
  15. var package = JTNESerializer.Deserialize(hex);
  16. Assert.Equal("LGHC4V1D3HE202652", package.VIN);
  17. Assert.Equal(JTNEAskId.CMD.ToByteValue(), package.AskId);
  18. Assert.Equal((ushort)8, package.DataUnitLength);
  19. Assert.Equal(0x01, package.EncryptMethod);
  20. Assert.Equal(JTNEMsgId.platformlogin.ToByteValue(), package.MsgId);
  21. }
  22. }
  23. }