Exemple #1
0
        public void CheckTargetType_When_Not_TargetType_IsInstanceOfType_Target()
        {
            var s = new Style(typeof(ItemsControl));
            var b = new Button();

            Assert.ThrowsException <InvalidOperationException>(() => s.CheckTargetType(b));
        }
Exemple #2
0
        public void CheckTargetType_When_TargetType_Is_Null()
        {
            var s = new Style();

            s.TargetType.Should().BeNull();
            var cc = new ContentControl();

            Assert.ThrowsException <InvalidOperationException>(() => s.CheckTargetType(cc));
        }