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

            entity.SetProperties(1m, "A", 1, 1);

            BOTransaction response = mapper.MapEFToBO(entity);

            response.Amount.Should().Be(1m);
            response.GatewayConfirmationNumber.Should().Be("A");
            response.Id.Should().Be(1);
            response.TransactionStatusId.Should().Be(1);
        }
コード例 #2
0
        public void MapEFToBOList()
        {
            var         mapper = new DALTransactionMapper();
            Transaction entity = new Transaction();

            entity.SetProperties(1m, "A", 1, 1);

            List <BOTransaction> response = mapper.MapEFToBO(new List <Transaction>()
            {
                entity
            });

            response.Count.Should().Be(1);
        }
コード例 #3
0
        public void MapBOToEF()
        {
            var mapper = new DALTransactionMapper();
            var bo     = new BOTransaction();

            bo.SetProperties(1, 1m, "A", 1);

            Transaction response = mapper.MapBOToEF(bo);

            response.Amount.Should().Be(1m);
            response.GatewayConfirmationNumber.Should().Be("A");
            response.Id.Should().Be(1);
            response.TransactionStatusId.Should().Be(1);
        }