Exemple #1
0
 public virtual void RemoveUsage(HourUsage hourUsage)
 {
     if (hourUsage != null)
     {
         Usages.Remove(hourUsage);
     }
 }
Exemple #2
0
 public virtual void RemoveUsage(HourUsage hourUsage)
 {
     if (hourUsage != null)
     {
         Usages.Remove(hourUsage);
     }
 }
Exemple #3
0
 public virtual void AddUsage(HourUsage hourUsage)
 {
     if (hourUsage != null)
     {
         Usages.Add(hourUsage);
     }
 }
Exemple #4
0
 public virtual void AddUsage(HourUsage hourUsage)
 {
     if (hourUsage != null)
     {
         Usages.Add(hourUsage);
     }
 }
Exemple #5
0
 public virtual void AddUsage(HourUsage usage)
 {
     if (!Usages.Contains(usage))
     {
         usage.Week = this;
         Usages.Add(usage);
     }
 }
Exemple #6
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));
 }
Exemple #7
0
 public virtual void RemoveUsage(HourUsage usage)
 {
     if (Usages.Contains(usage))
     {
         Usages.Remove(usage);
         usage.Week = null;
     }
 }
Exemple #8
0
 public virtual void AddUsage(HourUsage usage)
 {
     if (!Usages.Contains(usage))
     {
         usage.Week = this;
         Usages.Add(usage);
     }
 }
        public void Should()
        {
            var hourCode = new HourCode();
            var hourUsage = new HourUsage();
            hourUsage.SetHourCode(hourCode);

            Assert.That(hourUsage.HourCode, Is.EqualTo(hourCode));
            Assert.That(hourCode.Usages, Contains.Item(hourUsage));
        }
 private void AddUsage(object parameter)
 {
     var usage = new HourUsage();
     Week.AddUsage(usage);
     Usages.Add(new HourUsageViewModel(_hourCodeProvider, this, usage));
 }
Exemple #11
0
 public virtual void RemoveUsage(HourUsage usage)
 {
     if (Usages.Contains(usage))
     {
         Usages.Remove(usage);
         usage.Week = null;
     }
 }