public void MapModelToBO()
        {
            var mapper = new BOLLessonXStudentMapper();
            ApiLessonXStudentRequestModel model = new ApiLessonXStudentRequestModel();

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

            response.LessonId.Should().Be(1);
            response.StudentId.Should().Be(1);
        }
        public void MapBOToModel()
        {
            var mapper          = new BOLLessonXStudentMapper();
            BOLessonXStudent bo = new BOLessonXStudent();

            bo.SetProperties(1, 1, 1);
            ApiLessonXStudentResponseModel response = mapper.MapBOToModel(bo);

            response.Id.Should().Be(1);
            response.LessonId.Should().Be(1);
            response.StudentId.Should().Be(1);
        }
示例#3
0
        public void MapEFToBO()
        {
            var            mapper = new DALLessonXStudentMapper();
            LessonXStudent entity = new LessonXStudent();

            entity.SetProperties(1, 1, 1);

            BOLessonXStudent response = mapper.MapEFToBO(entity);

            response.Id.Should().Be(1);
            response.LessonId.Should().Be(1);
            response.StudentId.Should().Be(1);
        }
示例#4
0
        public void MapBOToEF()
        {
            var mapper = new DALLessonXStudentMapper();
            var bo     = new BOLessonXStudent();

            bo.SetProperties(1, 1, 1);

            LessonXStudent response = mapper.MapBOToEF(bo);

            response.Id.Should().Be(1);
            response.LessonId.Should().Be(1);
            response.StudentId.Should().Be(1);
        }
        public void MapBOToModelList()
        {
            var mapper          = new BOLLessonXStudentMapper();
            BOLessonXStudent bo = new BOLessonXStudent();

            bo.SetProperties(1, 1, 1);
            List <ApiLessonXStudentResponseModel> response = mapper.MapBOToModel(new List <BOLessonXStudent>()
            {
                { bo }
            });

            response.Count.Should().Be(1);
        }