Ejemplo n.º 1
0
        public TagLibrary_Import_Tester()
        {
            b1 = new Mock<ITagBuilderPolicy>().Object;
            b2 = new Mock<ITagBuilderPolicy>().Object;
            b3 = new Mock<ITagBuilderPolicy>().Object;
            b4 = new Mock<ITagBuilderPolicy>().Object;
            b5 = new Mock<ITagBuilderPolicy>().Object;
            b6 = new Mock<ITagBuilderPolicy>().Object;
            b7 = new Mock<ITagBuilderPolicy>().Object;

            m1 = new Mock<ITagModifier>().Object;
            m2 = new Mock<ITagModifier>().Object;
            m3 = new Mock<ITagModifier>().Object;
            m4 = new Mock<ITagModifier>().Object;

            library1 = new TagLibrary();


            library1.Add(b1);
            library1.Add(m1);

            library1.Default.Profile("A").Add(b2);
            library1.Default.Profile("A").Add(m2);

            library1.Category("Cat1").Add(b3);
            library1.Category("Cat1").Add(m3);

            library1.Category("Cat1").Profile("A").Add(b4);


            var library2 = new TagLibrary();
            library2.Add(b5);
            library2.Add(m4);

            library2.Category("Cat2").Add(b6);
            library2.Category("Cat1").Add(b7);

            library1.Import(library2);
        }
Ejemplo n.º 2
0
        public void SetUp()
        {
            b1 = MockRepository.GenerateMock<ITagBuilder<FakeSubject>>();
            b2 = MockRepository.GenerateMock<ITagBuilder<FakeSubject>>();
            b3 = MockRepository.GenerateMock<ITagBuilder<FakeSubject>>();
            b4 = MockRepository.GenerateMock<ITagBuilder<FakeSubject>>();
            b5 = MockRepository.GenerateMock<ITagBuilder<FakeSubject>>();
            b6 = MockRepository.GenerateMock<ITagBuilder<FakeSubject>>();
            b7 = MockRepository.GenerateMock<ITagBuilder<FakeSubject>>();

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

            library1 = new TagLibrary<FakeSubject>();

            library1.Add(b1);
            library1.Add(m1);

            library1.Default.Profile("A").Add(b2);
            library1.Default.Profile("A").Add(m2);

            library1.Category("Cat1").Add(b3);
            library1.Category("Cat1").Add(m3);

            library1.Category("Cat1").Profile("A").Add(b4);

            var library2 = new TagLibrary<FakeSubject>();
            library2.Add(b5);
            library2.Add(m4);

            library2.Category("Cat2").Add(b6);
            library2.Category("Cat1").Add(b7);

            library1.Import(library2);
        }