private async Task <ApiLessonXTeacherResponseModel> CreateRecord()
        {
            var model = new ApiLessonXTeacherRequestModel();

            model.SetProperties(1, 1);
            CreateResponse <ApiLessonXTeacherResponseModel> result = await this.Client.LessonXTeacherCreateAsync(model);

            result.Success.Should().BeTrue();
            return(result.Record);
        }
Ejemplo n.º 2
0
        public void MapModelToBO()
        {
            var mapper = new BOLLessonXTeacherMapper();
            ApiLessonXTeacherRequestModel model = new ApiLessonXTeacherRequestModel();

            model.SetProperties(1, 1);
            BOLessonXTeacher response = mapper.MapModelToBO(1, model);

            response.LessonId.Should().Be(1);
            response.StudentId.Should().Be(1);
        }
        public void MapRequestToResponse()
        {
            var mapper = new ApiLessonXTeacherModelMapper();
            var model  = new ApiLessonXTeacherRequestModel();

            model.SetProperties(1, 1);
            ApiLessonXTeacherResponseModel response = mapper.MapRequestToResponse(1, model);

            response.Id.Should().Be(1);
            response.LessonId.Should().Be(1);
            response.StudentId.Should().Be(1);
        }
        public void CreatePatch()
        {
            var mapper = new ApiLessonXTeacherModelMapper();
            var model  = new ApiLessonXTeacherRequestModel();

            model.SetProperties(1, 1);

            JsonPatchDocument <ApiLessonXTeacherRequestModel> patch = mapper.CreatePatch(model);
            var response = new ApiLessonXTeacherRequestModel();

            patch.ApplyTo(response);
            response.LessonId.Should().Be(1);
            response.StudentId.Should().Be(1);
        }