private void DeleteInitialData()
        {
            IPayrollRepository repository = new PayrollRepository();
            foreach (var payroll in _payrolls)
            {
                Payroll fromDb = repository.GetById(payroll.PayrollId);
                if (fromDb != null)
                {
                    repository.Remove(payroll);
                }
            }

            ICompanyRepository companyRepository = new CompanyRepository();
            companyRepository.Remove(_company1);
            companyRepository.Remove(_company2);
        }
 public void Can_get_existing_payroll_by_id()
 {
     IPayrollRepository repository = new PayrollRepository();
     var fromDb = repository.GetById(_payrolls[1].PayrollId);
     Assert.IsNotNull(fromDb);
     Assert.AreNotSame(_payrolls[1], fromDb);
     Assert.AreEqual(_payrolls[1].PayrollNumberOfWeeks, fromDb.PayrollNumberOfWeeks);
     Assert.AreEqual(_payrolls[1].PayrollStartDate, fromDb.PayrollStartDate);
 }