Example #1
0
 public TaskManager(IRepository<Task> taskRepository, ITeacherManager teacherManager, IGroupManager groupManager, ITypeOfTaskManager typeOfTaskManager)
 {
     this._taskRepository = taskRepository;
     this._teacherManager = teacherManager;
     this._groupManager = groupManager;
     this._typeOfTaskManager = typeOfTaskManager;
 }
 public TeacherController(ILogger <TeacherController> logger,
                          ITeacherManager teacherManager,
                          IOptionManager optionManager,
                          IMapper mapper)
 {
     _logger         = logger;
     _mapper         = mapper;
     _teacherManager = teacherManager;
     _optionManager  = optionManager;
 }
 public TeacherManageController(
     ITeacherManager teacherManager,
     IUserManager userManager,
     IDeptManager deptManager,
     IPostManager postManager)
 {
     _teacherManager = teacherManager;
     _userManager    = userManager;
     _deptManager    = deptManager;
     _postManager    = postManager;
 }
 public TeacherController(
     ITeacherManager teacherManager,
     IMapper mapper,
     IOptions <Credentials> credentials,
     IFileManager fileManager,
     ICespRepository cespRepository)
 {
     _teacherManager = teacherManager;
     _mapper         = mapper;
     _credentials    = credentials.Value;
     _fileManager    = fileManager;
     _cespRepository = cespRepository;
 }
        public async Task Kabul_edilen_yas_araligi_disinda_ogretmen_kaydedildiginde_result_fail_donmeli(int age)
        {
            //Arrange

            dateTimeProviderMock.Setup(t => t.GetTodayDateTime())
            .ReturnsAsync(() => new DateTime(2020, 01, 01));

            var today = dateTimeProviderMock.Object.GetTodayDateTime();

            // TODO : sadece ilgilendiğimiz parametreleri doldursak olmazmıydı
            var teacherBlDto = new TeacherBlDto
            {
                BirthDate = new DateTime(today.Result.Year - age, 01, 01),
                FirstName = "Murat",
                LastName  = "Çabuk",
                Gender    = "Male",
            };

            var teacher = new Teacher
            {
                BirthDate = new DateTime(2003, 01, 01),
                FirstName = "Murat",
                LastName  = "Çabuk",
                Gender    = "Male",
            };

            mapperMock.Setup(t => t.Map <Teacher>(teacherBlDto)).Returns(teacher);

            asyncTeacherRespositoryMock.Setup(t => t.Insert(teacher));

            sutTeacherManager = new TeacherManager(asyncTeacherRespositoryMock.Object,
                                                   mapperMock.Object,
                                                   dateTimeProviderMock.Object,
                                                   cacheMock.Object);

            var teacherAddUpdateModel = new TeacherAddUpdateModel
            {
                Teacher = teacherBlDto
            };

            //Act
            var result = await sutTeacherManager.Add(teacherAddUpdateModel);

            var count = result.SpecResult.FailedSpecifications.ToFilteredSpecs(nameof(TeacherBlDto.BirthDate)).Count;

            //Assert
            Assert.True(count > 0);

            // TODO : şu şekilde yapsaydık olmazmıydı
            // Assert.False(result.IsOk);
        }
 public TeacherController(ITeacherManager teacher)
 {
     _teacher = teacher;
 }
Example #7
0
 public AccountController(IStudentManager studentManager, IInstitutionManager institutionManager, ITeacherManager teacherManager)
 {
     this._studentManager = studentManager;
     this._institutionManager = institutionManager;
     this._teacherManager = teacherManager;
 }
Example #8
0
 public TeacherManagerController(ITeacherManager teacherManager)
     : base()
 {
     this._teacherManager = teacherManager;
 }
Example #9
0
 public TeacherController()
 {
     TeacherManager = Site.TeacherManager;
 }
Example #10
0
 public TeacherController()
 {
     manager = new TeacherManager();
 }
Example #11
0
 public TeacherController(ITeacherManager teacherManager, ILogger logger)
 {
     _teacherManager = teacherManager;
     _logger         = logger;
 }
 public TeacherController()
 {
     _teacherManager = new TeacherService();
 }
Example #13
0
 public CourseService()
 {
     _courseRepository = new CourseRepository();
     _teacherManager   = new TeacherService();
 }
Example #14
0
 public LessonManager(IObsNetRepository <Lesson> repository, ITeacherManager teacher)
 {
     _repository = repository;
     _teacher    = teacher;
 }
Example #15
0
 public TeacherController(ITeacherManager teacherManager, IMapper mapper)
 {
     this.teacherManager = teacherManager;
     this.mapper         = mapper;
 }