public void TotalRecordsTest()
        {
            var r = new MockHttpRequest();
            var total = 6;
            //Not all params below are used by the parser. We may support them later
            var nvparams = TestSupport.CreateParams();
            r.Add(nvparams);

            var result = new DataTablesParser<Person>(r, context.People).Parse();

            Console.WriteLine(result.GetQuery());

            Assert.AreEqual(total, result.iTotalRecords);
        }
示例#2
0
        public void TotalRecordsTest()
        {
            var r     = new MockHttpRequest();
            var total = 6;
            //Not all params below are used by the parser. We may support them later
            var nvparams = TestSupport.CreateParams();

            r.Add(nvparams);

            var result = new DataTablesParser <Person>(r, context.People).Parse();

            Console.WriteLine(result.GetQuery());

            Assert.AreEqual(total, result.iTotalRecords);
        }
示例#3
0
        public void TotalResultsTest()
        {
            var r            = new MockHttpRequest();
            var resultLength = 3;

            //Not all params below are used by the parser. We may support them later
            var nvparams = TestSupport.CreateParams();

            //override display length
            nvparams["iDisplayLength"] = Convert.ToString(resultLength);

            r.Add(nvparams);

            var result = new DataTablesParser <Person>(r, context.People).Parse();

            Console.WriteLine(result.GetQuery());

            Assert.AreEqual(resultLength, result.aaData.Count);
        }
        public void TotalResultsTest()
        {
            var r = new MockHttpRequest();
            var resultLength = 3;

            //Not all params below are used by the parser. We may support them later
            var nvparams = TestSupport.CreateParams();

            //override display length
            nvparams["iDisplayLength"] = Convert.ToString(resultLength);

            r.Add(nvparams);

            var result = new DataTablesParser<Person>(r, context.People).Parse();

            Console.WriteLine(result.GetQuery());

            Assert.AreEqual(resultLength, result.aaData.Count);
        }