public CreateCohortWithOtherPartyControllerTestFixture SetGetCohortResponse(
                GetCohortResponse getCohortResponse)
            {
                CommitmentsApiClientMock.Setup(c => c.GetCohort(It.IsAny <long>(), It.IsAny <CancellationToken>()))
                .ReturnsAsync(getCohortResponse);

                return(this);
            }
        public DetailsTestFixture WithCohort(GetCohortResponse cohortDetails = null)
        {
            var returnValue = cohortDetails ?? CohortDetails;

            CommitmentsApiClientMock
            .Setup(cs => cs.GetCohort(It.IsAny <long>(), It.IsAny <CancellationToken>()))
            .ReturnsAsync(returnValue);

            return(this);
        }
        public DetailsTestFixture WithDraftApprenticeship(GetDraftApprenticeshipResponse details = null)
        {
            var returnValue = details ?? EditDraftApprenticeshipDetails;

            CommitmentsApiClientMock
            .Setup(cs => cs.GetDraftApprenticeship(It.IsAny <long>(), It.IsAny <long>(), It.IsAny <CancellationToken>()))
            .ReturnsAsync(returnValue);

            return(this);
        }
            public CreateCohortWithOtherPartyControllerTestFixture WithCreateCohortApiError()
            {
                CommitmentsApiClientMock.Setup(
                    x => x.CreateCohort(It.IsAny <CreateCohortWithOtherPartyRequest>(),
                                        It.IsAny <CancellationToken>()))
                .ThrowsAsync(new CommitmentsApiModelException(new List <ErrorDetail> {
                    ErrorDetail
                }));

                return(this);
            }