Exemplo n.º 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);
        }
Exemplo n.º 2
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");
        }