public AlbumsController() : base()
        {
            DbContext       context        = ContextFactory.GetNewContext(ContextType.SQL);
            UserRepository  repository     = new UserRepository(context);
            PhotoRepository photos         = new PhotoRepository(context);
            AlbumRepository albums         = new AlbumRepository(context);
            IGoogleServices googleServices = new GoogleServices();

            Users  = new UserLogic(repository, googleServices);
            Albums = new AlbumLogic(repository, photos, albums);
        }
Пример #2
0
        public AlbumTests()
        {
            var kernel = NinjectWebCommon.GetKernel();

            this.logic = kernel.Get <IAlbumLogic>();

            this.pageInfo = new PageInfo
            {
                PageNumber = 0,
                PageSize   = int.MaxValue / 2,
            };
        }
Пример #3
0
        public void Initialize()
        {
            //context = InitializeSQL();
            context = InitializeMemory();

            IRepository <User>  repository = new UserRepository(context);
            IRepository <Photo> photos     = new PhotoRepository(context);
            IRepository <Album> albums     = new AlbumRepository(context);

            GoogleServices = new Mock <IGoogleServices>(MockBehavior.Strict);
            UserLogic      = new UserLogic(repository, GoogleServices.Object);
            SessionLogic   = new SessionLogic(repository);
            AlbumLogic     = new AlbumLogic(repository, photos, albums);
        }
Пример #4
0
 public AlbumsController(IAlbumLogic albumLogic)
 {
     this.albumLogic = albumLogic;
 }
Пример #5
0
 public AlbumsController(IAlbumLogic logic)
 {
     this.logic = logic;
 }
Пример #6
0
 public AlbumService(IAlbumLogic albumLogic)
 {
     _albumLogic = albumLogic;
 }
Пример #7
0
 public AlbumController(IAlbumLogic logic)
 {
     _logic = logic;
 }