public ArticlesController( IViewArticleService viewArticleService, IAccountService accountService, IAuthenticationService authenticateService, ICommentService commentService, ILoggerService loggerService, IMapper mapper) : base(accountService, mapper, authenticateService, loggerService) { _viewArticleService = viewArticleService; _commentService = commentService; }
public void Setup() { FakeArticle = FakeArticles.CreateArticleWithOneTagAndOneDate(); this._fakeArticleRepository = new Mock <IArticleRepository>(); this._fakeTagRepository = new Mock <ITagRepository>(); _fakeArticleUnitOfWork = new Mock <IArticleUnitOfWork>(); this._articleUnitOfWork = new Mock <IArticleUnitOfWork>(); this._articleUnitOfWork.Setup(s => s.ArticleRepository).Returns(_fakeArticleRepository.Object); this._articleUnitOfWork.Setup(s => s.TagRepository).Returns(_fakeTagRepository.Object); _fakeArticleRepository.Setup(s => s.GetAll()).Returns(new[] { FakeArticle }); _mapper = MapperBuilder.BuildMapper(); this._sut = new ViewArticleService(_articleUnitOfWork.Object, _mapper); }
public ArticleController(IViewArticleService viewArticleService, IArticleService articleService) { _viewArticleService = viewArticleService; _articleService = articleService; }