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