Esempio n. 1
0
        private List <Environment> GetEnvironment()
        {
            var environments = new List <Environment>();
            int id           = 1;
            var environment  = new Environment()
            {
                EnvironmentName = "Java",
                Id = 1,
                InternshipAssignment   = new InternshipAssignment(),
                InternshipAssignmentId = id
            };

            environments.Add(environment);
            return(environments);
        }
Esempio n. 2
0
        private IEnumerable <InternshipAssignment> GetInternshipAssignmentsTeacher()
        {
            List <InternshipAssignment> assignments = new List <InternshipAssignment>();

            if (this.hasAssignments)
            {
                int id           = 1;
                var environments = new List <Environment>();

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

                environments.Add(environment);

                assignments.Add(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(assignments);
        }
Esempio n. 3
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));
        }
Esempio n. 4
0
        private void SetupMockForGetEnviromentsByAssignmentId()
        {
            var environmentList = new List <Environment>();
            var environment     = new Environment
            {
                Id = 1,
                EnvironmentName        = "C#",
                InternshipAssignmentId = 1
            };

            var environment2 = new Environment
            {
                Id = 2,
                EnvironmentName        = "java",
                InternshipAssignmentId = 1
            };

            environmentList.Add(environment);
            environmentList.Add(environment2);

            _environmentsDataMock.Setup(_environmentsDataMock => _environmentsDataMock.GetEnviromentsByAssignmentId(It.IsAny <int>()))
            .Returns(environmentList);
        }