ikonovi/ws-soap-employees-tests

BaseSalary class constructor to be responsible only for field initialization, shouldn't call DAO class methods etc.

Opened this issue · 0 comments

public BaseSalary(int recordId) {
id = recordId;
BaseSalaryDAO dao = new BaseSalaryDAO();
BaseSalary salary = dao.fetchBaseSalaryById(recordId);
salaryAmount = salary.getSalaryAmount();
this.profName = salary.getProfName();
}