public virtual ApiBreedServerRequestModel MapServerResponseToRequest(
            ApiBreedServerResponseModel response)
        {
            var request = new ApiBreedServerRequestModel();

            request.SetProperties(
                response.Name,
                response.SpeciesId);
            return(request);
        }
Exemple #2
0
        public void MapModelToEntity()
        {
            var mapper = new DALBreedMapper();
            ApiBreedServerRequestModel model = new ApiBreedServerRequestModel();

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

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