public CommentService(ISystemClock systemClock, ILogger <CommentService> logger, IPermissionsService permissionsService, ICommentCommand commentCommand, ICommentNotificationService commentNotificationService) { _systemClock = systemClock ?? throw new ArgumentNullException(nameof(systemClock)); _commentCommand = commentCommand ?? throw new ArgumentNullException(nameof(commentCommand)); _permissionsService = permissionsService ?? throw new ArgumentNullException(nameof(permissionsService)); _logger = logger ?? throw new ArgumentNullException(nameof(logger)); _commentNotificationService = commentNotificationService ?? throw new ArgumentNullException(nameof(commentNotificationService)); }
public NewCommentNotifier(IMapper mapper, IWallService wallService, INotificationService notificationService, ICommentNotificationService commentNotificationService, ICommentService commentService) { _mapper = mapper; _wallService = wallService; _notificationService = notificationService; _commentNotificationService = commentNotificationService; _commentService = commentService; }
public void TestInitializer() { var uow = Substitute.For <IUnitOfWork2>(); _postsDbSet = uow.MockDbSet <Post>(); _usersDbSet = uow.MockDbSet <ApplicationUser>(); _commentsDbSet = uow.MockDbSet <Comment>(); _wallModeratorsDbSet = uow.MockDbSet <WallModerator>(); _systemClock = Substitute.For <ISystemClock>(); _permissionService = Substitute.For <IPermissionService>(); _commentNotificationService = Substitute.For <ICommentNotificationService>(); _commentService = new CommentService(uow, _systemClock, _permissionService, _commentNotificationService); }
public CommentService( IUnitOfWork2 uow, ISystemClock systemClock, IPermissionService permissionService, ICommentNotificationService commentNotificationService) { _uow = uow; _systemClock = systemClock; _permissionService = permissionService; _postsDbSet = uow.GetDbSet <Post>(); _commentsDbSet = uow.GetDbSet <Comment>(); _wallModeratorsDbSet = uow.GetDbSet <WallModerator>(); _usersDbSet = uow.GetDbSet <ApplicationUser>(); _notificationsDbSet = uow.GetDbSet <NotificationsSettings>(); _commentNotificationService = commentNotificationService; }