private static Homework NewHomework()
        {
            Homework homework = new Homework()
            {
                Content        = NewContent(),
                SubmissionTime = DateGenerator.GenerateDate(),
                ContentType    = GetRandomContentType(),
                StudentId      = GetRandomStudentFromDb(),
                CourseId       = GetRandomCourseFromDb()
            };

            return(homework);
        }
Пример #2
0
        private static Course NewCourse()
        {
            DateTime startDate = DateGenerator.GenerateDate();

            Course course = new Course()
            {
                Name      = GenerateCourseName(),
                StartDate = startDate,
                EndDate   = DateGenerator.GenerateEndDate(startDate),
                Price     = NewPrice()
            };

            return(course);
        }
        public static Student NewStudent()
        {
            string   name         = NameGenerator.FirstName() + " " + NameGenerator.LastName();
            DateTime registeredOn = DateGenerator.GenerateDate();
            string   phoneNumber  = PhoneNumberGenerator.NewPhoneNumber();

            Student customer = new Student()
            {
                Name         = name,
                RegisteredOn = registeredOn,
                PhoneNumber  = phoneNumber
            };

            return(customer);
        }