Ejemplo n.º 1
0
        public void SetUp()
        {
            b1 = MockRepository.GenerateMock <ITagBuilderPolicy>();
            b2 = MockRepository.GenerateMock <ITagBuilderPolicy>();
            b3 = MockRepository.GenerateMock <ITagBuilderPolicy>();
            b4 = MockRepository.GenerateMock <ITagBuilderPolicy>();
            b5 = MockRepository.GenerateMock <ITagBuilderPolicy>();
            b6 = MockRepository.GenerateMock <ITagBuilderPolicy>();
            b7 = MockRepository.GenerateMock <ITagBuilderPolicy>();
            b8 = MockRepository.GenerateMock <ITagBuilderPolicy>();

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

            category1 = new TagCategory();
            category1.Add(b1);
            category1.Add(b2);
            category1.Add(m1);
            category1.Add(m2);

            category1.ForProfile("A").Add(b3);
            category1.ForProfile("A").Add(m3);

            category1.ForProfile("B").Add(b4);

            category1.ForProfile("D").Add(b8);


            var category2 = new TagCategory();

            category2.Add(b5);
            category2.Add(m4);
            category2.ForProfile("A").Add(b6);
            category2.ForProfile("C").Add(b7);
            category2.ForProfile("B").Add(m5);


            category1.Import(category2);
        }
Ejemplo n.º 2
0
        public when_importing_one_category_into_another()
        {
            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;
            b8 = new Mock <ITagBuilderPolicy>().Object;

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

            category1 = new TagCategory();
            category1.Add(b1);
            category1.Add(b2);
            category1.Add(m1);
            category1.Add(m2);

            category1.ForProfile("A").Add(b3);
            category1.ForProfile("A").Add(m3);

            category1.ForProfile("B").Add(b4);

            category1.ForProfile("D").Add(b8);


            var category2 = new TagCategory();

            category2.Add(b5);
            category2.Add(m4);
            category2.ForProfile("A").Add(b6);
            category2.ForProfile("C").Add(b7);
            category2.ForProfile("B").Add(m5);


            category1.Import(category2);
        }
Ejemplo n.º 3
0
        public void SetUp()
        {
            b1 = MockRepository.GenerateMock <ITagBuilderPolicy <FakeSubject> >();
            b2 = MockRepository.GenerateMock <ITagBuilderPolicy <FakeSubject> >();
            b3 = MockRepository.GenerateMock <ITagBuilderPolicy <FakeSubject> >();
            b4 = MockRepository.GenerateMock <ITagBuilderPolicy <FakeSubject> >();
            b5 = MockRepository.GenerateMock <ITagBuilderPolicy <FakeSubject> >();
            b6 = MockRepository.GenerateMock <ITagBuilderPolicy <FakeSubject> >();
            b7 = MockRepository.GenerateMock <ITagBuilderPolicy <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);
        }
Ejemplo n.º 4
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.º 5
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.º 6
0
 public void Add(ITagBuilderPolicy policy) => _profiles[TagConstants.Default].Add(policy);
Ejemplo n.º 7
0
 public void InsertFirst(ITagBuilderPolicy policy) => _policies.Insert(0, policy);
Ejemplo n.º 8
0
 public void Add(ITagBuilderPolicy policy) => _policies.Add(policy);
Ejemplo n.º 9
0
        public void SetUp()
        {
            b1 = MockRepository.GenerateMock<ITagBuilderPolicy<FakeSubject>>();
            b2 = MockRepository.GenerateMock<ITagBuilderPolicy<FakeSubject>>();
            b3 = MockRepository.GenerateMock<ITagBuilderPolicy<FakeSubject>>();
            b4 = MockRepository.GenerateMock<ITagBuilderPolicy<FakeSubject>>();
            b5 = MockRepository.GenerateMock<ITagBuilderPolicy<FakeSubject>>();
            b6 = MockRepository.GenerateMock<ITagBuilderPolicy<FakeSubject>>();
            b7 = MockRepository.GenerateMock<ITagBuilderPolicy<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);
        }
