Ejemplo n.º 1
0
        public void CompatibleValue()
        {
            var sut = new NewSetter(new ComponentModelTypeConverterBasedSourceValueConverter());

            sut.PropertyName = "Content";
            sut.Value        = "Pepito";
            var instance = new Button(new TestingPlatform());

            sut.Apply(instance);
            Assert.Equal("Pepito", instance.Content);
        }
Ejemplo n.º 2
0
        public void IncompatibleValue()
        {
            var sut = new NewSetter(new ComponentModelTypeConverterBasedSourceValueConverter())
            {
                PropertyName = "VerticalAlignment",
                Value        = "Top"
            };

            var instance = new Button(new TestingPlatform());

            sut.Apply(instance);
            Assert.Equal(VerticalAlignment.Top, instance.VerticalAlignment);
        }