Наследование: ITagBuildingExpression
Пример #1
0
 public ElementActionExpression(BuilderSet set, Func <ElementRequest, bool> filter,
                                string filterDescription)
 {
     _set               = set;
     _filter            = filter;
     _filterDescription = filterDescription.IsNotEmpty() ? filterDescription : "User Defined";
 }
Пример #2
0
        public void import_puts_the_second_set_stuff_in_the_back()
        {
            var builder1 = MockRepository.GenerateMock<ITagBuilderPolicy>();
            var builder2 = MockRepository.GenerateMock<ITagBuilderPolicy>();
            var builder3 = MockRepository.GenerateMock<ITagBuilderPolicy>();

            var m1 = MockRepository.GenerateMock<ITagModifier>();
            var m2 = MockRepository.GenerateMock<ITagModifier>();
            var m3 = MockRepository.GenerateMock<ITagModifier>();
            var m4 = MockRepository.GenerateMock<ITagModifier>();
            var m5 = MockRepository.GenerateMock<ITagModifier>();

            var set1 = new BuilderSet();
            set1.Add(builder1);
            set1.Add(m1);
            set1.Add(m2);
            set1.Add(m3);

            var set2 = new BuilderSet();
            set2.Add(builder2);
            set2.Add(builder3);
            set2.Add(m4);
            set2.Add(m5);

            set1.Import(set2);

            set1.Policies.ShouldHaveTheSameElementsAs(builder1, builder2, builder3);
            set1.Modifiers.ShouldHaveTheSameElementsAs(m1, m2, m3, m4, m5);
        }
Пример #3
0
        public void insert_builder()
        {
            var builder1 = MockRepository.GenerateMock<ITagBuilderPolicy>();
            var builder2 = MockRepository.GenerateMock<ITagBuilderPolicy>();
            var builder3 = MockRepository.GenerateMock<ITagBuilderPolicy>();

            var set1 = new BuilderSet();
            set1.Add(builder2);
            set1.Add(builder3);

            set1.InsertFirst(builder1);
            set1.Policies.ShouldHaveTheSameElementsAs(builder1, builder2, builder3);
        }
Пример #4
0
        public void insert_builder()
        {
            var builder1 = new Mock<ITagBuilderPolicy>().Object;
            var builder2 = new Mock<ITagBuilderPolicy>().Object;
            var builder3 = new Mock<ITagBuilderPolicy>().Object;

            var set1 = new BuilderSet();
            set1.Add(builder2);
            set1.Add(builder3);

            set1.InsertFirst(builder1);
            set1.Policies.ShouldHaveTheSameElementsAs(builder1, builder2, builder3);

        }
Пример #5
0
 public void Import(BuilderSet <T> other)
 {
     _policies.AddRange(other._policies);
     _modifiers.AddRange(other._modifiers);
 }
Пример #6
0
 public void Import(BuilderSet other)
 {
     _policies.AddRange(other._policies);
     _modifiers.AddRange(other._modifiers);
 }
Пример #7
0
 public void Import(BuilderSet other)
 {
     _policies.AddRange(other._policies);
     _modifiers.AddRange(other._modifiers);
     _elementNamingConvention = other._elementNamingConvention;
 }
Пример #8
0
 public CategoryExpression(BuilderSet parent, Func<ElementRequest, bool> matcher)
 {
     _parent = parent;
     _matcher = matcher;
 }
Пример #9
0
 public ElementCategoryExpression(BuilderSet set)
 {
     _set = set;
 }
Пример #10
0
 public void Import(BuilderSet other)
 {
     _policies.AddRange(other._policies);
     _modifiers.AddRange(other._modifiers);
     _elementNamingConvention = other._elementNamingConvention;
 }
Пример #11
0
 public CategoryExpression(BuilderSet parent, Func <ElementRequest, bool> matcher)
 {
     _parent  = parent;
     _matcher = matcher;
 }
Пример #12
0
 public CategoryExpression(BuilderSet <T> parent, Func <T, bool> matcher)
 {
     _parent  = parent;
     _matcher = matcher;
 }