public TripService( IUserSession userSession, ITripDAO tripDAO) { this.userSession = userSession ?? throw new System.ArgumentNullException(nameof(userSession)); this.tripDAO = tripDAO ?? throw new System.ArgumentNullException(nameof(tripDAO)); }
public trip_service_should() { userSession = Substitute.For<IUserSession>(); tripDAO = Substitute.For<ITripDAO>(); productionTripService = new TripService(userSession, tripDAO); UserBuilder = new UserBuilder(); }
public void Setup() { _mockTripDao = Substitute.For <ITripDAO>(); _mockTripDao.FindTripsByUser(Arg.Any <User>()) .Returns(user => new List <Model.Trip> { _aTrip }); _service = new TripService(_mockTripDao); }
public trip_service_should() { userSession = Substitute.For <IUserSession>(); tripDao = Substitute.For <ITripDAO>(); tripService = new TripService(userSession, tripDao); }
public TripService(IUserSession userSession, ITripDAO tripDAO) { this.userSession = userSession ?? throw new ArgumentNullException("No user session at trip service"); this.tripDAO = tripDAO ?? throw new ArgumentNullException("No tripDAO at trip service"); }
public TripService(ITripDAO tripDao) { _tripDao = tripDao; }
public TripService(IUserSession userSession, ITripDAO tripDAO) { this.userSession = userSession; this.tripDAO = tripDAO; }