示例#1
0
        public void GetSnippetsNotAssociatedWithSlots_Test()
        {
            using (HttpSimulator httpSimulator = GetStandardSimulatedRequest())
            {
                string path = "/cancertopics";

                SectionDetail      target   = new SectionDetail(); // TODO: Initialize to an appropriate value
                List <SnippetInfo> expected = null;                // TODO: Initialize to an appropriate value
                expected = new List <SnippetInfo>()
                {
                    new SnippetInfo {
                        ContentID = "", Data = "", SlotName = "FooterSlot", SnippetTemplatePath = ""
                    },
                    new SnippetInfo {
                        ContentID = "", Data = "", SlotName = "LeftNavSlot", SnippetTemplatePath = ""
                    }
                };
                List <SnippetInfo> actual;

                List <string> snippets = new List <string>()
                {
                    "BannerSlot"
                };
                IEnumerable <string> templateSlotExclusionList = snippets;

                SectionDetail sectionDetail = SectionDetailFactory.GetSectionDetail(path);
                actual = sectionDetail.GetSnippetsNotAssociatedWithSlots(templateSlotExclusionList);
                Assert.AreEqual(expected.ToArray()[0].SlotName, actual.ToArray()[0].SlotName);
                Assert.AreEqual(expected.ToArray()[1].SlotName, actual.ToArray()[1].SlotName);
            }
        }