Ejemplo n.º 1
0
        public void GenerateHtmlTest()
        {
            IPreferenceSet prefs = CreatePreferenceSet();
             IEnumerable<SlotModel> slots = CreateSlotModelCollection();

             var markupGenerator = new MarkupGenerator(prefs);
             markupGenerator.GenerateHtml(slots);

             Assert.AreEqual(6, markupGenerator.HtmlFilePaths.Count());
             Assert.AreEqual(Path.Combine(Path.GetTempPath(), "index.html"), markupGenerator.HtmlFilePaths.ElementAt(0));
             Assert.AreEqual(Path.Combine(Path.GetTempPath(), "mobile.html"), markupGenerator.HtmlFilePaths.ElementAt(1));
             Assert.AreEqual(Path.Combine(Path.GetTempPath(), "summary.html"), markupGenerator.HtmlFilePaths.ElementAt(2));
             Assert.AreEqual(Path.Combine(Path.GetTempPath(), "mobilesummary.html"), markupGenerator.HtmlFilePaths.ElementAt(3));
             Assert.AreEqual(Path.Combine(Path.GetTempPath(), "Test2.html"), markupGenerator.HtmlFilePaths.ElementAt(4));
             Assert.AreEqual(Path.Combine(Path.GetTempPath(), "Test1.html"), markupGenerator.HtmlFilePaths.ElementAt(5));
        }
Ejemplo n.º 2
0
        public void GenerateHtmlTest()
        {
            IPreferenceSet prefs = CreatePreferenceSet();
            var            slots = CreateSlotModelCollection();

            var markupGenerator = new MarkupGenerator(prefs);

            markupGenerator.GenerateHtml(slots);

            string folderPath = Path.Combine(Path.GetTempPath(), "hfm-" + Environment.UserName);

            Assert.AreEqual(6, markupGenerator.HtmlFilePaths.Count());
            Assert.AreEqual(Path.Combine(folderPath, "index.html"), markupGenerator.HtmlFilePaths.ElementAt(0));
            Assert.AreEqual(Path.Combine(folderPath, "mobile.html"), markupGenerator.HtmlFilePaths.ElementAt(1));
            Assert.AreEqual(Path.Combine(folderPath, "summary.html"), markupGenerator.HtmlFilePaths.ElementAt(2));
            Assert.AreEqual(Path.Combine(folderPath, "mobilesummary.html"), markupGenerator.HtmlFilePaths.ElementAt(3));
            Assert.AreEqual(Path.Combine(folderPath, "Test2.html"), markupGenerator.HtmlFilePaths.ElementAt(4));
            Assert.AreEqual(Path.Combine(folderPath, "Test1.html"), markupGenerator.HtmlFilePaths.ElementAt(5));
        }