예제 #1
0
        public void MapModelToBO()
        {
            var mapper = new BOLRateMapper();
            ApiRateRequestModel model = new ApiRateRequestModel();

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

            response.AmountPerMinute.Should().Be(1m);
            response.TeacherId.Should().Be(1);
            response.TeacherSkillId.Should().Be(1);
        }
예제 #2
0
        public void MapBOToModelList()
        {
            var    mapper = new BOLRateMapper();
            BORate bo     = new BORate();

            bo.SetProperties(1, 1m, 1, 1);
            List <ApiRateResponseModel> response = mapper.MapBOToModel(new List <BORate>()
            {
                { bo }
            });

            response.Count.Should().Be(1);
        }
예제 #3
0
        public void MapBOToModel()
        {
            var    mapper = new BOLRateMapper();
            BORate bo     = new BORate();

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

            response.AmountPerMinute.Should().Be(1m);
            response.Id.Should().Be(1);
            response.TeacherId.Should().Be(1);
            response.TeacherSkillId.Should().Be(1);
        }
예제 #4
0
        public void MapEFToBO()
        {
            var  mapper = new DALRateMapper();
            Rate entity = new Rate();

            entity.SetProperties(1m, 1, 1, 1);

            BORate response = mapper.MapEFToBO(entity);

            response.AmountPerMinute.Should().Be(1m);
            response.Id.Should().Be(1);
            response.TeacherId.Should().Be(1);
            response.TeacherSkillId.Should().Be(1);
        }
예제 #5
0
        public void MapBOToEF()
        {
            var mapper = new DALRateMapper();
            var bo     = new BORate();

            bo.SetProperties(1, 1m, 1, 1);

            Rate response = mapper.MapBOToEF(bo);

            response.AmountPerMinute.Should().Be(1m);
            response.Id.Should().Be(1);
            response.TeacherId.Should().Be(1);
            response.TeacherSkillId.Should().Be(1);
        }