public void ShouldAuthoriseProviderUserOnGetVacancyByGuid() { _mockApprenticeshipVacancyReadRepository.Setup(mock => mock .GetByVacancyGuid(_testVacancy.VacancyGuid)) .Returns(_testVacancy); // Act. Action action = () => _getVacancyStrategies.GetVacancyByGuid(_testVacancy.VacancyGuid); // Assert. action.ShouldThrow <UnauthorizedAccessException>(); }
public Vacancy GetVacancy(Guid vacancyGuid) { return(_getVacancyStrategies.GetVacancyByGuid(vacancyGuid)); }