public void Then_A_Name_Collision_Within_The_Advertiser_Will_Cause_A_DomainException()
        {
            CreativeDto _dto = new CreativeDto
            {
                AdvertiserId = 1,
                Name = "Creative1"
            };
            _creativeService.CreateCreative(_dto);

            _creativeRepository.Verify(r => r.Add(It.IsAny<Creative>()), Times.Never);
        }
Ejemplo n.º 2
0
        private static void ValidateUpdateOfDomainModel(CreativeDto creativeDto, Creative creative)
        {
            if (creativeDto == null)
                throw new DomainException("Unable to update Creative from null CreativeDto.");

            if (creative == null)
                throw new DomainException("Unable to update null Creative from CreativeDto.");

            if (creative.Id != creativeDto.Id)
                throw new DomainException("Unable to update Creative since Id values do not match.");
        }
 public void Initialize()
 {
     _creative = CreativeFactory.CreateCreativeDomainObjectWithPanels();
     _creativeDto = CreativeFactory.CreateCreativeDtoObject();
     AutoMapperConfig.MapTypes();
 }
Ejemplo n.º 4
0
 public void UpdateCreative(CreativeDto creativeRequest)
 {
     _creativesService.UpdateCreative(creativeRequest);
 }
Ejemplo n.º 5
0
 public Creative CreateCreative(CreativeDto creativeRequest)
 {
     return _creativesService.CreateCreative(creativeRequest);
 }