Esempio n. 1
0
        private void AddUsage(object parameter)
        {
            var usage = new HourUsage();

            Week.AddUsage(usage);
            Usages.Add(new HourUsageViewModel(_hourCodeProvider, this, usage));
        }
Esempio n. 2
0
        public void ShouldSetWeekToSelfWhenAddingUsage()
        {
            var week  = new Week();
            var usage = new HourUsage();

            week.AddUsage(usage);
            Assert.That(week.Usages.Count, Is.EqualTo(1));
            Assert.That(usage.Week, Is.EqualTo(week));
        }