コード例 #1
0
 public void Setup()
 {
     this._studentCourse            = StudentCourseTestUtils.GetStudentCourse();
     this._studentCourseCreationDto =
         StudentCourseTestUtils.GetStudentCourseCreationDto(this._studentCourse.CourseId);
     this._studentCourseDetailsDto =
         StudentCourseTestUtils.GetStudentCourseDetailsDto(this._studentCourse.StudentId,
                                                           this._studentCourse.CourseId);
     this._studentCourseMapper = new StudentCourseMapper();
 }
コード例 #2
0
 public void Setup()
 {
     client                   = new CustomWebApplicationFactory <Startup>().CreateClient();
     student1                 = StudentTestUtils.GetStudent();
     student2                 = StudentTestUtils.GetStudent2();
     studentDetailsDto1       = StudentTestUtils.GetStudentDetailsDto(student1.Id);
     studentDetailsDto2       = StudentTestUtils.GetStudentDetailsDto(student2.Id);
     studentCreationDto       = StudentTestUtils.GetStudentCreationDto();
     course1                  = CourseTestUtils.GetCourse();
     course2                  = CourseTestUtils.GetCourse2();
     courseDetailsDto         = CourseTestUtils.GetCourseDetailsDto(course1.Id);
     studentCourseCreationDto = StudentCourseTestUtils.GetStudentCourseCreationDto(course2.Id);
 }
コード例 #3
0
 public void Setup()
 {
     this._student                  = StudentTestUtils.GetStudent();
     this._course                   = CourseTestUtils.GetCourse2();
     this._courseDto                = CourseTestUtils.GetCourseDetailsDto(_course.Id);
     this._studentCourse1           = StudentCourseTestUtils.GetStudentCourse(_student.Id, _course.Id);
     this._studentCourse2           = StudentCourseTestUtils.GetStudentCourse2();
     this._studentCourseCreationDto =
         StudentCourseTestUtils.GetStudentCourseCreationDto(this._studentCourse1.CourseId);
     this._mockReadRepository      = new Mock <IReadRepository>();
     this._mockWriteRepository     = new Mock <IWriteRepository>();
     this._mockStudentCourseMapper = new Mock <IStudentCourseMapper>();
     this._mockCourseMapper        = new Mock <ICourseMapper>();
     this._studentCourseService    = new StudentCourseService(_mockReadRepository.Object, _mockWriteRepository.Object, _mockStudentCourseMapper.Object, _mockCourseMapper.Object);
 }