public void WhenMutatingPropertyValueChanged() { var source = new ActiveSelectValueTestOuterClass() { Container = new IntegerTestClass() { Property = 100 } }; var sut = source.ToActiveValue(c => c.Container).ActiveSelect(c => c.Property); source.Container.Property = 200; Assert.Equal(source.Container.Property, sut.Value); }
public void WhenMutatingPropertyChangeNotificationIsThrown() { var source = new ActiveSelectValueTestOuterClass() { Container = new IntegerTestClass() { Property = 100 } }; var sut = source.ToActiveValue(c => c.Container).ActiveSelect(c => c.Property); bool called = false; sut.PropertyChanged += (s, e) => called = true; source.Container.Property = 200; Assert.True(called); }