Пример #1
0
        public void ShouldHaveNameAndValue()
        {
            var item = new OtherIncomeItem("Interest Income",6000.0);

            Assert.AreEqual("Interest Income",item.Name);
            Assert.AreEqual(6000m, item.Amount);
        }
Пример #2
0
 public void Add(OtherIncomeItem otherIncomeItemToAdd)
 {
     if (otherIncomeItemToAdd == null)
     {
         throw new ArgumentNullException();
     }
     otherIncomeItems.Add(otherIncomeItemToAdd);
 }
Пример #3
0
 public virtual bool Equals(OtherIncomeItem other)
 {
     if (ReferenceEquals(null, other))
     {
         return(false);
     }
     if (ReferenceEquals(this, other))
     {
         return(true);
     }
     return(other.Id == Id && Equals(other.Name, Name) && other.Amount.Equals(Amount));
 }
Пример #4
0
 public void Add(OtherIncomeItem otherIncomeItemToAdd)
 {
     if (otherIncomeItemToAdd == null) throw new ArgumentNullException();
     otherIncomeItems.Add(otherIncomeItemToAdd);
 }
Пример #5
0
 public virtual bool Equals(OtherIncomeItem other)
 {
     if (ReferenceEquals(null, other)) return false;
     if (ReferenceEquals(this, other)) return true;
     return other.Id == Id && Equals(other.Name, Name) && other.Amount.Equals(Amount);
 }