Esempio n. 1
0
 public virtual void RemoveUsage(HourUsage hourUsage)
 {
     if (hourUsage != null)
     {
         Usages.Remove(hourUsage);
     }
 }
Esempio n. 2
0
 public virtual void RemoveUsage(HourUsage hourUsage)
 {
     if (hourUsage != null)
     {
         Usages.Remove(hourUsage);
     }
 }
Esempio n. 3
0
 public virtual void AddUsage(HourUsage hourUsage)
 {
     if (hourUsage != null)
     {
         Usages.Add(hourUsage);
     }
 }
Esempio n. 4
0
 public virtual void AddUsage(HourUsage hourUsage)
 {
     if (hourUsage != null)
     {
         Usages.Add(hourUsage);
     }
 }
Esempio n. 5
0
 public virtual void AddUsage(HourUsage usage)
 {
     if (!Usages.Contains(usage))
     {
         usage.Week = this;
         Usages.Add(usage);
     }
 }
Esempio n. 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));
 }
Esempio n. 7
0
 public virtual void RemoveUsage(HourUsage usage)
 {
     if (Usages.Contains(usage))
     {
         Usages.Remove(usage);
         usage.Week = null;
     }
 }
Esempio n. 8
0
 public virtual void AddUsage(HourUsage usage)
 {
     if (!Usages.Contains(usage))
     {
         usage.Week = this;
         Usages.Add(usage);
     }
 }
Esempio n. 9
0
        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));
        }
Esempio n. 10
0
 private void AddUsage(object parameter)
 {
     var usage = new HourUsage();
     Week.AddUsage(usage);
     Usages.Add(new HourUsageViewModel(_hourCodeProvider, this, usage));
 }
Esempio n. 11
0
 public virtual void RemoveUsage(HourUsage usage)
 {
     if (Usages.Contains(usage))
     {
         Usages.Remove(usage);
         usage.Week = null;
     }
 }