public ArticleComparer(IArticleProvider articleProvider, ISimilarityCalculator similarityCalculator, IArticleProcessor articleProcessor) { _articleProvider = articleProvider; _similarityCalculator = similarityCalculator; _articleProcessor = articleProcessor; }
public InventoryController( IInventoryProvider inventory, IArticleProvider article) { _inventory = inventory; _article = article; }
public async Task WhenCalledProperlyReturnsAtMaxTenDocs(IArticleProvider articleProvider) { //Arrange articleService = contextSetter.SetContextProvider(articleProvider); //Action var result = await articleService.RetrieveArticles(search, startDate, endDate); //Assert Assert.True(result.Count() <= 10); }
ArticleUpdaterService CreateService( IUpdateSourceValidator validator, IArticleProvider provider, IArticleStorageUpdater updater) { return(new ArticleUpdaterService( validator, provider, updater)); }
public InventoryController( IInventoryProvider inventoryProvider, IArticleProvider articleProvider, IStringLocalizer <SharedResource> localizer, IUserProvider <User> userProvider) { _inventoryProvider = inventoryProvider; _articleProvider = articleProvider; _localizer = localizer; _userProvider = userProvider; }
public void Constructor_NullProviderPassed_Throws() { var stubValidator = Substitute.For <IUpdateSourceValidator>(); IArticleProvider nullProvider = null; var stubUpdater = Substitute.For <IArticleStorageUpdater>(); Assert.Catch <ArgumentNullException>(() => new ArticleUpdaterService( stubValidator, nullProvider, stubUpdater)); }
public ArticleUpdaterService( IUpdateSourceValidator validator, IArticleProvider provider, IArticleStorageUpdater updater) { if (validator == null) { throw new ArgumentNullException(nameof(validator)); } if (provider == null) { throw new ArgumentNullException(nameof(provider)); } if (updater == null) { throw new ArgumentNullException(nameof(updater)); } this.validator = validator; this.provider = provider; this.updater = updater; }
//Forma 2 public void SetContextProvider(IArticleService articleService, IArticleProvider provider) { articleService = new ArticleService(provider, validatorService); }
//Forma 1 public ArticleService SetContextProvider(IArticleProvider provider) { this.articleService = new ArticleService(provider, validatorService); return(articleService); }
public ArticleListViewModel(IArticleProvider articleProvider) { Articles = new ObservableCollection <IArticle>(articleProvider.Get()); }
public ArticleService(IArticleProvider articleProvider, IMapper mapper, MarkdownPipeline pipeline) { _articleProvider = articleProvider; _mapper = mapper; _pipeline = pipeline; }
public ArticleViewModelProvider(IArticleProvider articleProvider) { this.articleProvider = articleProvider; }
public MainWindowViewModel(IArticleProvider articleProvider) { //Articles = articleProvider.Get(); IncrementCounterCommand = new DelegateCommand(IncrementCounter, () => Counter < 5) .ObservesProperty(() => Counter); }
public ArticleListingController(IArticleProvider newsarticleProvider) { _newsarticleProvider = newsarticleProvider ?? throw new ArgumentNullException(nameof(newsarticleProvider)); }
//private readonly HttpClient _httpClient; // public IArticleProvider ArticleProvider {get;set;} public ArticleService(IArticleProvider articleProvider, IValidatorService validatorService) { _articleProvider = articleProvider; // _httpClient = new HttpClient(); _validatorService = validatorService; }
public ArticleController(IArticleProvider articleProvider, IStoreProvider storeProvider) { _articleProvider = articleProvider; _storeProvider = storeProvider; }