Esempio n. 1
0
 public AssignmentsController(IAssignmentsService assignmentsService, IStudentsService studentsService, UserManager <ApplicationUser> userManager, IFilesService filesService)
 {
     this.assignmentsService = assignmentsService;
     this.studentsService    = studentsService;
     this.userManager        = userManager;
     this.filesService       = filesService;
 }
 public void Init()
 {
     this.ConfigureMapper();
     this._context    = new FakeSchoolSystemContext();
     this._service    = new StudentsService(this._context);
     this._controller = new StudentsController(this._service);
 }
 public StudentSubjectsService(
     IRepository <StudentSubjects> studentSubjectsRepository,
     IStudentsService studentsService)
 {
     this.studentSubjectsRepository = studentSubjectsRepository;
     this.studentsService           = studentsService;
 }
Esempio n. 4
0
        //public List<Student> Students { get; private set; }

        public StudentsServiceTestFixture()
        {
            MVCWebAppDbContext = new Mock <DbContexts.MVCWebAppDbContext>();

            StudentService = new StudentsService(MVCWebAppDbContext.Object);

            var campus = new Campus()
            {
                CampusID = 1, CampusName = "SMF"
            };
            var Students = new List <Student>()
            {
                new Student()
                {
                    StudentID = 1, RefNo = "12456343", FirstName = "John", LastName = "Smith", DateOfBirth = DateTime.Now.AddYears(-9), DateCreated = DateTime.Now, CampusID = 1, Campus = campus
                },
                new Student()
                {
                    StudentID = 2, RefNo = "87984564", FirstName = "Pete", LastName = "Luck", DateOfBirth = DateTime.Now.AddYears(-20), DateCreated = DateTime.Now.AddDays(1), CampusID = 2, Campus = campus
                }
            };

            // set up student entity.
            var mockSet = new Mock <DbSet <Student> >();

            mockSet.As <IQueryable <Student> >().Setup(m => m.Provider).Returns(Students.AsQueryable().Provider);
            mockSet.As <IQueryable <Student> >().Setup(m => m.Expression).Returns(Students.AsQueryable().Expression);
            mockSet.As <IQueryable <Student> >().Setup(m => m.ElementType).Returns(Students.AsQueryable().ElementType);
            mockSet.As <IQueryable <Student> >().Setup(m => m.GetEnumerator()).Returns(Students.AsQueryable().GetEnumerator());

            MVCWebAppDbContext.Setup(c => c.Students).Returns(mockSet.Object);

            //MVCWebAppDbContext.Setup(m => m.Students.Include("Campus")).Returns(mockSet.Object);
        }
Esempio n. 5
0
 public TasksController(ITasksService tasksService, ITeachersService teachersService, IStudentsService studentsService, ILogger <AssignmentsController> logger)
 {
     _tasksService    = tasksService;
     _teachersService = teachersService;
     _studentsService = studentsService;
     _logger          = logger;
 }
Esempio n. 6
0
 public UsersController(IStudentsService students, IPaymentsService payments, ICurrentUserService user, IOutstandingPaymentsService outStandingPayments)
 {
     _students            = students;
     _payments            = payments;
     _user                = user;
     _outStandingPayments = outStandingPayments;
 }
Esempio n. 7
0
 public void Init()
 {
     _universitySqlLiteDbFactory = new UniversitySqlLiteDbFactory();
     _universityDbContext        = _universitySqlLiteDbFactory.GetDbContext();
     _studentsService            = new StudentsService(
         new StudentsRepository(_universitySqlLiteDbFactory));
 }
Esempio n. 8
0
 public StudentsController(IStudentsService studentsService, IMarksService marksService, ISubjectsService subjectsService, ITeachersService teachersService)
 {
     this.studentsService = studentsService;
     this.marksService    = marksService;
     this.subjectsService = subjectsService;
     this.teachersService = teachersService;
 }
Esempio n. 9
0
 public IdentityController(
     IIdentityService identityService,
     IStudentsService students)
 {
     this.identityService = identityService;
     _students            = students;
 }
Esempio n. 10
0
 public AccountsController(IAccountsService userService, IStudentsService studentsService, IParentsService parentsService, ITeachersService teachersService)
 {
     service = userService;
     this.studentsService = studentsService;
     this.parentsService  = parentsService;
     this.teachersService = teachersService;
 }
