Exemplo n.º 1
0
        public void CreateDynamic_CreatesDynamicLinker()
        {
            var linker = PageLinker.CreateDynamic() as DynamicLinker;

            Assert.IsNotNull(linker);
            Assert.IsTrue(linker.IsBase1);
        }
Exemplo n.º 2
0
        public void CreateDynamic_CreatesDynamicLinkerWithSpecifiedBase()
        {
            var linker = PageLinker.CreateDynamic(true) as DynamicLinker;

            Assert.IsTrue(linker.IsBase1);
            linker = PageLinker.CreateDynamic(false) as DynamicLinker;
            Assert.IsFalse(linker.IsBase1);
        }
Exemplo n.º 3
0
        public void CreateDynamic_CreatesPrevNextLinkerWithTexts()
        {
            var linker = PageLinker.CreateDynamic("p", "n") as PrevNextLinker;

            Assert.IsInstanceOf(typeof(DynamicLinker), linker.BaseLinker);
            Assert.AreEqual("p", linker.PrevText);
            Assert.AreEqual("n", linker.NextText);
            Assert.IsTrue((linker.BaseLinker as DynamicLinker).IsBase1);
        }
Exemplo n.º 4
0
 public void CreateDynamic_CreatesPrevNextLinkerWithSpecifiedBase()
 {
     foreach (var isBase1 in new[] { false, true })
     {
         var linker = PageLinker.CreateDynamic(isBase1, "prv", "nxt") as PrevNextLinker;
         Assert.IsInstanceOf(typeof(DynamicLinker), linker.BaseLinker);
         Assert.AreEqual("prv", linker.PrevText);
         Assert.AreEqual("nxt", linker.NextText);
         Assert.AreEqual(isBase1, (linker.BaseLinker as DynamicLinker).IsBase1);
     }
 }
Exemplo n.º 5
0
 public void CreateDynamic_CreatesPrevNextLinkerWithForcedPrevNext()
 {
     foreach (var isBase1 in new[] { false, true })
     {
         foreach (var forcePrevNext in new[] { false, true })
         {
             var linker = PageLinker.CreateDynamic(isBase1, "prev", "next", forcePrevNext) as PrevNextLinker;
             Assert.IsInstanceOf(typeof(DynamicLinker), linker.BaseLinker);
             Assert.AreEqual("prev", linker.PrevText);
             Assert.AreEqual("next", linker.NextText);
             Assert.AreEqual(isBase1, (linker.BaseLinker as DynamicLinker).IsBase1);
             Assert.AreEqual(forcePrevNext, linker.ForcePrevNext);
         }
     }
 }