public async Task ShouldBeAbleToCreateAnEmptyInterview() { var requestInterview = Stubber.StubInterviewDto(); var responseInterview = await ApiClient.PostInterview(requestInterview) .AwaitGetSuccessfulResponse <InterviewDto>(); Assert.IsNotNull(responseInterview.Id); }
public async Task ShouldBeAbleToCreateInterviewFromTemplate() { var dbInterviewTemplate = await Arranger.CreateInterviewTemplate(); var requestInterview = Stubber.StubInterviewDto(); var responseInterview = await ApiClient.PostInterview(requestInterview, dbInterviewTemplate.Id) .AwaitGetSuccessfulResponse <InterviewDto>(); var dbInterviewTemplateDto = Mapper.Map <IEnumerable <QuestionDto> >(dbInterviewTemplate.Questions); Assert.IsTrue(responseInterview.Questions.CompareCollectionsUsingLikeness(dbInterviewTemplateDto)); }
public async Task ShouldBeAbleToCreateInterviewWithCandidate() { var requestInterviewDto = Stubber.StubInterviewDto(); var dbCandidate = await Arranger.CreateCandidate(); requestInterviewDto.Candidate = Mapper.Map <CandidateDto>(dbCandidate); var responseInterviewDto = await ApiClient.PostInterview(requestInterviewDto, candidateId : dbCandidate.Id) .AwaitGetSuccessfulResponse <InterviewDto>(); responseInterviewDto .ToLikeness() .WithInnerLikeness(o => o.Candidate, o => o.Candidate) .ShouldEqual(requestInterviewDto); }