示例#1
0
        public void MapModelToEntity()
        {
            var mapper = new DALOrganizationMapper();
            ApiOrganizationServerRequestModel model = new ApiOrganizationServerRequestModel();

            model.SetProperties("A");
            Organization response = mapper.MapModelToEntity(1, model);

            response.Name.Should().Be("A");
        }
示例#2
0
        public void MapEntityToModel()
        {
            var          mapper = new DALOrganizationMapper();
            Organization item   = new Organization();

            item.SetProperties(1, "A");
            ApiOrganizationServerResponseModel response = mapper.MapEntityToModel(item);

            response.Id.Should().Be(1);
            response.Name.Should().Be("A");
        }
示例#3
0
        public void MapEntityToModelList()
        {
            var          mapper = new DALOrganizationMapper();
            Organization item   = new Organization();

            item.SetProperties(1, "A");
            List <ApiOrganizationServerResponseModel> response = mapper.MapEntityToModel(new List <Organization>()
            {
                { item }
            });

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