Beispiel #1
0
        public CommentService(IUnitOfWork unitOfWork, ICommentValidation commentValidation,
                              CommentServiceSettings serviceSettings)
            : base(unitOfWork)
        {
            Guard.NotNull(commentValidation, "commentValidation");
            Guard.NotNull(serviceSettings, "serviceSettings");

            this._commentValidation = commentValidation;
            this._serviceSettings = serviceSettings;
        }
        public void Init()
        {
            int permittedPeriodForDeleting = 300;
            int permittedPeriodForEditing = 300;
            int maxCommentTreeLevel = 5;

            this._serviceSettings = new CommentServiceSettings(permittedPeriodForDeleting, permittedPeriodForEditing,
            maxCommentTreeLevel);

            this.MockCommentValidation();
        }