public async Task <IActionResult> AssignTeachers([FromBody] InternshipAssign model)
        {
            if (!(await _service.AssignReviewer(model.InternshipID, model.Teachers)))
            {
                return(BadRequest());
            }

            return(Ok());
        }
        public void Setup()
        {
            _context = ContextHelper.GetDatabaseContext();

            moqInternshipService = new Mock <IInternshipService>();
            moqUserService       = new Mock <IUserService>();

            userTeacher = new User
            {
                Id           = Guid.NewGuid(),
                City         = "City",
                Email        = "*****@*****.**",
                FirstName    = "John",
                HouseNumber  = 18,
                LastName     = "Doe",
                PasswordHash = Guid.NewGuid().ToString(),
                PhoneNumber  = "+3259874896",
                ZipCode      = 7890,
                UserName     = "******",
                StreetName   = "Easy Street"
            };

            internship = new Internship
            {
                RequiredFieldsOfStudy  = new List <string>(),
                AssignedStudents       = new List <string>(),
                Environment            = new List <string>(),
                TechnicalDescription   = "TechnicalDescription",
                ExtraRequirements      = "ExtraRequirements",
                ResearchTheme          = "ResearchTheme",
                Activities             = new List <string>(),
                RequiredStudentsAmount = 2,
                AdditionalRemarks      = "AdditionalRemarks",
                Id = Guid.NewGuid(),
                InternshipState = 0,
                Periods         = new List <string>(),
                Description     = "Description",
                DateOfState     = DateTime.UtcNow,
            };

            roleTeacher = new Role
            {
                Id             = Guid.NewGuid(),
                Name           = "Teacher",
                NormalizedName = "TEACHER"
            };

            ReviewerInternships reviewerInternships = new ReviewerInternships
            {
                ReviewedInternship = internship,
                Reviewer           = userTeacher
            };

            reviewerList = new List <ReviewerInternships> {
                reviewerInternships
            };

            internship.Reviewers = reviewerList;

            var store = new Mock <IUserStore <User> >();


            moqUserManager = new Mock <UserManager <User> >(store.Object, null, null, null, null, null, null, null, null);

            moqUserManager.Object.UserValidators.Add(new UserValidator <User>());
            moqUserManager.Object.PasswordValidators.Add(new PasswordValidator <User>());



            sut = new InternshipController(moqInternshipService.Object, moqUserService.Object, moqUserManager.Object);

            assignDto = new InternshipAssign
            {
                InternshipID = Guid.NewGuid(),
                Teachers     = new List <Guid> {
                    Guid.NewGuid()
                }
            };

            _context.Add(userTeacher);
            _context.Roles.Add(roleTeacher);
            _context.UserRoles.Add(new IdentityUserRole <Guid>
            {
                RoleId = roleTeacher.Id,
                UserId = userTeacher.Id
            });

            _context.SaveChanges();
        }