Пример #1
0
 public static Faker <Company> Get(int applicants)
 {
     return(new Faker <Company>().CustomInstantiator(f =>
                                                     new Company(f.Company.CompanyName(), Applicant.Get().Generate(applicants))));
 }
Пример #2
0
 public static Faker <Company> Get(int applicants)
 {
     return(new Faker <Company>()
            .RuleFor(c => c.Name, f => f.Company.CompanyName())
            .RuleFor(c => c.Applicants, (f, company) => Applicant.Get().Generate(applicants)));
 }