示例#1
0
        public void NoFile()
        {
            var testFilePath = "NoTestFile.html";
            var importer     = new HtmlBookmarkImporter();

            Assert.Throws <FileNotFoundException>(() => importer.Import(testFilePath));
        }
示例#2
0
        public void ImportTest()
        {
            var fileName = "chromeBookmark.html";
            var dir      = Assembly.GetExecutingAssembly().Location;

            dir += @"\..\..\..\ImportTests\TestFiles\" + fileName;
            var path     = Path.GetFullPath(dir);
            var importer = new HtmlBookmarkImporter();
            var list     = importer.Import(path);

            Assert.AreEqual(3, list.Count);
            Assert.AreEqual("Лайфхакер", list[2].Title);
        }