예제 #1
0
        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;
 }
예제 #4
0
 public AuthController(SignInManager <IdentityUser> signInManager,
                       UserManager <IdentityUser> userManager,
                       IOptions <AppSettings> appSettings,
                       INotifyer notifyer) : base(notifyer)
 {
     _signInManager = signInManager;
     _userManager   = userManager;
     _appSettings   = appSettings.Value;
 }
예제 #5
0
    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);
    }
예제 #6
0
 public StockObserver(string name, INotifyer notifyer) : base(name, notifyer)
 {
 }
예제 #7
0
 public CategoryService(ICategoryRepository categoryRepository,
                        INotifyer notifyer) : base(notifyer)
 {
     _categoryRepository = categoryRepository;
 }
예제 #8
0
 public Observer(string name, INotifyer notifyer)
 {
     this.name     = name;
     this.notifyer = notifyer;
 }
 public void notify(INotifyer notifyer)
 {
     missedNews.Add("Новый продукт в " + notifyer.name() + ": " + notifyer.whatsNew());
 }
예제 #10
0
 public MainController(INotifyer notifyer)
 {
     _notifyer = notifyer;
 }
예제 #11
0
 public int HardWork(INotifyer notifyer)
 {
     notifyer.Notify("AZAZAZAZAZAZAZAZAZAZ Other machine :)");
     return(5);
 }
예제 #12
0
 internal void registerNotifyer(INotifyer notifyer)
 {
     validators.ForEach(v => v.registerNotifyer(notifyer));
 }
예제 #13
0
 public NBAObserver(string name, INotifyer notifyer) : base(name, notifyer)
 {
 }
예제 #14
0
 public void registerNotifyer(INotifyer notifyer)
 {
     this.notifyer = notifyer;
 }
예제 #15
0
 protected BaseService(INotifyer notifyer)
 {
     _notifyer = notifyer;
 }