public void Execute_Returns_Edited_JobSearch()
        {
            // Setup
            InitializeTestEntities();

            // Act
            JobSearch result = new EditJobSearchCommand(_unitOfWork).WithJobSearchId(_jobSearch.Id)
                                                                    .SetName("New Name")
                                                                    .SetDescription("New Description")
                                                                    .CalledByUserId(_user.Id)
                                                                    .Execute();

            // Verify 
            Assert.IsNotNull(result, "Returned job search was null");
            Assert.AreEqual("New Name", result.Name, "The JobSearch had an incorrect name");
            Assert.AreEqual("New Description", result.Description, "The JobSearch had an incorrect description");
        }
 public JobSearchController(JobSearchesByUserIdQuery jobSearchesByIdQuery,
                             JobSearchByIdQuery jobSearchByIdQuery,
                             CreateJobSearchForUserCommand createJobSearchCommand,
                             EditJobSearchCommand editJobSearchCommand,
                             OpenTasksByJobSearchQuery openTasksByJobSearchQuery,
                             EditUserCommand editUserCommand,
                             EntitySearchQuery entitySearchQuery,
                             UserByIdQuery userByIdQuery,
                             StartNextJobSearchMilestoneCommand startNextMilestoneCmd,
                             IProcess<ByJobSearchParams, JobsearchExportViewModel> exportProcess,
                             IServiceFactory serviceFactory)
 {
     _jobSearchByIdQuery = jobSearchByIdQuery;
     _jobSearchesByUserIdQuery = jobSearchesByIdQuery;
     _createJobSearchCommand = createJobSearchCommand;
     _editJobSearchCommand = editJobSearchCommand;
     _openTasksByJobSearchQuery = openTasksByJobSearchQuery;
     _editUserCommand = editUserCommand;
     _entitySearchQuery = entitySearchQuery;
     _serviceFactory = serviceFactory;
     _userByIdQuery = userByIdQuery;
     _startNextMilestoneCmd = startNextMilestoneCmd;
     _exportProcess = exportProcess;
 }