Ejemplo n.º 10
0
 public void Add(ITagBuilderPolicy <T> policy)
 {
     _policies.Add(policy);
 }
Ejemplo n.º 11
0
 /// <summary>
 /// Adds a builder policy to the default category and profile
 /// </summary>
 /// <param name="policy"> </param>
 public void Add(ITagBuilderPolicy policy) => Default.Add(policy);
Ejemplo n.º 12
0
        public void SetUp()
        {
            b1 = MockRepository.GenerateMock<ITagBuilderPolicy<FakeSubject>>();
            b2 = MockRepository.GenerateMock<ITagBuilderPolicy<FakeSubject>>();
            b3 = MockRepository.GenerateMock<ITagBuilderPolicy<FakeSubject>>();
            b4 = MockRepository.GenerateMock<ITagBuilderPolicy<FakeSubject>>();
            b5 = MockRepository.GenerateMock<ITagBuilderPolicy<FakeSubject>>();
            b6 = MockRepository.GenerateMock<ITagBuilderPolicy<FakeSubject>>();
            b7 = MockRepository.GenerateMock<ITagBuilderPolicy<FakeSubject>>();
            b8 = MockRepository.GenerateMock<ITagBuilderPolicy<FakeSubject>>();

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

            category1 = new TagCategory<FakeSubject>();
            category1.Add(b1);
            category1.Add(b2);
            category1.Add(m1);
            category1.Add(m2);

            category1.ForProfile("A").Add(b3);
            category1.ForProfile("A").Add(m3);

            category1.ForProfile("B").Add(b4);

            category1.ForProfile("D").Add(b8);

            var category2 = new TagCategory<FakeSubject>();
            category2.Add(b5);
            category2.Add(m4);
            category2.ForProfile("A").Add(b6);
            category2.ForProfile("C").Add(b7);
            category2.ForProfile("B").Add(m5);

            category1.Import(category2);
        }
Ejemplo n.º 13
0
 /// <summary>
 /// Adds a builder policy to the default category and profile
 /// </summary>
 /// <param name="policy"> </param>
 public void Add(ITagBuilderPolicy policy) => Default.Add(policy);
Ejemplo n.º 14
0
 /// <summary>
 /// Adds a builder policy to the default category and profile
 /// </summary>
 /// <param name="policy"> </param>
 public void Add(ITagBuilderPolicy <T> policy)
 {
     Default.Add(policy);
 }
Ejemplo n.º 15
0
 public void Add(ITagBuilderPolicy policy)
 {
     _policies.Add(policy);
 }
Ejemplo n.º 16
0
 public void InsertFirst(ITagBuilderPolicy policy)
 {
     _policies.Insert(0, policy);
 }
Ejemplo n.º 17
0
        public when_importing_one_category_into_another()
        {
            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;
            b8 = new Mock<ITagBuilderPolicy>().Object;

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

            category1 = new TagCategory();
            category1.Add(b1);
            category1.Add(b2);
            category1.Add(m1);
            category1.Add(m2);

            category1.ForProfile("A").Add(b3);
            category1.ForProfile("A").Add(m3);

            category1.ForProfile("B").Add(b4);

            category1.ForProfile("D").Add(b8);


            var category2 = new TagCategory();
            category2.Add(b5);
            category2.Add(m4);
            category2.ForProfile("A").Add(b6);
            category2.ForProfile("C").Add(b7);
            category2.ForProfile("B").Add(m5);


            category1.Import(category2);
        }
Ejemplo n.º 18
0
 public void Add(ITagBuilderPolicy policy)
 {
     _profiles[TagConstants.Default].Add(policy);
 }
Ejemplo n.º 19
0
 public void InsertFirst(ITagBuilderPolicy <T> policy)
 {
     _policies.Insert(0, policy);
 }