public void Execute()
        {
            var query  = new BlogQuery(_dbFactory);
            var result = query.Execute();

            Assert.AreEqual(_defaultData.Count, result.Count());
        }
        public void AddSortCriteria_propertyName()
        {
            var query = new BlogQuery(_dbFactory);

            query.AddSortCriteria("name");

            var result1 = query.Execute();
            var first   = result1.First();

            Assert.AreEqual(_defaultData.First().Name, first.Name);

            query.ClearSortCriteria();
            query.AddSortCriteria("name", SortDirection.Descending);
            var result2 = query.Execute();
            var last    = result2.First();

            Assert.AreEqual(_defaultData.Last().Name, last.Name);
        }
        public void Skip()
        {
            const int skipNumber = 10;
            var       query      = new BlogQuery(_dbFactory);

            query.Skip = skipNumber;

            var result = query.Execute();

            Assert.AreEqual(_defaultData.Count - 10, result.Count());

            var first = result.First();

            Assert.AreEqual(skipNumber + 1, first.Id);
        }
        public void Take()
        {
            const int takeNumber = 10;
            var       query      = new BlogQuery(_dbFactory);

            query.Take = takeNumber;

            var result = query.Execute();

            Assert.AreEqual(takeNumber, result.Count());

            var first = result.First();

            Assert.AreEqual(_defaultData.First().Name, first.Name);
        }