Exemple #1
0
        public void WithBaseIDs_WhenCalled_ConfiguresDescendsFromOrEqualsForSelf(ID baseId)
        {
            Template template = new FakeTemplate().WithBaseIDs(new[] { baseId });

            template.DescendsFromOrEquals(template.ID).Should().BeTrue();
        }
Exemple #2
0
        public void WithBaseIDs_WhenCalled_DoesNotDescendFrom(ID baseId, ID randomId)
        {
            Template template = new FakeTemplate().WithBaseIDs(new[] { baseId });

            template.DescendsFrom(randomId).Should().BeFalse();
        }
Exemple #3
0
        public void Constructor_WhenCalledWithId_SetsTemplateId(string templateName, ID id)
        {
            Template template = new FakeTemplate(templateName, id);

            template.ID.Should().Be(id);
        }
Exemple #4
0
        public void WithBaseIDs_WhenCalled_ConfiguresDescendsFromBaseId(ID baseId)
        {
            Template template = new FakeTemplate().WithBaseIDs(new[] { baseId });

            template.DescendsFrom(baseId).Should().BeTrue();
        }
Exemple #5
0
        public void Constructor_WhenCalledWithoutParameters_LeavesDefaultTemplateName()
        {
            Template template = new FakeTemplate();

            template.Name.Should().Be("fakeTemplate");
        }
Exemple #6
0
        public void Constructor_WhenCalledWithName_SetsTemplateName(string templateName, ID id)
        {
            Template template = new FakeTemplate(templateName, id);

            template.Name.Should().Be(templateName);
        }
Exemple #7
0
        public void FakeTemplate_WhenCastedToSitecoreTemplate_ReturnsInstance()
        {
            Template template = new FakeTemplate();

            template.Should().NotBeNull();
        }
Exemple #8
0
        public void WithStandatdValues_WhenCalled_SetsStandardValueHolderId(ID standardValuesHolderId)
        {
            Template template = new FakeTemplate().WithStandatdValues(standardValuesHolderId);

            template.StandardValueHolderId.Should().Be(standardValuesHolderId);
        }
Exemple #9
0
        public void WithIcon_WhenCalled_SetsIcon(string icon)
        {
            Template template = new FakeTemplate().WithIcon(icon);

            template.Icon.Should().Be(icon);
        }
Exemple #10
0
        public void Constructor_WhenCalledWithoutParameters_LeavesBaseIdsEmpty()
        {
            Template template = new FakeTemplate();

            template.BaseIDs.Should().BeEmpty();
        }
Exemple #11
0
        public void WithFullName_WhenCalled_SetsFullName(string fullName)
        {
            Template template = new FakeTemplate().WithFullName(fullName);

            template.FullName.Should().Be(fullName);
        }