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

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

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

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

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

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

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