示例#1
0
 public TripService(
     IUserSession userSession,
     ITripDAO tripDAO)
 {
     this.userSession = userSession ?? throw new System.ArgumentNullException(nameof(userSession));
     this.tripDAO     = tripDAO ?? throw new System.ArgumentNullException(nameof(tripDAO));
 }
示例#2
0
 public trip_service_should()
 {
     userSession = Substitute.For<IUserSession>();
     tripDAO = Substitute.For<ITripDAO>();
     productionTripService = new TripService(userSession, tripDAO);
     UserBuilder = new UserBuilder();
 }
示例#3
0
        public void Setup()
        {
            _mockTripDao = Substitute.For <ITripDAO>();
            _mockTripDao.FindTripsByUser(Arg.Any <User>())
            .Returns(user => new List <Model.Trip> {
                _aTrip
            });

            _service = new TripService(_mockTripDao);
        }
示例#4
0
 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");
 }
示例#6
0
 public TripService(ITripDAO tripDao)
 {
     _tripDao = tripDao;
 }
示例#7
0
 public TripService(IUserSession userSession, ITripDAO tripDAO)
 {
     this.userSession = userSession;
     this.tripDAO     = tripDAO;
 }