Ejemplo n.º 1
0
 public void AddRandomTemperamentsToAllStudents()
 {
     foreach (User student in allStudents)
     {
         var studentNo = new Random().Next(1000, 9999) + "";
         userBuilder.AddPropertyToUser("schoolNo", studentNo, student);
     }
     foreach (User student in preSchoolStudents)
     {
         dataBuilder.userBuilder.SetTemperament(contextBuilder.GetContext(), student.Id, new Random().Next(501, 509));
         for (int i = 1; i <= 17; i += 4)
         {
             dataBuilder.AssignGuidanceSurveyToUser(leaderTeacherUser, managerUser, student, i);
         }
     }
     foreach (User student in primarySchoolStudents)
     {
         userBuilder.SetTemperament(contextBuilder.GetContext(), student.Id, new Random().Next(401, 418));
         for (int i = 2; i <= 18; i += 4)
         {
             dataBuilder.AssignGuidanceSurveyToUser(leaderTeacherUser, managerUser, student, i);
         }
     }
     foreach (User student in secondarySchoolStudents)
     {
         userBuilder.SetTemperament(contextBuilder.GetContext(), student.Id, new Random().Next(201, 362));
         for (int i = 3; i <= 19; i += 4)
         {
             dataBuilder.AssignGuidanceSurveyToUser(leaderTeacherUser, managerUser, student, i);
         }
     }
     foreach (User student in highSchoolStudents)
     {
         userBuilder.SetTemperament(contextBuilder.GetContext(), student.Id, new Random().Next(201, 362));
         for (int i = 4; i <= 20; i += 4)
         {
             dataBuilder.AssignGuidanceSurveyToUser(leaderTeacherUser, managerUser, student, i);
         }
     }
 }
Ejemplo n.º 2
0
 public void AddAdultTemperament(User testSubjectUser)
 {
     userBuilder.SetTemperament(dbContext, testSubjectUser.Id, new Random().Next(1, 162));
 }