コード例 #1
0
 public TripController(ITripServices tripServices, IRatingServices ratingServices, ITripNotificationServices tripNotificationServices, ITownProvider townProvider, IStatisticsServices statisticsServices, IViewServices viewServices, IDateProvider dateProvider, ITripProvider tripProvider, INotificationServices notificationServices)
 {
     this.TripServices = tripServices;
     this.RatingServices = ratingServices;
     this.TripNotificationServices = tripNotificationServices;
     this.StatisticsServices = statisticsServices;
     this.ViewServices = viewServices;
     this.TownProvider = townProvider;
     this.DateProvider = dateProvider;
     this.TripProvider = tripProvider;
     this.NotificationServices = notificationServices;
 }
コード例 #2
0
        public void Init()
        {
            var townServices = new Mock<ITownsServices>();
            townServices.Setup(x => x.GetAll())
                .Returns(new List<Town>()
                {
                    new Town { Name = "Sofia" }
                }.AsQueryable());

            var cacheMock = new Mock<ICacheServices>();

            this.townProvider = new TownProvider(townServices.Object, cacheMock.Object);
        }
コード例 #3
0
 public HomeController(ITripServices tripServices, ITripHelper tripHelper, ITownProvider townProvider)
 {
     this.TripServices = tripServices;
     this.TripHelper = tripHelper;
     this.townProvider = townProvider;
 }