public void Should_Return_Correct_Filtered_Drones_By_Filter(String droneCode, Int32?droneType, Int32 count) { Mock <IDroneRepository> droneRepository = new Mock <IDroneRepository>(); droneRepository.Setup(_ => _.GetAll(It.IsAny <Expression <Func <Drone, Boolean> > >(), It.IsAny <Func <IQueryable <Drone>, IQueryable <Drone> > >())).Returns(GetTestDrones()); DroneService droneService = new DroneService(droneRepository.Object); DroneListFilter filter = new DroneListFilter { DroneCode = droneCode, DroneType = droneType }; ICollection <Drone> filteredDrones = droneService.GetDronesByPersonId(String.Empty, filter); Assert.Equal(count, filteredDrones.Count); }