public ReportResult Build(int year, int month)
        {
            var reportName = MonthNameResolver.MonthName.GetName(year, month);

            var data          = _employeeReportDataProvider.GetReportData();
            var reportContent = new EmployeeTxtReportGenerator().GenerateContent(reportName, data);

            return(new ReportResult
            {
                ContentType = "application/octet-stream",
                Name = "report.txt",
                Data = System.Text.Encoding.UTF8.GetBytes(reportContent)
            });
        }
Beispiel #2
0
        public void EmployeesPackedToDepartments()
        {
            var departments = employeeReportDataProvider.GetReportData();

            Assert.AreEqual(departments.Count, 3);
        }