public void TestCSVApplication(string applicationName, bool isInputInCSVFormat, string inputCSVFileRelativePath, string outputDirectory) { var inputCSVFilePath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, inputCSVFileRelativePath); _commandLineArgs = new[] { applicationName, "-c=true", "-i=" + inputCSVFilePath, "-o=" + outputDirectory }; var employeeMonthlyPayslipApplication = new EmployeeMonthlyPayslipApplication(_commandLineArgs); var paySlipDetails = employeeMonthlyPayslipApplication.RunApplication(); }
private static void Main(string[] args) { var employeeMonthlyPayslipApplication = new EmployeeMonthlyPayslipApplication(args); if (!employeeMonthlyPayslipApplication.EmployeeMonthlyPayslipAppContext.HasErrors) { employeeMonthlyPayslipApplication.RunApplication(); } }
public void TestCommandLineApplication(string applicationName, string firstName, string lastName, int annualSalary, string superRate, string payPeriod, decimal grossIncome, decimal incomeTax, decimal netIncome, decimal super) { _commandLineArgs = new[] { applicationName, "-f=" + firstName, "-l=" + lastName, "-a=" + annualSalary, "-s=" + superRate, "-p=" + payPeriod }; var employeeMonthlyPayslipApplication = new EmployeeMonthlyPayslipApplication(_commandLineArgs); var paySlipDetails = employeeMonthlyPayslipApplication.RunApplication(); AssertSuccessPaySlipDetails(firstName, lastName, payPeriod, grossIncome, incomeTax, netIncome, super, paySlipDetails.FirstOrDefault()); }