Esempio n. 11
0
 public OutstandingPaymentsController(
     IPaymentsService payments,
     IStudentsService students)
 {
     _payments = payments;
     _students = students;
 }
 public HomeController(IStudentCourseInstancesService studentCourseInstancesService,
                       IStudentsService studentsService,
                       IBlogArticleService blogArticleService)
 {
     this.studentCourseInstancesService = studentCourseInstancesService;
     this.studentsService    = studentsService;
     this.blogArticleService = blogArticleService;
 }
Esempio n. 13
0
 //private readonly ILevelsService levelsService;
 public BaseController(IGroupsService groupsService, ITeachersService teachersService, IStudentsService studentsService, IParentsService parentsService /*, ILevelsService levelsService*/)
 {
     this.groupsService   = groupsService;
     this.teachersService = teachersService;
     this.studentsService = studentsService;
     this.parentsService  = parentsService;
     //this.levelsService = levelsService;
 }
Esempio n. 14
0
 public EvaluationsController(ILogger <EvaluationsController> logger, IAbsencesService absencesService, IGradesService gradesService, IStudentsService studentsService, ISubjectsService subjectsService)
 {
     _logger          = logger;
     _absencesService = absencesService;
     _gradesService   = gradesService;
     _studentsService = studentsService;
     _subjectsService = subjectsService;
 }
        public StudentsServiceTestWithFixture(StudentsServiceTestFixture fixture)
        {
            _dbContext = fixture.MVCWebAppDbContext;

            _studentService = fixture.StudentService;

            //_students = fixture.Students;
        }
Esempio n. 16
0
 public MarksService(IUnitOfWork db, ITeachesService teachsService, IStudentsService studentsService, ISubjectsService subjectsService, IEmailService emailService)
 {
     this.db              = db;
     this.teachsService   = teachsService;
     this.studentsService = studentsService;
     this.subjectsService = subjectsService;
     this.emailService    = emailService;
 }
Esempio n. 17
0
 public StudentController(UserManager <SapIdentityUser> userManager, IStudentsService studentsService, IPersonsService personsService, IDepartmentsService departmentsService, IDepartmentPersonsService departmentPersonsService, ICoursesService coursesService) : base(userManager, null, null)
 {
     _studentsService          = studentsService;
     _personsService           = personsService;
     _departmentsService       = departmentsService;
     _departmentPersonsService = departmentPersonsService;
     _coursesService           = coursesService;
 }
Esempio n. 18
0
 public CoursesController(ICoursesService coursesService,
                          ILogger <CoursesController> logger,
                          IStudentsService studentsService)
 {
     this.coursesService  = coursesService;
     this.logger          = logger;
     this.studentsService = studentsService;
 }
 public CommentsController(IAssignmentsService assignmentsService,
                           IStudentsService studentsService, ITeachersService teachersService, ICommentsService commentsService)
 {
     _assignmentsService = assignmentsService;
     _studentsService    = studentsService;
     _teachersService    = teachersService;
     _commentsService    = commentsService;
 }
Esempio n. 20
0
 //ITeachersService teachersService;
 //ISubjectsService subjectsService;
 public StudentDepartmentsService(IUnitOfWork db, IStudentsService studentsService, IDepartmentsService departmentsService)
 {
     this.db = db;
     this.studentsService    = studentsService;
     this.departmentsService = departmentsService;
     //this.teachersService = teachersService;
     //this.subjectsService = subjectsService;
 }
Esempio n. 21
0
 public BasicReportViewModel()
 {
     _locationService         = DependencyService.Get <ILocationService>();
     _studentService          = DependencyService.Get <IStudentsService>();
     _clinicalTestFormService = DependencyService.Get <IClinicalTestFormService>();
     _commonDataService       = DependencyService.Get <ICommonDataService>();
     _studentTestFormsService = DependencyService.Get <IStudentTestFormsService>();
     GetLocations();
 }
Esempio n. 22
0
 public MarksService(IUnitOfWork db, IStudentsService studentsService, ITeachersToSubjectsService teachersToSubjectsService, IFormsToTeacherSubjectsService formsToTeacherSubjectsService, IEmailsService emailsService, MarkToMarkDTO toDTO)
 {
     this.db = db;
     this.studentsService               = studentsService;
     this.teachersToSubjectsService     = teachersToSubjectsService;
     this.formsToTeacherSubjectsService = formsToTeacherSubjectsService;
     this.emailsService = emailsService;
     this.toDTO         = toDTO;
 }
