Exemplo n.º 1
0
        public void ReadAllDronesIncludeManufacturersEnsureRepositoryIsCalled()
        {
            var           droneRepo = new Mock <IDroneRepository>();
            IDroneService service   = new DroneService(droneRepo.Object);

            var isCalled = false;

            droneRepo.Setup(x => x.GetAllDronesIncludeManufacturers()).Callback(() => isCalled = true).Returns(new FilteredList <Drone>());

            service.GetAllDronesIncludeManufacturers();
            Assert.True(isCalled);
        }