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.
 
 
 
 

37 lines
928 B

using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Xunit;
namespace IPA.Tests
{
public class ShortcutTest
{
[Fact]
public void CanDealWithEmptyFiles()
{
Shortcut.Create(".lnk", "", "", "", "", "", "");
}
[Fact]
public void CanDealWithLongFiles()
{
Shortcut.Create(".lnk", Path.Combine(Path.GetTempPath(), string.Join("_", new string[500])), "", "", "", "", "");
}
[Fact]
public void CantDealWithNull()
{
Assert.Throws<ArgumentException>(() => Shortcut.Create(".lnk", null, "", "", "", "", ""));
}
[Fact]
public void CanDealWithWeirdCharacters()
{
Shortcut.Create(".lnk", "äöü", "", "", "", "", "");
}
}
}