Пример #1
0
        public virtual ApiSpeciesResponseModel MapBOToModel(
            BOSpecies boSpecies)
        {
            var model = new ApiSpeciesResponseModel();

            model.SetProperties(boSpecies.Id, boSpecies.Name);

            return(model);
        }
Пример #2
0
        public void MapResponseToRequest()
        {
            var mapper = new ApiSpeciesModelMapper();
            var model  = new ApiSpeciesResponseModel();

            model.SetProperties(1, "A");
            ApiSpeciesRequestModel response = mapper.MapResponseToRequest(model);

            response.Name.Should().Be("A");
        }