Exemplo n.º 1
0
        public ReportStorage(
            [NotNull] IReportAuthorityValidator reportAuthorityValidator,
            [NotNull] IReportRepository reportRepository,
            [NotNull] ITelemetryScopeProvider telemetryScopeProvider,
            [NotNull] ITimeService timeService,
            [NotNull] IUserPrincipal userPrincipal)
        {
            if (reportAuthorityValidator == null)
            {
                throw new ArgumentNullException(nameof(reportAuthorityValidator));
            }
            if (reportRepository == null)
            {
                throw new ArgumentNullException(nameof(reportRepository));
            }
            if (telemetryScopeProvider == null)
            {
                throw new ArgumentNullException(nameof(telemetryScopeProvider));
            }
            if (timeService == null)
            {
                throw new ArgumentNullException(nameof(timeService));
            }
            if (userPrincipal == null)
            {
                throw new ArgumentNullException(nameof(userPrincipal));
            }

            _reportAuthorityValidator = reportAuthorityValidator;
            _reportRepository         = reportRepository;
            _telemetryScopeProvider   = telemetryScopeProvider;
            _timeService   = timeService;
            _userPrincipal = userPrincipal;
        }
Exemplo n.º 2
0
        public void SetUp()
        {
            _userAuthorityValidator = new Mock <IUserAuthorityValidator>();

            _target = new ReportAuthorityValidator(_userAuthorityValidator.Object);
        }