Exemplo n.º 1
0
        public void ShouldHaveNameAndValue()
        {
            var item = new OtherIncomeItem("Interest Income",6000.0);

            Assert.AreEqual("Interest Income",item.Name);
            Assert.AreEqual(6000m, item.Amount);
        }
Exemplo n.º 2
0
 public void Add(OtherIncomeItem otherIncomeItemToAdd)
 {
     if (otherIncomeItemToAdd == null)
     {
         throw new ArgumentNullException();
     }
     otherIncomeItems.Add(otherIncomeItemToAdd);
 }
Exemplo n.º 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));
 }
Exemplo n.º 4
0
 public void Add(OtherIncomeItem otherIncomeItemToAdd)
 {
     if (otherIncomeItemToAdd == null) throw new ArgumentNullException();
     otherIncomeItems.Add(otherIncomeItemToAdd);
 }
Exemplo n.º 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);
 }