public ThreadShould() { var conf = this.mockConfig.GetAdminSettings(); this.repo = new MockRepository(MockBehavior.Strict); this.cookieStorage = this.repo.Create <ICookieStorage>(); this.getIp = this.repo.Create <IGetIp>(); this.threadService = this.repo.Create <IThreadService>(); this.postService = this.repo.Create <IPostService>(); this.bannedImageLogger = this.repo.Create <IBannedImageLogger>(); this.iIsAdmin = this.repo.Create <IIsAdmin>(); this.uploadMapper = new UploadMapper(new ThumbNailer.ThumbNailer(this.mockConfig.GetThumbNailerSettings())); this.thread = new ThreadModel( new IpHasherFactory(this.mockConfig.GetHasherSettings()), new TripCodeHasher(this.mockConfig.GetTripCodeHasherSettings()), this.cookieStorage.Object, this.getIp.Object, this.threadService.Object, this.postService.Object, this.bannedImageLogger.Object, this.iIsAdmin.Object, this.uploadMapper) { PageContext = new Microsoft.AspNetCore.Mvc.RazorPages.PageContext(), }; }
public BoardModel( IpHasherFactory ipHasherFactory, TripCodeHasher tripCodeHasher, ICookieStorage cookieStorage, IGetIp getIp, IThreadService threadService, IPostService postService, IBannedImageLogger bannedImageLogger, IUploadMapper uploadMapper) { this.ipHasher = ipHasherFactory.GetHasher(); this.tripCodeHasher = tripCodeHasher; this.cookieStorage = cookieStorage; this.getIp = getIp; this.threadService = threadService; this.postService = postService; this.bannedImageLogger = bannedImageLogger; this.uploadMapper = uploadMapper; }