Ejemplo n.º 1
0
        public void MapModelToEntity()
        {
            var mapper = new DALPostTypeMapper();
            ApiPostTypeServerRequestModel model = new ApiPostTypeServerRequestModel();

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

            response.RwType.Should().Be("A");
        }
Ejemplo n.º 2
0
        public void MapEntityToModel()
        {
            var      mapper = new DALPostTypeMapper();
            PostType item   = new PostType();

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

            response.Id.Should().Be(1);
            response.RwType.Should().Be("A");
        }
Ejemplo n.º 3
0
        public void MapEntityToModelList()
        {
            var      mapper = new DALPostTypeMapper();
            PostType item   = new PostType();

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

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