Esempio n. 1
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");
        }
Esempio n. 2
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);
        }