Ejemplo n.º 1
0
            public static Broker GetBroker(int id = 1, int totalApartmentAds = 10)
            {
                var broker = new Faker <Broker>()
                             .CustomInstantiator(f => new Broker(
                                                     $"Broker{id}",
                                                     f.Phone.PhoneNumber("+########")))
                             .Generate()
                             .SetId(id);

                foreach (var apartmentAd in GetApartmentAds().Take(totalApartmentAds))
                {
                    broker.AddApartmentAd(apartmentAd);
                }

                return(broker);
            }