public void NPocoRepository_GetAll_Returns_All_Rows(int count)
        {
            //Arrange
            var mockCache = new Mock <ICacheProvider>();

            SetUpDatabase(count);

            var repository = new NPocoRepository <Dog>(_nPocoUnitOfWork, mockCache.Object);

            //Act
            IEnumerable <Dog> dogs = repository.GetAll();

            //Assert
            Assert.AreEqual(count, dogs.Count());
        }
        public void NPocoRepository_GetAll_Returns_Models_With_Correct_Properties()
        {
            //Arrange
            var mockCache = new Mock <ICacheProvider>();

            SetUpDatabase(5);

            var repository = new NPocoRepository <Dog>(_nPocoUnitOfWork, mockCache.Object);

            //Act
            var dogs = repository.GetAll();

            //Assert
            var dog = dogs.First();

            Assert.AreEqual(_dogAges[0], dog.Age.ToString());
            Assert.AreEqual(_dogNames[0], dog.Name);
        }
        public void NPocoRepository_GetAll_Returns_List_Of_Models()
        {
            //Arrange
            var mockCache = new Mock <ICacheProvider>();

            SetUpDatabase(5);

            var repository = new NPocoRepository <Dog>(_nPocoUnitOfWork, mockCache.Object);

            //Act
            var dogs = repository.GetAll().ToList();

            //Assert
            for (int i = 0; i < dogs.Count(); i++)
            {
                Assert.IsInstanceOf <Dog>(dogs[i]);
            }
        }
        public void NPocoRepository_GetAll_Returns_Models_With_Correct_Properties()
        {
            //Arrange
            var mockCache = new Mock<ICacheProvider>();
            SetUpDatabase(5);

            var repository = new NPocoRepository<Dog>(_nPocoUnitOfWork, mockCache.Object);

            //Act
            var dogs = repository.GetAll();

            //Assert
            var dog = dogs.First();
            Assert.AreEqual(_dogAges[0], dog.Age.ToString());
            Assert.AreEqual(_dogNames[0], dog.Name);
        }
        public void NPocoRepository_GetAll_Returns_List_Of_Models()
        {
            //Arrange
            var mockCache = new Mock<ICacheProvider>();
            SetUpDatabase(5);

            var repository = new NPocoRepository<Dog>(_nPocoUnitOfWork, mockCache.Object);

            //Act
            var dogs = repository.GetAll().ToList();

            //Assert
            for (int i = 0; i < dogs.Count(); i++)
            {
                Assert.IsInstanceOf<Dog>(dogs[i]);
            }
        }
        public void NPocoRepository_GetAll_Returns_All_Rows(int count)
        {
            //Arrange
            var mockCache = new Mock<ICacheProvider>();
            SetUpDatabase(count);

            var repository = new NPocoRepository<Dog>(_nPocoUnitOfWork, mockCache.Object);

            //Act
            IEnumerable<Dog> dogs = repository.GetAll();

            //Assert
            Assert.AreEqual(count, dogs.Count());
        }