private DefaultBlogMLService GetBlogService(IRepository repository, IBlogService blogService, IRedirectService redirectService = null) { if (redirectService == null) { redirectService = new Mock<IRedirectService>().Object; } var unitOfWork = new Mock<IUnitOfWork>().Object; var pageService = new Mock<IPageService>().Object; var cmsConfiguration = new Mock<ICmsConfiguration>().Object; var httpContextAccessor = new Mock<IHttpContextAccessor>().Object; var urlService = new DefaultUrlService(unitOfWork, new CmsConfigurationSection()); var importService = new DefaultBlogMLService(repository, urlService, blogService, unitOfWork, redirectService, pageService, cmsConfiguration, httpContextAccessor); return importService; }