public AdvertisementService( IAdvertisementConverter converter, IRepository <Advertisement> repository) { _converter = converter; _repository = repository; }
public void SetUp() { _sut = new AdvertisementConverter(Mapper.Instance); _advertisementDTOFaker = new Faker <AdvertisementDTO>() .RuleFor(x => x.Id, f => f.Random.Guid()) .RuleFor(x => x.Title, f => f.Random.Words(4)) .RuleFor(x => x.Description, f => f.Random.Words(20)) .RuleFor(x => x.Price, f => f.Random.Decimal()) .RuleFor(x => x.PublicationDate, f => f.Date.Past()); _advertisementEntityFaker = new Faker <Advertisement>() .RuleFor(x => x.Id, f => f.Random.Guid()) .RuleFor(x => x.Title, f => f.Random.Words(4)) .RuleFor(x => x.Description, f => f.Random.Words(20)) .RuleFor(x => x.Price, f => f.Random.Decimal()) .RuleFor(x => x.PublicationDate, f => f.Date.Past()); }