Example #1
0
        public virtual ApiBreedServerRequestModel MapServerResponseToRequest(
            ApiBreedServerResponseModel response)
        {
            var request = new ApiBreedServerRequestModel();

            request.SetProperties(
                response.Name,
                response.SpeciesId);
            return(request);
        }
Example #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);
        }