示例#1
0
        public void MapModelToBO()
        {
            var mapper = new BOLCountryRegionCurrencyMapper();
            ApiCountryRegionCurrencyRequestModel model = new ApiCountryRegionCurrencyRequestModel();

            model.SetProperties("A", DateTime.Parse("1/1/1987 12:00:00 AM"));
            BOCountryRegionCurrency response = mapper.MapModelToBO("A", model);

            response.CurrencyCode.Should().Be("A");
            response.ModifiedDate.Should().Be(DateTime.Parse("1/1/1987 12:00:00 AM"));
        }
示例#2
0
        public void MapBOToModel()
        {
            var mapper = new BOLCountryRegionCurrencyMapper();
            BOCountryRegionCurrency bo = new BOCountryRegionCurrency();

            bo.SetProperties("A", "A", DateTime.Parse("1/1/1987 12:00:00 AM"));
            ApiCountryRegionCurrencyResponseModel response = mapper.MapBOToModel(bo);

            response.CountryRegionCode.Should().Be("A");
            response.CurrencyCode.Should().Be("A");
            response.ModifiedDate.Should().Be(DateTime.Parse("1/1/1987 12:00:00 AM"));
        }
        public void MapEFToBO()
        {
            var mapper = new DALCountryRegionCurrencyMapper();
            CountryRegionCurrency entity = new CountryRegionCurrency();

            entity.SetProperties("A", "A", DateTime.Parse("1/1/1987 12:00:00 AM"));

            BOCountryRegionCurrency response = mapper.MapEFToBO(entity);

            response.CountryRegionCode.Should().Be("A");
            response.CurrencyCode.Should().Be("A");
            response.ModifiedDate.Should().Be(DateTime.Parse("1/1/1987 12:00:00 AM"));
        }
示例#4
0
        public void MapBOToModelList()
        {
            var mapper = new BOLCountryRegionCurrencyMapper();
            BOCountryRegionCurrency bo = new BOCountryRegionCurrency();

            bo.SetProperties("A", "A", DateTime.Parse("1/1/1987 12:00:00 AM"));
            List <ApiCountryRegionCurrencyResponseModel> response = mapper.MapBOToModel(new List <BOCountryRegionCurrency>()
            {
                { bo }
            });

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