private void AddUsage(object parameter) { var usage = new HourUsage(); Week.AddUsage(usage); Usages.Add(new HourUsageViewModel(_hourCodeProvider, this, usage)); }
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)); }