public void GetPageUrlByPageIndex_ShouldReturnCorrectPageUrl() { int totalItems = 91; int currentPage = 5; PaginationViewModel vm = new PaginationViewModel(totalItems, currentPage); string url1 = vm.GetPageUrl(1, this.Url, this.PagingQueryStringParameter); Assert.AreEqual("/search/?q=test&pn=1", url1); string url2 = vm.GetPageUrl(2, this.Url, this.PagingQueryStringParameter); Assert.AreEqual("/search/?q=test&pn=2", url2); }