public EmployeeController(IEmployeeRepository employeeRepository, ITax taxEmployee) { repository = employeeRepository; this.taxEmployee = taxEmployee; pageInfo = new PageInfo { CountEmployees = repository.Employees.Count(), CountEmployeesPage = PageSize, CurrentPage = 1 }; PageSize = 3; }
public void Generate_Page_Links() { HtmlHelper myHelper = null; PageInfo pageInfo = new PageInfo { CurrentPage = 2, CountEmployees = 14, CountEmployeesPage = 5 }; MvcHtmlString result = myHelper.PageLinks(pageInfo, m => "Page" + m); Assert.AreEqual(@"<a class=""btn btn-default"" href=""Page1"">1</a>" + @"<a class=""btn btn-default btn-primary selected"" href=""Page2"">2</a>" + @"<a class=""btn btn-default"" href=""Page3"">3</a>", result.ToString()); }