public void GenerateArgumentNullTest1()
        {
            var prefs = CreatePreferenceSet();

            var markupGenerator = new MarkupGenerator(prefs);

            Assert.Throws(typeof(ArgumentNullException), () => markupGenerator.Generate(null));
        }
        public void DontGenerateTest()
        {
            IPreferenceSet prefs = CreatePreferenceSet();

            prefs.Stub(x => x.Get <bool>(Preference.WebGenCopyXml)).Return(false);
            prefs.Stub(x => x.Get <bool>(Preference.WebGenCopyHtml)).Return(false);

            var slots           = CreateSlotModelCollection();
            var markupGenerator = new MarkupGenerator(prefs);

            markupGenerator.Generate(slots);

            Assert.IsNull(markupGenerator.XmlFilePaths);
            Assert.IsNull(markupGenerator.HtmlFilePaths);
        }
        public void GenerateXmlTest()
        {
            IPreferenceSet prefs = CreatePreferenceSet();
            var            slots = CreateSlotModelCollection();

            var markupGenerator = new MarkupGenerator(prefs);

            markupGenerator.GenerateXml(slots);

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

            Assert.AreEqual(3, markupGenerator.XmlFilePaths.Count());
            Assert.AreEqual(Path.Combine(folderPath, "SlotSummary.xml"), markupGenerator.XmlFilePaths.ElementAt(0));
            Assert.AreEqual(Path.Combine(folderPath, "Test2.xml"), markupGenerator.XmlFilePaths.ElementAt(1));
            Assert.AreEqual(Path.Combine(folderPath, "Test1.xml"), markupGenerator.XmlFilePaths.ElementAt(2));
        }