Esempio n. 1
0
        public void MapModelToBO()
        {
            var mapper = new BOLCountryMapper();
            ApiCountryRequestModel model = new ApiCountryRequestModel();

            model.SetProperties("A");
            BOCountry response = mapper.MapModelToBO(1, model);

            response.Name.Should().Be("A");
        }
Esempio n. 2
0
        public void MapBOToModel()
        {
            var       mapper = new BOLCountryMapper();
            BOCountry bo     = new BOCountry();

            bo.SetProperties(1, "A");
            ApiCountryResponseModel response = mapper.MapBOToModel(bo);

            response.Id.Should().Be(1);
            response.Name.Should().Be("A");
        }
Esempio n. 3
0
        public void MapBOToModelList()
        {
            var       mapper = new BOLCountryMapper();
            BOCountry bo     = new BOCountry();

            bo.SetProperties(1, "A");
            List <ApiCountryResponseModel> response = mapper.MapBOToModel(new List <BOCountry>()
            {
                { bo }
            });

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