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 line
710 B

  1. using JT808.Protocol.Interfaces;
  2. using JT808.Protocol.Internal;
  3. using System;
  4. using System.IO;
  5. using Xunit;
  6. namespace JT808.Protocol.Test
  7. {
  8. public class SplitPackageStrategyTest
  9. {
  10. [Fact]
  11. public void Test1()
  12. {
  13. IJT808SplitPackageStrategy splitPackageStrategy = new DefaultSplitPackageStrategyImpl();
  14. byte[] data;
  15. using (FileStream input = File.OpenRead(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Files", "test.txt")))
  16. {
  17. data = new byte[input.Length];
  18. input.Read(data, 0, (int)input.Length);
  19. }
  20. var result = splitPackageStrategy.Processor(data);
  21. }
  22. }
  23. }