Exemplo n.º 1
0
        public void Should_Raise_Property_Changed_Event_When_Property_Is_Changed()
        {
            var isPropertyChanged = false;
            var testBindableBase = new TestBindableBase();
            testBindableBase.PropertyChanged +=
                (sender, args) =>
                {
                    if (args.PropertyName.Equals("Property"))
                        isPropertyChanged = true;
                };

            testBindableBase.Property = new object();

            Assert.IsTrue(isPropertyChanged,
                "When any observable propery of Bindable base is changed it is supposed to raise property changed " +
                "event with that property name as argument!");
        }
Exemplo n.º 2
0
        public void Should_Raise_Property_Changed_Event_When_Property_Is_Changed()
        {
            var isPropertyChanged = false;
            var testBindableBase  = new TestBindableBase();

            testBindableBase.PropertyChanged +=
                (sender, args) =>
            {
                if (args.PropertyName.Equals("Property"))
                {
                    isPropertyChanged = true;
                }
            };

            testBindableBase.Property = new object();

            Assert.IsTrue(isPropertyChanged,
                          "When any observable propery of Bindable base is changed it is supposed to raise property changed " +
                          "event with that property name as argument!");
        }