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);
        }
Exemple #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);
        }
        public void TotalRecordsTest()
        {
            var r = new MockHttpRequest();

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

            var people = TestSupport.CreateData();

            var parser = new DataTablesParser<MockPerson>(r, people.AsQueryable());

            Console.WriteLine(people.Count);

            Assert.AreEqual(people.Count,parser.Parse().iTotalRecords);
        }
        public void TotalDisplayTest()
        {
            var r = new MockHttpRequest();
            var displayLength = 1;

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

            //Set filter parameter
            nvparams["sSearch"] = "Cromie";

            r.Add(nvparams);

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

            Assert.AreEqual(displayLength, parser.Parse().iTotalDisplayRecords);
        }
        public void TotalRecordsTest()
        {
            var r = new MockHttpRequest();

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

            r.Add(nvparams);

            var people = TestSupport.CreateData();

            var parser = new DataTablesParser <MockPerson>(r, people.AsQueryable());

            Console.WriteLine(people.Count);

            Assert.AreEqual(people.Count, parser.Parse().iTotalRecords);
        }
Exemple #6
0
        public void TotalDisplayTest()
        {
            var r             = new MockHttpRequest();
            var displayLength = 1;

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

            //Set filter parameter
            nvparams["sSearch"] = "Cromie";

            r.Add(nvparams);

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

            Assert.AreEqual(displayLength, parser.Parse().iTotalDisplayRecords);
        }
        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);
        }
Exemple #8
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 TotalDisplayTest()
        {
            var r             = new MockHttpRequest();
            var displayLength = 1;

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

            //Set filter parameter
            nvparams["sSearch"] = "Cromie";

            r.Add(nvparams);

            var people = TestSupport.CreateData();

            var parser = new DataTablesParser <MockPerson>(r, people.AsQueryable());

            Console.WriteLine(people.Count);

            Assert.AreEqual(displayLength, parser.Parse().iTotalDisplayRecords);
        }
        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[Constants.DISPLAY_LENGTH] = Convert.ToString(resultLength);

            r.Add(nvparams);

            var people = TestSupport.CreateData();

            var parser = new DataTablesParser <MockPerson>(r, people.AsQueryable());

            Console.WriteLine(people.Count);

            Assert.AreEqual(resultLength, parser.Parse().data.Count);
        }
        public void TotalDisplayTest()
        {
            var r = new MockHttpRequest();
            var displayLength = 1;

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

            //Set filter parameter
            nvparams["sSearch"] = "Cromie";

            r.Add(nvparams);

            var people = TestSupport.CreateData();

            var parser = new DataTablesParser<MockPerson>(r, people.AsQueryable());

            Console.WriteLine(people.Count);

            Assert.AreEqual(displayLength, parser.Parse().iTotalDisplayRecords);
        }
        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[Constants.DISPLAY_LENGTH] = Convert.ToString(resultLength);

            r.Add(nvparams);

            var people = TestSupport.CreateData();

            var parser = new DataTablesParser<MockPerson>(r, people.AsQueryable());

            Console.WriteLine(people.Count);

            Assert.AreEqual(resultLength, parser.Parse().data.Count);
        }