Ejemplo n.º 1
0
        public void PreviousPage_With_Items_Per_Page_Equals_10_And_Current_Equals_2_GetUrl_Should_Return_Url_To_Page_1()
        {
            var previousPage = new PreviousPage(2, (pages, index) => string.Format("/Controller/Action/{0}/{1}", pages, index), 10);
            var text = previousPage.GetUrl();

            Assert.That(text, Is.EqualTo("/Controller/Action/10/1"));
        }
Ejemplo n.º 2
0
        public void PreviousPage_With_Current_Greater_Than_Pages_GetUrl_Return_Link_To_First_Page()
        {
            var previousPage = new PreviousPage(0, (pages, index) => string.Format("/Controller/Action/{0}/{1}", pages, index), 10);
            var text = previousPage.GetUrl();

            Assert.That(text, Is.EqualTo("/Controller/Action/10/1"));
        }