Example #1
0
        public void ShouldThrowIfNoHtmlGeneratorWhenGettingPageLinksHtml()
        {
            // arrange
            List<int> list = new List<int> {
                0, 1, 2, 3, 4, 5, 6, 7, 8, 9
            };
            PagedList<int> pages = new PagedList<int>(null, null);

            // act
            try
            {
                pages.Paginate(list, 0, 3);
                pages.GetPageLinksHtml(3, x => {return "";});
            }
            catch (InvalidOperationException)
            {
                // expected
                return;
            }
            Assert.Fail("Should throw if no html generator specified");
        }