public bool RulesTests_IncomeGt_12000(IncomeRangeEnum income) { var answer = new IncomeAnswer(income); var rule = new IncomeGt_12000(); return(rule.Execute(new Answers { IncomeAnswer = answer })); }
public IncomeAnswer(int income) { if (income >= 1 && income <= 12000) { _incomeRangeEnum = IncomeRangeEnum.Range_1_12000; } else if (income >= 12001 && income <= 40000) { _incomeRangeEnum = IncomeRangeEnum.Range_12001_40000; } else if (income >= 40001) { _incomeRangeEnum = IncomeRangeEnum.Range_40001plus; } }
public IncomeAnswer(IncomeRangeEnum incomeRangeEnum) { _incomeRangeEnum = incomeRangeEnum; }