public void GivenExistingJobApplication_WhenRejectJobApplication_ThenJobApplicationIsRemoved() { //Given var janneke = new CandidateBuilder() .WithId(Guid.NewGuid()) .WithFirstName("Janneke") .WithLastName("Janssens") .WithEmail("*****@*****.**") .WithPhoneNumber("0470000000") .WithGitHubUsername("janneke") .WithLinkedIn("janneke") .Build(); var testCampaign = new CampaignBuilder() .WithId(Guid.NewGuid()) .WithName("testName") .WithClient("testClient") .WithStatus(CampaignStatus.Active) .WithStartDate(DateTime.Today.AddDays(5)) .WithClassStartDate(DateTime.Today.AddDays(5)) .WithComment("testComment") .Build(); var newJobApplication = new JobApplicationBuilder() .WithId(Guid.NewGuid()) .WithCandidateId(janneke.Id) .WithCampaignId(testCampaign.Id) .WithStatus(StatusJobApplication.Active) .Build(); _jobApplicationRepository.Get(newJobApplication.Id).Returns(newJobApplication); //When var updatedJobapplication = _jobApplicationService.RejectJobApplication(newJobApplication.Id.ToString()); //Then Assert.Equal(StatusJobApplication.Rejected, updatedJobapplication.Status); }