Esempio n. 23
0
 public GradeService(
     IRepository <Student> studentRepository,
     IRepository <Grade> gradeRepository,
     IStudentsService studentsService)
 {
     this.studentRepository = studentRepository;
     this.gradeRepository   = gradeRepository;
     this.studentsService   = studentsService;
 }
 public AssignmentsController(IAssignmentsService assignmentsService, IWebHostEnvironment host, ILogger <AssignmentsController> logger,
                              IStudentsService studentsService, ITasksService tasksService)
 {
     _assignmentsService = assignmentsService;
     _studentsService    = studentsService;
     _tasksService       = tasksService;
     _host   = host;
     _logger = logger;
 }
Esempio n. 25
0
 public AttendancesService(
     IRepository <Attendance> attendanceRepository,
     IStudentsService studentsService,
     ISubjectsService subjectsService)
 {
     this.attendanceRepository = attendanceRepository;
     this.studentsService      = studentsService;
     this.subjectsService      = subjectsService;
 }
 public StudentsController(
     IStudentsService studentService,
     IStudentsService2 studentService2,
     ICampusService campusService)
 {
     _studentService  = studentService;
     _studentService2 = studentService2;
     _campusService   = campusService;
 }
Esempio n. 27
0
 public TeachesService(IUnitOfWork db, IStudentDepartmentsService studentDepartmentsService, ITeachersService teachersService,
                       ISubjectsService subjectsService, IStudentsService studentsService)
 {
     this.db = db;
     this.studentDepartmentsService = studentDepartmentsService;
     this.subjectsService           = subjectsService;
     this.teachersService           = teachersService;
     this.studentsService           = studentsService;
 }
Esempio n. 28
0
 public AssessmentConfigPopupViewModel(int offlineStudentId)
 {
     _commonDataService      = DependencyService.Get <ICommonDataService>();
     studentTestFormsService = DependencyService.Get <IStudentTestFormsService>();
     clinicalTestFormService = DependencyService.Get <IClinicalTestFormService>();
     _studentService         = DependencyService.Get <IStudentsService>();
     _orgRecordFormService   = DependencyService.Get <IOrgRecordFormService>();
     OfflineStudentId        = offlineStudentId;
     StartAssessmentCommand  = new Command(StartAssessmentClicked);
 }
Esempio n. 29
0
 public TeachersController(ITeachersService teachersService,
                           ITeacherToSubjectsService teacherToSubjectsService,
                           ISubjectsService subjectsService,
                           IStudentsService studentsService)
 {
     this.teachersService          = teachersService;
     this.teacherToSubjectsService = teacherToSubjectsService;
     this.subjectsService          = subjectsService;
     this.studentsService          = studentsService;
 }
Esempio n. 30
0
 public UsersController(ILinksService linksService, UserManager <ApplicationUser> userManager, SignInManager <ApplicationUser> signInManager, ISchoolService schoolService, IUsersService usersService, IRolesService rolesService, IStudentsService studentsService)
 {
     this.userManager     = userManager;
     this.usersService    = usersService;
     this.rolesService    = rolesService;
     this.studentsService = studentsService;
     this.linksService    = linksService;
     this.signInManager   = signInManager;
     this.schoolService   = schoolService;
 }
Esempio n. 31
0
 public APIController(
     ITagsService tags,
     IStudentsService students,
     ITeachersService teachers,
     IDiplomasService diplomas)
 {
     this.tags = tags;
     this.students = students;
     this.teachers = teachers;
     this.diplomas = diplomas;
 }
Esempio n. 32
0
 public HomeController(
     IDiplomasService diplomas,
     ITeachersService teachers,
     IStudentsService students,
     IMessagesService messages,
     ITagsService tags)
 {
     this.diplomas = diplomas;
     this.teachers = teachers;
     this.students = students;
     this.messages = messages;
     this.tags = tags;
 }
 public StudentController(IStudentsService studentsRepo)
 {
     this.students = studentsRepo;
 }
Esempio n. 34
0
 public StudentsController(IStudentsService studentsService, ICoursesService coursesService)
 {
     _studentsService = studentsService;
     _coursesService = coursesService;            
 }
Esempio n. 35
0
 public ManageController(IStudentsService students, ITeachersService teachers)
 {
     this.students = students;
     this.teachers = teachers;
 }
 public StudentsController(IStudentsService studentService)
 {
     this.students = studentService;
 }
Esempio n. 37
0
 public AccountController(
     IStudentsService students)
 {
     this.students = students;
 }