Beispiel #1
0
        public void SetUp()
        {
            _profile        = Substitute.For <IProfile>();
            _otp            = Substitute.For <IOtp>();
            _hash           = Substitute.For <IHash>();
            _notification   = Substitute.For <INotification>();
            _logger         = Substitute.For <ILogger>();
            _failedCounter  = Substitute.For <IFailedCounter>();
            _apiUserQuotaV2 = Substitute.For <IApiUserQuotaV2>();
            var authenticationService =
                new AuthenticationService(_profile, _hash, _otp);

            var checkUseTimeDecorator  = new ApiCheckTimeDecorator(authenticationService, _apiUserQuotaV2);
            var notificationDecorator  = new NotificationDecorator(checkUseTimeDecorator, _notification, _logger);
            var failedCounterDecorator = new FailedCounterDecorator(notificationDecorator, _failedCounter);
            var logDecorator           = new LogDecorator(failedCounterDecorator, _failedCounter, _logger);

            _authentication = logDecorator;
        }
 public ApiCheckTimeDecorator(IAuthentication authentication, IApiUserQuotaV2 apiUserQuotaV2) : base(authentication)
 {
     _apiUserQuotaV2 = apiUserQuotaV2;
 }