コード例 #1
0
        public void MapEFToBO()
        {
            var      mapper = new DALCurrencyMapper();
            Currency entity = new Currency();

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

            BOCurrency response = mapper.MapEFToBO(entity);

            response.CurrencyCode.Should().Be("A");
            response.ModifiedDate.Should().Be(DateTime.Parse("1/1/1987 12:00:00 AM"));
            response.Name.Should().Be("A");
        }
コード例 #2
0
        public void MapBOToEF()
        {
            var mapper = new DALCurrencyMapper();
            var bo     = new BOCurrency();

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

            Currency response = mapper.MapBOToEF(bo);

            response.CurrencyCode.Should().Be("A");
            response.ModifiedDate.Should().Be(DateTime.Parse("1/1/1987 12:00:00 AM"));
            response.Name.Should().Be("A");
        }
コード例 #3
0
        public void MapEFToBOList()
        {
            var      mapper = new DALCurrencyMapper();
            Currency entity = new Currency();

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

            List <BOCurrency> response = mapper.MapEFToBO(new List <Currency>()
            {
                entity
            });

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