public async Task ShouldBeAbleToGetAQuestion() { var dbQuestion = await Arranger.CreateQuestion(); var responseQuestionDto = await ApiClient.GetQuestion(dbQuestion.Id) .AwaitGetSuccessfulResponse <QuestionDto>(); responseQuestionDto.ToLikeness(true).ShouldEqual(Mapper.Map <QuestionDto>(dbQuestion)); }
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)); questionDto.ToLikeness(true).ShouldEqual(updatedQuestionDto); }