Ejemplo n.º 1
0
        public void PageSelectBuilderOneOfOneWithBloom1Succeeds()
        {
            var opts = PageSelectOption.BuildOpts(new PageResultStats(1, 1), 1, null).ToList();

            Assert.AreEqual(1, opts.Count, "Count not 1");
            Assert.IsTrue(opts[0].IsCurrent, "opt[0] not current");
            Assert.AreEqual(1, opts[0].PageNum, "opt[0] page not 1");
        }
Ejemplo n.º 2
0
        public void PageSelectBuilderTwoOfTwoAndNoBloomSucceeds()
        {
            var opts = PageSelectOption.BuildOpts(new PageResultStats(2, 2), 0, null).ToList();

            Assert.AreEqual(2, opts.Count, "Count not 2");
            Assert.IsFalse(opts[0].IsCurrent, "opt[0] is current");
            Assert.AreEqual(1, opts[0].PageNum, "opt[0] page not 1");
            Assert.IsTrue(opts[1].IsCurrent, "opt[1] is not current");
            Assert.AreEqual(2, opts[1].PageNum, "opt[1] page not 2");
        }
Ejemplo n.º 3
0
        public void PageSelectBuilderFiveofTenWithNoBloomSucceeds()
        {
            var opts = PageSelectOption.BuildOpts(new PageResultStats(5, 10), 0, null).ToList();

            Assert.AreEqual(3, opts.Count, "Count not 3");
            Assert.IsFalse(opts[0].IsCurrent, "opt[0] is current");
            Assert.AreEqual(1, opts[0].PageNum, "opt[0] page not 1");
            Assert.IsTrue(opts[1].IsCurrent, "opt[1] is not current");
            Assert.AreEqual(5, opts[1].PageNum, "opt[1] page not 5");
            Assert.IsFalse(opts[2].IsCurrent, "opt[2] is current");
            Assert.AreEqual(10, opts[2].PageNum, "opt[2] page not 10");
        }