public void Setup() { _logger = Substitute.For <ILogger>(); _profile = Substitute.For <IProfile>(); _optService = Substitute.For <IOtp>(); _hash = Substitute.For <IHash>(); _notification = Substitute.For <INotification>(); _failedCounter = Substitute.For <IFailedCounter>(); _apiCountQuota = Substitute.For <IApiCountQuota>(); var authenticationService = new AuthenticationService(_profile, _hash, _optService); var notificationDecorator = new NotificationDecorator(authenticationService, _notification); var failedCountDecorator = new FailedCountDecorator(notificationDecorator, _failedCounter); var logDecorator = new LogDecorator(failedCountDecorator, _logger, _failedCounter); var apiCallQuotaDecorator = new ApiCallQuotaDecorator(logDecorator, _apiCountQuota); _authentication = apiCallQuotaDecorator; }
public ApiCallQuotaDecorator(IAuthentication authenticationService, IApiCountQuota apiCountQuota) : base(authenticationService) { _apiCountQuota = apiCountQuota; }