Beispiel #1
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);
        }
Beispiel #2
0
        public void MapBOToModel()
        {
            var mapper          = new BOLLessonXTeacherMapper();
            BOLessonXTeacher bo = new BOLessonXTeacher();

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

            response.Id.Should().Be(1);
            response.LessonId.Should().Be(1);
            response.StudentId.Should().Be(1);
        }
Beispiel #3
0
        public void MapEFToBO()
        {
            var            mapper = new DALLessonXTeacherMapper();
            LessonXTeacher entity = new LessonXTeacher();

            entity.SetProperties(1, 1, 1);

            BOLessonXTeacher response = mapper.MapEFToBO(entity);

            response.Id.Should().Be(1);
            response.LessonId.Should().Be(1);
            response.StudentId.Should().Be(1);
        }
Beispiel #4
0
        public void MapBOToEF()
        {
            var mapper = new DALLessonXTeacherMapper();
            var bo     = new BOLessonXTeacher();

            bo.SetProperties(1, 1, 1);

            LessonXTeacher response = mapper.MapBOToEF(bo);

            response.Id.Should().Be(1);
            response.LessonId.Should().Be(1);
            response.StudentId.Should().Be(1);
        }
Beispiel #5
0
        public void MapBOToModelList()
        {
            var mapper          = new BOLLessonXTeacherMapper();
            BOLessonXTeacher bo = new BOLessonXTeacher();

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

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