public void Test_DeleteTruckDriverConfirmed_Return_TruckDriver_And_ViewName_Correct_When_TruckDriverRepo_Return_false()
        {
            // Arrange
            var job = MockJob();
            var jobAssignmentRepository = new Mock <IJobAssignmentRepository>();

            jobAssignmentRepository.Setup(e => e.DeleteJobAssignment(job.JobAssignmentId)).Returns(false);

            var truckDriverRepository = new Mock <ITruckDriverRepository>();

            var controller = new JobAssignmentController(jobAssignmentRepository.Object, truckDriverRepository.Object);

            // Act
            var result           = controller.DeleteJobAssignmentConfirmed(5) as ViewResult;
            var redirectViewName = result.ViewName;

            // Assert
            Assert.AreEqual(redirectViewName, "DeleteJobAssignment");
        }
        public void Test_DeleteJobAssignmentConfirmed_Return_ListAllJobAssignmentsViewName_When_JobRepo_Return_true()
        {
            // Arrange
            var job = MockJob();
            var jobAssignmentRepository = new Mock <IJobAssignmentRepository>();

            jobAssignmentRepository.Setup(e => e.DeleteJobAssignment(job.JobAssignmentId)).Returns(true);

            var truckDriverRepository = new Mock <ITruckDriverRepository>();

            var controller = new JobAssignmentController(jobAssignmentRepository.Object, truckDriverRepository.Object);

            // Act
            var result           = controller.DeleteJobAssignmentConfirmed(job.JobAssignmentId) as RedirectToRouteResult;
            var redirectViewName = result.RouteValues["Action"];

            // Assert
            Assert.AreEqual(redirectViewName, "ListAllJobAssignments");
        }