Exemplo n.º 1
0
        public void PropertyChanged_ThrowsException_WhenBadPropertyName()
        {
            var sut = new AClassWithProperties(1, 1);

            Assert.Throws <PropertyChangedException>(
                () => Assert.PropertyChanged(sut, "Value1", () => sut.Value2 = 2)
                );
        }
Exemplo n.º 2
0
        public void PropertyChanged_MultipleChanges()
        {
            var sut = new AClassWithProperties(1, 1);

            Assert.PropertyChanged(sut, "Value2", () => {
                sut.Value1 = 2;
                sut.Value2 = 2;
                sut.Value1 = 3;
            });
        }
Exemplo n.º 3
0
        public void PropertyChanged()
        {
            var sut = new AClassWithProperties(1, 1);

            Assert.PropertyChanged(sut, "Value1", () => sut.Value1 = 2);
        }