public void CreateRecreuitmentRequestTest() { // Arrange var contractType = Contractype.FullTime; var requestingDepartment = RequestingDepartment.Financial; var yearsOfExp = "10"; var jobTitle = "Financial Manager"; var jobDescrimination = ""; // Act var requirementRequest = recruitmentRequestController.Create(contractType, requestingDepartment, yearsOfExp, jobTitle, jobDescrimination, new User("test", "test", User.Roles.AdministrationDepartmentManager)); // Assert Assert.IsNotNull(requirementRequest); Assert.AreEqual(contractType, requirementRequest.Contractype); Assert.AreEqual(requestingDepartment, requirementRequest.RequestingDepartment); Assert.AreEqual(yearsOfExp, requirementRequest.YearsOfExperience.ToString()); Assert.AreEqual(jobTitle, requirementRequest.JobTitle); Assert.AreEqual(jobDescrimination, requirementRequest.JobDescription); }
private void CreateRecruitmentButton_Click(object sender, EventArgs e) { var recruitmentRequestController = new RecruitmentRequestController(); var contractType = fulltimeRadioButton.Checked ? Contractype.FullTime : Contractype.PartTime; var requestingDepartment = administrationRadioButton.Checked ? RequestingDepartment.Administration : serviceRadioButton.Checked ? RequestingDepartment.Service : productionRadioButton.Checked ? RequestingDepartment.Production : RequestingDepartment.Financial; var yearsOfExperience = yearsOfExpText.Text; var jobTitle = jobTitleText.Text; var jobDescription = jobDescText.Text; recruitmentRequestController.Create(contractType, requestingDepartment, yearsOfExperience, jobTitle, jobDescription, Session.UserSession.LoggedInUser); this.Close(); mainForm.SetRecruitmentRequests(); mainForm.Show(); }