A fork of Eusth's IPA
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

34 lignes
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. }