public void SetUp() { _queryTranslator = new Mock <IQueryTranslator>(); _queryModelAccessValidator = new Mock <IQueryModelAccessValidator>(); _target = new QueryModelProcessor(_queryTranslator.Object, _queryModelAccessValidator.Object); }
public QueryStorage( [NotNull] IQueryAccessValidator queryAccessValidator, [NotNull] IQueryModelProcessor queryModelProcessor, [NotNull] IQueryModelValidator queryModelValidator, [NotNull] IQueryRepository queryRepository, [NotNull] ITelemetryScopeProvider telemetryScopeProvider, [NotNull] ITimeService timeService, [NotNull] IUserPrincipal userPrincipal, [NotNull] IUserAuthorityValidator userAuthorityValidator) { if (queryAccessValidator == null) { throw new ArgumentNullException(nameof(queryAccessValidator)); } if (queryModelProcessor == null) { throw new ArgumentNullException(nameof(queryModelProcessor)); } if (queryModelValidator == null) { throw new ArgumentNullException(nameof(queryModelValidator)); } if (queryRepository == null) { throw new ArgumentNullException(nameof(queryRepository)); } if (telemetryScopeProvider == null) { throw new ArgumentNullException(nameof(telemetryScopeProvider)); } if (timeService == null) { throw new ArgumentNullException(nameof(timeService)); } if (userPrincipal == null) { throw new ArgumentNullException(nameof(userPrincipal)); } if (userAuthorityValidator == null) { throw new ArgumentNullException(nameof(userAuthorityValidator)); } _queryAccessValidator = queryAccessValidator; _queryModelProcessor = queryModelProcessor; _queryRepository = queryRepository; _telemetryScopeProvider = telemetryScopeProvider; _timeService = timeService; _userAuthorityValidator = userAuthorityValidator; _queryModelValidator = queryModelValidator; _userPrincipal = userPrincipal; }