public void SaveTest() { using (var expected = new TempFile()) using (var actual = new TempFile()) { FileUtility.Save(expected.FileName, @"[InternetShortcut] URL=http://www.yasashi.info/kage_01.htm "); var shortcutFile = new InternetShortcutFile("http://www.yasashi.info/kage_01.htm", ""); shortcutFile.Save(actual.FileName); FileAssert.AreEqual(expected.FileName, actual.FileName); } }
public void FileNameTest() { var shortcutFile = new InternetShortcutFile("http://www.yasashi.info/kage_01.htm", "「日陰でも育つ植物」TOP【ヤサシイエンゲイ】"); Assert.AreEqual("「日陰でも育つ植物」TOP【ヤサシイエンゲイ】.URL", shortcutFile.FileName); }