Esempio n. 1
0
        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);
        }
Esempio n. 2
0
 public PromotionalContentService(IPromotionalContentRepository promotionalContentRepository, IPromotionalContentMapper mapper)
 {
     _promotionalContentRepository = promotionalContentRepository;
     _mapper = mapper;
 }
Esempio n. 3
0
 public PromotionalContentService()
 {
     _promotionalContentRepository = new PromotionalContentRepository();
     _mapper = new PromotionalContentMapper();
 }