Cardlife mod patcher
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.

38 lines
891B

  1. using System;
  2. using System.Collections.Generic;
  3. using System.IO;
  4. using System.Linq;
  5. using System.Text;
  6. using System.Threading.Tasks;
  7. using Xunit;
  8. namespace IPA.Tests
  9. {
  10. public class ShortcutTest
  11. {
  12. [Fact]
  13. public void CanDealWithEmptyFiles()
  14. {
  15. Shortcut.Create(".lnk", "", "", "", "", "", "");
  16. }
  17. [Fact]
  18. public void CanDealWithLongFiles()
  19. {
  20. Shortcut.Create(".lnk", Path.Combine(Path.GetTempPath(), string.Join("_", new string[500])), "", "", "", "", "");
  21. }
  22. [Fact]
  23. public void CantDealWithNull()
  24. {
  25. Assert.Throws<ArgumentException>(() => Shortcut.Create(".lnk", null, "", "", "", "", ""));
  26. }
  27. [Fact]
  28. public void CanDealWithWeirdCharacters()
  29. {
  30. Shortcut.Create(".lnk", "äöü", "", "", "", "", "");
  31. }
  32. }
  33. }