Exemplo n.º 1
0
        private IActionResult GetAssignmentById(int id)
        {
            var assignmentModel = SetupAssignmentsModel(id);
            var environments    = new List <Environment>();

            var environment = new Environment()
            {
                EnvironmentName = "Java",
                Id = 1,
                InternshipAssignment   = new InternshipAssignment(),
                InternshipAssignmentId = id
            };


            environments.Add(environment);

            _internshipAssignmentMock.Setup(_internshipAssignmentMock =>
                                            _internshipAssignmentMock.GetInternshipAssignmentById(It.IsAny <int>()))
            .Returns(new InternshipAssignment()
            {
                AmountOfInterns             = 2,
                AmountOfSupportingEmployees = 50,
                Company      = new Company(),
                CompanyId    = 1,
                Conditions   = "condition",
                DateCreated  = DateTime.Now,
                Description  = "description",
                Environments = new List <Environment>(environments),
                ExtraDescriptionEnvironments = "extra description",
                Id             = id,
                Specialization = Specialization.AiAndRobotics,
                SpecificStudentFirstAndLastName = "Last first",
                Status                 = Status.Behandeling,
                TeacherStatus          = TeacherStatus.Behandeling,
                ResearchTheme          = "test",
                Location               = new Address(),
                OtherComments          = "",
                InternshipPeriod       = InternshipPeriod.Semester1,
                IntroductionConditions = new List <IntroductionCondition>()
            });

            return(_assignmentsController.GetInternshipAssignmentById(assignmentModel));
        }