Example #1
0
        public void MapModelToEntity()
        {
            var mapper = new DALSpaceMapper();
            ApiSpaceServerRequestModel model = new ApiSpaceServerRequestModel();

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

            response.Description.Should().Be("A");
            response.Name.Should().Be("A");
        }
Example #2
0
        public void MapEntityToModel()
        {
            var   mapper = new DALSpaceMapper();
            Space item   = new Space();

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

            response.Description.Should().Be("A");
            response.Id.Should().Be(1);
            response.Name.Should().Be("A");
        }
Example #3
0
        public void MapEntityToModelList()
        {
            var   mapper = new DALSpaceMapper();
            Space item   = new Space();

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

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