A fork of Eusth's IPA
Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.

34 wiersze
789B

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