예제 #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);
 }