Example #1
0
 public BooksController(IEntityRepository <Book> repository,
                        IViewEntityModelMapper <Book, ViewBookModel> viewEntityModelMapper,
                        IEditEntityModelMapper <Book, EditBookModel> editEntityModelMapper,
                        HttpResponseBase customResponse)
     : base(repository, viewEntityModelMapper, editEntityModelMapper, customResponse)
 {
 }
        public void SetUp()
        {
            var iso639LanguageDisplayer = new Mock <IIso639LanguageDisplayer>().Object;
            var bookMapper  = new ViewBookModelMapper(iso639LanguageDisplayer);
            var storyMapper = new ViewStoryModelMapper(iso639LanguageDisplayer);

            repository            = new RepositoryMock <Person>();
            viewEntityModelMapper = new ViewPersonModelMapper(bookMapper, storyMapper);
            editEntityModelMapper = new EditPersonModelMapper();
            controller            = new PeopleController(repository, viewEntityModelMapper, editEntityModelMapper);
        }
Example #3
0
        protected EntityController(IEntityRepository <TEntity> repository,
                                   IViewEntityModelMapper <TEntity, TViewModel> viewEntityModelMapper,
                                   IEditEntityModelMapper <TEntity, TEditModel> editEntityModelMapper,
                                   HttpResponseBase customResponse)
            : base(customResponse)
        {
            if (viewEntityModelMapper == null)
            {
                throw new ArgumentNullException("viewEntityModelMapper");
            }

            if (editEntityModelMapper == null)
            {
                throw new ArgumentNullException("editEntityModelMapper");
            }

            this.Repository            = repository;
            this.EditEntityModelMapper = editEntityModelMapper;
            this.ViewEntityModelMapper = viewEntityModelMapper;
        }
Example #4
0
 public void SetUp()
 {
     mapper = new EditPersonModelMapper();
 }
Example #5
0
 public BooksController(IEntityRepository <Book> repository,
                        IViewEntityModelMapper <Book, ViewBookModel> viewEntityModelMapper,
                        IEditEntityModelMapper <Book, EditBookModel> editEntityModelMapper)
     : base(repository, viewEntityModelMapper, editEntityModelMapper)
 {
 }
 public void SetUp()
 {
     mapper = new EditPublisherModelMapper();
 }
 public PublishersController(IEntityRepository <Publisher> repository,
                             IViewEntityModelMapper <Publisher, ViewPublisherModel> viewEntityModelMapper,
                             IEditEntityModelMapper <Publisher, EditPublisherModel> editEntityModelMapper)
     : base(repository, viewEntityModelMapper, editEntityModelMapper)
 {
 }
Example #8
0
 public StoriesController(IEntityRepository <Story> repository,
                          IViewEntityModelMapper <Story, ViewStoryModel> viewStoryModelMapper,
                          IEditEntityModelMapper <Story, EditStoryModel> editEntityModelMapper)
     : base(repository, viewStoryModelMapper, editEntityModelMapper)
 {
 }
Example #9
0
 public SeriesController(IEntityRepository <Series> repository,
                         IViewEntityModelMapper <Series, ViewSeriesModel> viewEntityModelMapper,
                         IEditEntityModelMapper <Series, EditSeriesModel> editEntityModelMapper)
     : base(repository, viewEntityModelMapper, editEntityModelMapper)
 {
 }
Example #10
0
 protected EntityController(IEntityRepository <TEntity> repository,
                            IViewEntityModelMapper <TEntity, TViewModel> viewEntityModelMapper,
                            IEditEntityModelMapper <TEntity, TEditModel> editEntityModelMapper)
     : this(repository, viewEntityModelMapper, editEntityModelMapper, null)
 {
 }
Example #11
0
 public PeopleController(IEntityRepository <Person> repository,
                         IViewEntityModelMapper <Person, ViewPersonModel> viewEntityModelMapper,
                         IEditEntityModelMapper <Person, EditPersonModel> editEntityModelMapper)
     : base(repository, viewEntityModelMapper, editEntityModelMapper)
 {
 }