public void ReturnInstanceOfEnumerable_WithValidaDataIsPassed()
        {
            // Arrange
            var carModelsServices = new CarModelServices(this.carModelsRepoMocked.Object);

            // Act
            var allCarsResult = carModelsServices.GetAllCarModels();

            // Assert
            Assert.IsInstanceOf <IEnumerable <CarModel> >(allCarsResult);
        }
        public void Call_AllMethodFromRepositoryOnce()
        {
            // Arrange
            var carModelServices = new CarModelServices(this.carModelsRepoMocked.Object);

            // Act
            carModelServices.GetAllCarModels();

            // Assert
            this.carModelsRepoMocked.Verify(x => x.All, Times.Once);
        }
        public void ReturnQueryable_WithExactNumberOfCarModels()
        {
            // Arrange
            var carModelsServices = new CarModelServices(this.carModelsRepoMocked.Object);

            // Act
            var expectedNumberOfCarModels = carModelsServices.GetAllCarModels().Count();

            // Assert
            Assert.AreEqual(expectedNumberOfCarModels, this.carModels.Count());
        }