public void Init()
        {
            var autoMapperConfig = new AutoMapperConfig();
            autoMapperConfig.Execute(typeof(AllArticlesController).Assembly);

            this.articlesServiceMock = new Mock<IArticlesService>();

            this.articlesServiceMock.Setup(x => x.GetById(It.IsAny<string>()))
               .Returns(new Article { Name = ArticleName, Content = ArticleContent });
        }
        public void Init()
        {
            var autoMapperConfig = new AutoMapperConfig();
            autoMapperConfig.Execute(typeof(AllEventsController).Assembly);

            var eventData = new Event { Name = EventName, Description = EventDescription, StartTime = DateTime.UtcNow, EndTime = DateTime.UtcNow.AddDays(2), CategoryId = 1 };
            var eventsMock = new List<Event>() { eventData }.AsQueryable();
            this.eventsServiceMock = new Mock<IEventsService>();
            this.articlesServiceMock = new Mock<IArticlesService>();

            this.eventsServiceMock.Setup(x => x.GetAll())
                .Returns(eventsMock);
        }
 public static void RegisterAutoMapper()
 {
     var autoMapperConfig = new AutoMapperConfig();
     autoMapperConfig.Execute(Assembly.GetExecutingAssembly());
 }