示例#1
0
        public void AddSection_WhenCalled_AddsSectionToParentTemplate(string name, ID id)
        {
            var fakeTemplate = new FakeTemplate();

            fakeTemplate.AddSection(name, id);

            Template template = fakeTemplate.ToSitecoreTemplate();

            template.GetSections().Should().ContainSingle();
        }
示例#2
0
        public void AddSection_WhenCalled_AllowsGetSectionToBeFoundById(string name, ID id)
        {
            var             fakeTemplate = new FakeTemplate();
            TemplateSection section      = fakeTemplate.AddSection(name, id);

            Template template = fakeTemplate.ToSitecoreTemplate();

            var foundSection = template.GetSection(id);

            foundSection.Should().Be(section);
        }