Example #1
0
        public void MapBOToModelList()
        {
            var            mapper = new BOLCurrencyRateMapper();
            BOCurrencyRate bo     = new BOCurrencyRate();

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

            response.Count.Should().Be(1);
        }
Example #2
0
        public void MapModelToBO()
        {
            var mapper = new BOLCurrencyRateMapper();
            ApiCurrencyRateRequestModel model = new ApiCurrencyRateRequestModel();

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

            response.AverageRate.Should().Be(1m);
            response.CurrencyRateDate.Should().Be(DateTime.Parse("1/1/1987 12:00:00 AM"));
            response.EndOfDayRate.Should().Be(1m);
            response.FromCurrencyCode.Should().Be("A");
            response.ModifiedDate.Should().Be(DateTime.Parse("1/1/1987 12:00:00 AM"));
            response.ToCurrencyCode.Should().Be("A");
        }
Example #3
0
        public void MapBOToModel()
        {
            var            mapper = new BOLCurrencyRateMapper();
            BOCurrencyRate bo     = new BOCurrencyRate();

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

            response.AverageRate.Should().Be(1m);
            response.CurrencyRateDate.Should().Be(DateTime.Parse("1/1/1987 12:00:00 AM"));
            response.CurrencyRateID.Should().Be(1);
            response.EndOfDayRate.Should().Be(1m);
            response.FromCurrencyCode.Should().Be("A");
            response.ModifiedDate.Should().Be(DateTime.Parse("1/1/1987 12:00:00 AM"));
            response.ToCurrencyCode.Should().Be("A");
        }