예제 #1
0
 public HomeController(
     IWallPostsService wallPostsService,
     IEventsService eventsService)
 {
     this.wallPostsService = wallPostsService;
     this.eventsService    = eventsService;
 }
예제 #2
0
 public EventsService(
     IDeletableEntityRepository <Event> eventsRepository,
     IWallPostsService postsService,
     IDeletableEntityRepository <Post> postRepository)
 {
     this.eventsRepository = eventsRepository;
     this.postsService     = postsService;
     this.postRepository   = postRepository;
 }
예제 #3
0
 public ListsService(
     IDeletableEntityRepository <List> listRepository,
     IDeletableEntityRepository <ListItem> listItemRepository,
     IWallPostsService postsService,
     IDeletableEntityRepository <Post> postRepository)
 {
     this.listRepository     = listRepository;
     this.listItemRepository = listItemRepository;
     this.postsService       = postsService;
     this.postRepository     = postRepository;
 }
예제 #4
0
        public EventServiceTests()
        {
            var options = new DbContextOptionsBuilder <ApplicationDbContext>()
                          .UseInMemoryDatabase(Guid.NewGuid().ToString()).Options;

            this.dbContext        = new ApplicationDbContext(options);
            this.eventsRepository = new EfDeletableEntityRepository <Event>(this.dbContext);
            this.postRepository   = new EfDeletableEntityRepository <Post>(this.dbContext);
            AutoMapperConfig.RegisterMappings(typeof(TestEventViewModel).Assembly);
            this.postsService = new Mock <IWallPostsService>().Object;
        }
예제 #5
0
 public PhotoAlbumsService(
     IDeletableEntityRepository <Album> albumRepository,
     IDeletableEntityRepository <Picture> pictureRepository,
     IWallPostsService postsService,
     IDeletableEntityRepository <Post> postRepository,
     ICloudinaryService cloudinaryService)
 {
     this.albumRepository   = albumRepository;
     this.pictureRepository = pictureRepository;
     this.postsService      = postsService;
     this.postRepository    = postRepository;
     this.cloudinaryService = cloudinaryService;
 }
        public PhotoAlbumsServiceTests()
        {
            var options = new DbContextOptionsBuilder <ApplicationDbContext>()
                          .UseInMemoryDatabase(Guid.NewGuid().ToString()).Options;

            this.dbContext = new ApplicationDbContext(options);

            this.albumRepository   = new EfDeletableEntityRepository <Album>(this.dbContext);
            this.postRepository    = new EfDeletableEntityRepository <Post>(this.dbContext);
            this.pictureRepository = new EfDeletableEntityRepository <Picture>(this.dbContext);
            this.postsService      = new Mock <IWallPostsService>().Object;
            this.cloudinaryService = new Mock <ICloudinaryService>().Object;

            AutoMapperConfig.RegisterMappings(typeof(TestAlbumViewModel).Assembly);
        }