Пример #1
0
        public void ShouldntContainErrorBuilderWhenThereIsABuilderForAlias()
        {
            var builders = BuildersFactory.GetAllBuildersThatApply(SectionDocumentTypes.Footer);

            Assert.AreEqual(1, builders.Count);
            Assert.AreEqual(0, builders.Count(x => x is ErrorSectionBuilder));
        }
Пример #2
0
        public void ShouldReturnErrorBuilderWhenDidntFindBuilderForAlias()
        {
            var builders = BuildersFactory.GetAllBuildersThatApply("I'm Sure there is no builder for that");

            Assert.AreEqual(1, builders.Count);
            Assert.AreEqual(1, builders.Count(x => x is ErrorSectionBuilder));
        }
Пример #3
0
        public void ShouldReturnOnlyAllBuilderWhichApplyToDoctypeAlias()
        {
            var builders = BuildersFactory.GetAllBuildersThatApply(SectionDocumentTypes.Header);

            Assert.AreEqual(2, builders.Count);
            Assert.AreEqual(1, builders.Count(x => x is HeaderBuilder));
            Assert.AreEqual(1, builders.Count(x => x is FakeBuilder));
        }
Пример #4
0
        public void ShouldReturnListOfBuilders()
        {
            var builders = BuildersFactory.GetAllBuildersThatApply(SectionDocumentTypes.Header);

            Assert.AreEqual(2, builders.Count);
        }