Ejemplo n.º 1
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));
        }
Ejemplo n.º 2
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));
        }
Ejemplo n.º 3
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));
        }