public void SetUp()
        {
            _Logger                = Substitute.For <ILogger>();
            _FailedCounter         = Substitute.For <IFailCounter>();
            _Notification          = Substitute.For <INotification>();
            _OtpService            = Substitute.For <IOtpService>();
            _Hash                  = Substitute.For <IHashAdapter>();
            _Profile               = Substitute.For <IProfile>();
            _AuthenticationService =
                new AuthenticationService(_Profile, _Hash, _OtpService);

            _AuthenticationService = new FailCounterDecorator(_AuthenticationService, _FailedCounter);
            _AuthenticationService = new LogFailCountDecorator(_AuthenticationService, _Logger, _FailedCounter);
            _AuthenticationService = new NotificationDecorator(_AuthenticationService, _Notification);
        }
Пример #2
0
 public ComputeHashProcessor(IHashAdapter hashAdapter)
 {
     _hashAdapter = hashAdapter ?? throw new ArgumentNullException(nameof(hashAdapter));
 }
Пример #3
0
 public AuthenticationService()
 {
     _Profile    = new ProfileDao();
     _Hash       = new Sha256Adapter();
     _OtpService = new OtpService();
 }
Пример #4
0
 private void AddHashDelegates(ToolStripMenuItem item, IHashAdapter hash)
 {
     item.Click += Hash_Click;
     item.Tag    = hash;
 }
Пример #5
0
 public AuthenticationService(IProfile profile, IHashAdapter hash, IOtpService otpService)
 {
     _Profile    = profile;
     _Hash       = hash;
     _OtpService = otpService;
 }