InsertFirst() публичный Метод

public InsertFirst ( ITagBuilderPolicy policy ) : void
policy ITagBuilderPolicy
Результат void
Пример #1
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);
        }
Пример #2
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);

        }