Пример #1
0
        public void AdditionalTargetTest()
        {
            var target = new Mock <IAdditionlTargets>();

            target.Setup(i => i.Targets()).Returns(new object[] { 3 });
            var elt = new FrameworkElement();

            elt.DataContext = target.Object;

            var targets = elt.AllSources().ToList();

            Assert.Equal(3, targets.Count);
            Assert.Equal(3, targets.First());
        }