コード例 #1
0
ファイル: OtherIncomeTest.cs プロジェクト: bagheera/tax
        public void ShouldHaveNameAndValue()
        {
            var item = new OtherIncomeItem("Interest Income",6000.0);

            Assert.AreEqual("Interest Income",item.Name);
            Assert.AreEqual(6000m, item.Amount);
        }
コード例 #2
0
ファイル: OtherIncomes.cs プロジェクト: ZenMilan/tax-1
 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
ファイル: OtherIncomes.cs プロジェクト: bagheera/tax
 public void Add(OtherIncomeItem otherIncomeItemToAdd)
 {
     if (otherIncomeItemToAdd == null) throw new ArgumentNullException();
     otherIncomeItems.Add(otherIncomeItemToAdd);
 }
コード例 #5
0
ファイル: OtherIncomeItem.cs プロジェクト: bagheera/tax
 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);
 }