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

            return(homework);
        }
        private static Course NewCourse()
        {
            DateTime startDate = DateGenerator.GenerateDate();

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

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

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

            return(student);
        }