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

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

            response.ModifiedDate.Should().Be(DateTime.Parse("1/1/1987 12:00:00 AM"));
            response.Name.Should().Be("A");
        }
Esempio n. 2
0
        public void MapBOToModel()
        {
            var        mapper = new BOLCurrencyMapper();
            BOCurrency bo     = new BOCurrency();

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

            response.CurrencyCode.Should().Be("A");
            response.ModifiedDate.Should().Be(DateTime.Parse("1/1/1987 12:00:00 AM"));
            response.Name.Should().Be("A");
        }
Esempio n. 3
0
        public void MapBOToModelList()
        {
            var        mapper = new BOLCurrencyMapper();
            BOCurrency bo     = new BOCurrency();

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

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