Пример #1
0
            public static Instructor GetInstructor(int id = 1, int totalCarAds = 10)
            {
                var instructor = new Faker <Instructor>()
                                 .CustomInstantiator(f => new Instructor(
                                                         $"Instructor{id}",
                                                         "The Best instructor",
                                                         f.Phone.PhoneNumber("+########")))
                                 .Generate();

                foreach (var exercise in GetExercises().Take(totalCarAds))
                {
                    instructor.AddExercise(exercise);
                }

                return(instructor);
            }