public ContentService(ContentDbContext context, IPersistenceHelper <ContentDbContext> persistenceHelper, IReleaseContentSectionRepository releaseContentSectionRepository, IUserService userService, IMapper mapper) { _context = context; _persistenceHelper = persistenceHelper; _releaseContentSectionRepository = releaseContentSectionRepository; _userService = userService; _mapper = mapper; }
private ContentService SetupContentService( ContentDbContext contentDbContext = null, IPersistenceHelper <ContentDbContext> persistenceHelper = null, IReleaseContentSectionRepository releaseContentSectionRepository = null, IUserService userService = null) { return(new ContentService( contentDbContext ?? new Mock <ContentDbContext>().Object, persistenceHelper ?? DefaultPersistenceHelperMock().Object, releaseContentSectionRepository ?? new ReleaseContentSectionRepository(contentDbContext), userService ?? new Mock <IUserService>().Object, AdminMapper() )); }
private static ContentService SetupContentService( ContentDbContext contentDbContext, IPersistenceHelper <ContentDbContext> persistenceHelper = null, IReleaseContentSectionRepository releaseContentSectionRepository = null, IUserService userService = null) { return(new ContentService( contentDbContext, persistenceHelper ?? new PersistenceHelper <ContentDbContext>(contentDbContext), releaseContentSectionRepository ?? new ReleaseContentSectionRepository(contentDbContext), userService ?? MockUtils.AlwaysTrueUserService().Object, AdminMapper() )); }