예제 #1
0
        public void LastReviewed_WhenSet_RaisesPropertyChanged()
        {
            DateTime newLastReviewed = DateTime.Today.ToUniversalTime();

            var test = new Review();

            test.AssertThatChangeNotificationIsRaisedBy(x => x.LastReviewed).
                When(() => test.LastReviewed = newLastReviewed);
            Assert.Equal(newLastReviewed, test.LastReviewed);
        }
예제 #2
0
        public void ReviewPeriod_WhenSet_RaisesPropertyChanged()
        {
            TimeSpan newReviewPeriod = TimeSpan.FromDays(7);

            var test = new Review();

            test.AssertThatChangeNotificationIsRaisedBy(x => x.ReviewPeriod).
                When(() => test.ReviewPeriod = newReviewPeriod);
            Assert.Equal(newReviewPeriod, test.ReviewPeriod);
        }
예제 #3
0
        public void HorizonOfFocus_WhenSet_RaisesPropertyChanged()
        {
            const HorizonOfFocus newHorizon = HorizonOfFocus.Project;

            var test = new Review();

            test.AssertThatChangeNotificationIsRaisedBy(x => x.HorizonOfFocus).
                When(() => test.HorizonOfFocus = newHorizon);
            Assert.Equal(newHorizon, test.HorizonOfFocus);
        }