Beispiel #1
0
 public ActionResult DeleteJobApplication(string jobApplicationId)
 {
     try
     {
         var jobApplication = jobAppService.GetJobApplication(jobApplicationId);
         if (jobApplication == null)
         {
             return(new NotFoundObjectResult("Job application not found"));
         }
         if (!jobAppService.DeleteJobApplication(jobApplicationId))
         {
             return(new StatusCodeResult(StatusCodes.Status500InternalServerError));
         }
         else
         {
             return(new OkObjectResult("Deleted job application successfully"));
         }
     } catch
     {
         return(new StatusCodeResult(StatusCodes.Status500InternalServerError));
     }
 }
Beispiel #2
0
        public void GetJobApplication_Url()
        {
            //Arrange
            var jobApplication = new JobApplication
            {
                CompanyName   = "Jobtaine",
                JobTitle      = "Software Engineer",
                City          = "Westminster",
                State         = "CA",
                JobPostingURL = "jobtaine.com/jobapplication"
            };

            //Act
            var actual = jas.GetJobApplication("jobtaine.com/jobapplication");

            //Assert
            Assert.AreEqual(jobApplication, actual);
            Assert.IsNotNull(actual);
        }