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.

31 lines
905 B

  1. using JT809.Protocol;
  2. using JT809.Protocol.JT809Extensions;
  3. using JT809.Protocol.JT809MessageBody;
  4. using JT809.Protocol.JT809Exceptions;
  5. using System;
  6. using System.Collections.Generic;
  7. using System.Text;
  8. using Xunit;
  9. namespace JT809.Protocol.Test.JT809MessageBody
  10. {
  11. public class JT809_0x1007Test
  12. {
  13. [Fact]
  14. public void Test1()
  15. {
  16. JT809_0x1007 jT809_0X1007 = new JT809_0x1007();
  17. jT809_0X1007.ErrorCode = JT809Enums.JT809_0x1007_ErrorCode.主链路断开;
  18. var hex = JT809Serializer.Serialize(jT809_0X1007).ToHexString();
  19. }
  20. [Fact]
  21. public void Test2()
  22. {
  23. var bytes = "00".ToHexBytes();
  24. JT809_0x1007 jT809_0X1007 = JT809Serializer.Deserialize<JT809_0x1007>(bytes);
  25. Assert.Equal(JT809Enums.JT809_0x1007_ErrorCode.主链路断开, jT809_0X1007.ErrorCode);
  26. }
  27. }
  28. }