Пример #1
0
        public void ExplicitTargetTest()
        {
            object target = new object();
            var    elt    = new FrameworkElement();

            TargetSelector.SetTargetProperty(elt, target);
            Assert.Equal(target, TargetSelector.ResolveTarget(elt).First());
        }
Пример #2
0
        public void CanPushDateModel()
        {
            var data = new DateTime(1975, 07, 28);

            Elt.DataContext = data;
            TargetSelector.SetTargetProperty(Elt, target.Object);
            FireMethod(nameof(ITarget.HasDataContext));
            target.Verify(i => i.HasDataContext(data), Times.Once);
        }