public async Task ShouldBeABleToUpdateQuestion() { var questionDto = Mapper.Map <QuestionDto>(await Arranger.CreateQuestion()); var questionPatchRequest = Stubber.StubQuestionPatchRequest(); questionPatchRequest.ApplyTo(questionDto); await ApiClient.PatchQuestion(questionDto.Id, questionPatchRequest); var updatedQuestionDto = Mapper.Map <QuestionDto>(await Arranger.GetQuestion(questionDto.Id)); SemanticComparisonExtensions.ToLikeness <QuestionDto>(questionDto, true).ShouldEqual(updatedQuestionDto); }
public async Task ShouldBeAbleToUpdateCandidate() { var candidateDto = Mapper.Map <CandidateDto>(await Arranger.CreateCandidate()); var patchRequest = Stubber.StubCandidatePatchRequest(); patchRequest.ApplyTo(candidateDto); (await ApiClient.PatchCandidate(candidateDto.Id, patchRequest)) .EnsureSuccessStatusCode(); var updatedCandidateDto = Mapper.Map <CandidateDto>(await Arranger.GetCandidate(candidateDto.Id)); SemanticComparisonExtensions.ToLikeness <CandidateDto>(candidateDto, true) .ShouldEqual(updatedCandidateDto); }
public async Task ShouldBeAbleToPatchAnInterviewTemplate() { var interviewTemplateDto = Mapper.Map <InterviewTemplateDto>(await Arranger.CreateInterviewTemplate()); var patchRequest = Stubber.StubInterviewTemplatePatchRequest(); patchRequest.ApplyTo(interviewTemplateDto); (await ApiClient.PatchInterviewTemplate(interviewTemplateDto.Id, patchRequest)) .EnsureSuccessStatusCode(); var updatedInterviewTemplateDto = Mapper.Map <InterviewTemplateDto>( await Arranger.GetInterviewTemplate(interviewTemplateDto.Id)); SemanticComparisonExtensions.ToLikeness <InterviewTemplateDto>(interviewTemplateDto) .Without(o => o.QuestionIds) .ShouldEqual(updatedInterviewTemplateDto); }