Beispiel #1
0
        public void MapEntityToModel()
        {
            var mapper             = new DALSpaceSpaceFeatureMapper();
            SpaceSpaceFeature item = new SpaceSpaceFeature();

            item.SetProperties(1, 1, 1);
            ApiSpaceSpaceFeatureServerResponseModel response = mapper.MapEntityToModel(item);

            response.Id.Should().Be(1);
            response.SpaceFeatureId.Should().Be(1);
            response.SpaceId.Should().Be(1);
        }
Beispiel #2
0
        public virtual SpaceSpaceFeature MapModelToEntity(
            int id,
            ApiSpaceSpaceFeatureServerRequestModel model
            )
        {
            SpaceSpaceFeature item = new SpaceSpaceFeature();

            item.SetProperties(
                id,
                model.SpaceFeatureId,
                model.SpaceId);
            return(item);
        }
Beispiel #3
0
        public void MapEntityToModelList()
        {
            var mapper             = new DALSpaceSpaceFeatureMapper();
            SpaceSpaceFeature item = new SpaceSpaceFeature();

            item.SetProperties(1, 1, 1);
            List <ApiSpaceSpaceFeatureServerResponseModel> response = mapper.MapEntityToModel(new List <SpaceSpaceFeature>()
            {
                { item }
            });

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