示例#1
0
        public void ShouldNotifyCaloriesChangedWhenEntreeCaloriesChanged()
        {
            var c = new Combo();
            var e = new MockEntree(0, 0);

            c.Entree = e;
            Assert.PropertyChanged(c, nameof(Combo.Calories), () =>
            {
                e.SetCalories(100);
            });
        }
示例#2
0
        public void ShouldNotifyCaloriesChangedWhenItemCaloriesChanged()
        {
            var o = new Order();
            var e = new MockEntree(0, 0);

            o.Add(e);
            Assert.PropertyChanged(o, nameof(Order.Calories), () =>
            {
                e.SetCalories(100);
            });
        }