public void PromotionalContentServiceCallsDependenciesCorrectly() { IPromotionalContentRepository promotionalContentRepository = Substitute.For <IPromotionalContentRepository>(); IPromotionalContentMapper mapper = Substitute.For <IPromotionalContentMapper>(); var pageIdRequest = Guid.NewGuid().ToString(); var target = new PromotionalContentService(promotionalContentRepository, mapper); target.GetPromotionalContent(pageIdRequest); mapper.Received().Map(Arg.Any <IList <PromotionalContent> >()); promotionalContentRepository.Received().GetPromotionalContentByPageId(pageIdRequest); }
public PromotionalContentService(IPromotionalContentRepository promotionalContentRepository, IPromotionalContentMapper mapper) { _promotionalContentRepository = promotionalContentRepository; _mapper = mapper; }
public PromotionalContentService() { _promotionalContentRepository = new PromotionalContentRepository(); _mapper = new PromotionalContentMapper(); }