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);
        }
Esempio n. 2
0
        public AlbumTests()
        {
            var kernel = NinjectWebCommon.GetKernel();

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

            this.pageInfo = new PageInfo
            {
                PageNumber = 0,
                PageSize   = int.MaxValue / 2,
            };
        }
Esempio n. 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);
        }
Esempio n. 4
0
 public AlbumsController(IAlbumLogic albumLogic)
 {
     this.albumLogic = albumLogic;
 }
 public AlbumsController(IAlbumLogic logic)
 {
     this.logic = logic;
 }
Esempio n. 6
0
 public AlbumService(IAlbumLogic albumLogic)
 {
     _albumLogic = albumLogic;
 }
Esempio n. 7
0
 public AlbumController(IAlbumLogic logic)
 {
     _logic = logic;
 }