Esempio n. 1
0
        public void Apply_SameInstance()
        {
            var a = new AnnotationA { };

            var set = AnnotationSet(a, a);

            Assert.That(set, HasAnnotations(a));
        }
Esempio n. 2
0
        public void Apply_AnotherType_ThenSameType()
        {
            var a1 = new AnnotationA { };
            var b1 = new AnnotationB { };
            var a2 = new AnnotationA { };

            var set = AnnotationSet(a1, b1, a2);

            Assert.That(set, HasAnnotations(a2, b1));
        }
Esempio n. 3
0
        public void Apply_AnotherType_ThenSameType_AllowMultiple()
        {
            var a1 = new AnnotationA { AllowMultiple = true };
            var b1 = new AnnotationB { AllowMultiple = true };
            var a2 = new AnnotationA { AllowMultiple = true };

            var set = AnnotationSet(a1, b1, a2);

            Assert.That(set, HasAnnotations(a2, b1, a1));
        }
Esempio n. 4
0
        public void Apply_AnotherType_ThenSameInstance_AllowMultiple()
        {
            var a = new AnnotationA { AllowMultiple = true };
            var b = new AnnotationB { AllowMultiple = true };

            var set = AnnotationSet(a, b, a);

            // NOTE: Unlike BehaviorSet, adding same instance to AnnotationSet does NOT reorder items
            Assert.That(set, HasAnnotations(b, a));
        }
Esempio n. 5
0
        public void Apply_SameInstance_AllowMultiple()
        {
            var a = new AnnotationA { AllowMultiple = true };

            var set = AnnotationSet(a, a);

            Assert.That(set, HasAnnotations(a));
        }