public DeleteDraftApprenticeshipTestsFixture WithMapperThrowingCohortEmployerUpdateDeniedException() { ModelMapperMock .Setup(x => x.Map <DeleteDraftApprenticeshipViewModel>(DeleteDraftApprenticeshipRequest)) .ThrowsAsync(new CohortEmployerUpdateDeniedException($"Cohort {DeleteDraftApprenticeshipRequest.CohortId} is not With the Employer")); return(this); }
public DeleteDraftApprenticeshipTestsFixture WithMapperThrowingDraftApprenticeshipNotFoundException() { ModelMapperMock .Setup(x => x.Map <DeleteDraftApprenticeshipViewModel>(DeleteDraftApprenticeshipRequest)) .ThrowsAsync(new DraftApprenticeshipNotFoundException()); return(this); }
public DetailsTestFixture WithCohortWithEmployer() { ModelMapperMock.Setup(x => x.Map <IDraftApprenticeshipViewModel>(It.IsAny <DetailsRequest>())) .ReturnsAsync(new EditDraftApprenticeshipViewModel()); return(this); }