コード例 #1
0
        public void MapEntityToModelList()
        {
            var  mapper = new DALRateMapper();
            Rate item   = new Rate();

            item.SetProperties(1, 1m, 1, 1);
            List <ApiRateServerResponseModel> response = mapper.MapEntityToModel(new List <Rate>()
            {
                { item }
            });

            response.Count.Should().Be(1);
        }
コード例 #2
0
        public void MapEntityToModel()
        {
            var  mapper = new DALRateMapper();
            Rate item   = new Rate();

            item.SetProperties(1, 1m, 1, 1);
            ApiRateServerResponseModel response = mapper.MapEntityToModel(item);

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