public CoverageProcessorTest() { this._stubFileHelper = Substitute.For <IFileHelper>(); this._stubReportParser = Substitute.For <IReportParser>(); this._stubCoverageUpdater = Substitute.For <ICoverageUpdater>(); this._stubNotifyer = Substitute.For <INotifyer>(); this._stubEmailNotifyer = Substitute.For <INotifyer>(); this._stubCoverageLogger = Substitute.For <ICoverageLogger>(); this._stubServiceProvider = Substitute.For <IServiceProvider>(); this._stubServiceProvider.GetService <IFileHelper>().Returns(this._stubFileHelper); this._stubServiceProvider.GetService <IReportParser>().Returns(this._stubReportParser); this._stubServiceProvider.GetService <ICoverageUpdater>().Returns(this._stubCoverageUpdater); //this._stubServiceProvider.GetService<INotifyer>().Returns(this._stubNotifyer); //this._stubServiceProvider.GetService<INotifyer>().Returns(this._stubEmailNotifyer); //this._stubServiceProvider.GetService<INotifyer>().Returns(new SlackNotifyer(this._stubServiceProvider)); //this._stubServiceProvider.GetService<INotifyer>().Returns(new EmailNotifyer(this._stubServiceProvider)); this._stubServiceProvider.GetService <IEnumerable <INotifyer> >().Returns(new List <INotifyer> { this._stubNotifyer, this._stubEmailNotifyer }); this._stubServiceProvider.GetService <ICoverageLogger>().Returns(this._stubCoverageLogger); //this._stubServiceProvider.GetServices<INotifyer>(); //this._stubServiceProvider.GetServices<INotifyer>().Returns(new List<INotifyer> { this._stubNotifyer, this._stubEmailNotifyer }); }
public ProductsController(IProductRepository productRepository, IProductService productService, IMapper mapper, INotifyer notifyer) : base(notifyer) { _productRepository = productRepository; _productService = productService; _mapper = mapper; }
public CategoriesController(ICategoryRepository categoryRepository, IMapper mapper, ICategoryService categoryService, INotifyer notifyer) : base(notifyer) { _categoryRepository = categoryRepository; _mapper = mapper; _categoryService = categoryService; }
public AuthController(SignInManager <IdentityUser> signInManager, UserManager <IdentityUser> userManager, IOptions <AppSettings> appSettings, INotifyer notifyer) : base(notifyer) { _signInManager = signInManager; _userManager = userManager; _appSettings = appSettings.Value; }
public Engine build() { ISiteDataProvider siteDataProvider = getProvider <ISiteDataProvider>("siteDataProvider"); List <IValidator> validators = getProviders <IValidator>("validators"); INotifyer notifyer = getProvider <INotifyer>("notifyer"); Engine engine = new Engine(siteDataProvider, getComponetsParams("engine")); engine.registerValidators(validators); engine.registerNotifyer(notifyer); return(engine); }
public StockObserver(string name, INotifyer notifyer) : base(name, notifyer) { }
public CategoryService(ICategoryRepository categoryRepository, INotifyer notifyer) : base(notifyer) { _categoryRepository = categoryRepository; }
public Observer(string name, INotifyer notifyer) { this.name = name; this.notifyer = notifyer; }
public void notify(INotifyer notifyer) { missedNews.Add("Новый продукт в " + notifyer.name() + ": " + notifyer.whatsNew()); }
public MainController(INotifyer notifyer) { _notifyer = notifyer; }
public int HardWork(INotifyer notifyer) { notifyer.Notify("AZAZAZAZAZAZAZAZAZAZ Other machine :)"); return(5); }
internal void registerNotifyer(INotifyer notifyer) { validators.ForEach(v => v.registerNotifyer(notifyer)); }
public NBAObserver(string name, INotifyer notifyer) : base(name, notifyer) { }
public void registerNotifyer(INotifyer notifyer) { this.notifyer = notifyer; }
protected BaseService(INotifyer notifyer) { _notifyer = notifyer; }