コード例 #1
0
        public void CreatePrevNext_DefaultsToForcePrevNext()
        {
            var prevText = "p";
            var nextText = "n";
            var linker   = PageLinker.CreatePrevNext(prevText, nextText) as PrevNextLinker;

            Assert.AreEqual(prevText, linker.PrevText);
            Assert.AreEqual(nextText, linker.NextText);
            Assert.IsTrue(linker.ForcePrevNext);
            Assert.IsNull(linker.BaseLinker);
        }
コード例 #2
0
        public void CreatePrevNext_ReturnsInstanceOfPrevNextLinkerWithNullBaseLinker()
        {
            var prevText      = "p";
            var nextText      = "n";
            var forcePrevNext = false;
            var linker        = PageLinker.CreatePrevNext(prevText, nextText, forcePrevNext);

            Assert.IsNotNull(linker);
            Assert.IsInstanceOf(typeof(PrevNextLinker), linker);

            var pnl = linker as PrevNextLinker;

            Assert.AreEqual(prevText, pnl.PrevText);
            Assert.AreEqual(nextText, pnl.NextText);
            Assert.AreEqual(forcePrevNext, pnl.ForcePrevNext);
            Assert.IsNull(pnl.BaseLinker);
        }