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); }
public ComputeHashProcessor(IHashAdapter hashAdapter) { _hashAdapter = hashAdapter ?? throw new ArgumentNullException(nameof(hashAdapter)); }
public AuthenticationService() { _Profile = new ProfileDao(); _Hash = new Sha256Adapter(); _OtpService = new OtpService(); }
private void AddHashDelegates(ToolStripMenuItem item, IHashAdapter hash) { item.Click += Hash_Click; item.Tag = hash; }
public AuthenticationService(IProfile profile, IHashAdapter hash, IOtpService otpService) { _Profile = profile; _Hash = hash; _OtpService = otpService; }