Beispiel #1
0
        public void MapModelToEntity()
        {
            var mapper = new DALTransactionMapper();
            ApiTransactionServerRequestModel model = new ApiTransactionServerRequestModel();

            model.SetProperties(1m, "A", 1);
            Transaction response = mapper.MapModelToEntity(1, model);

            response.Amount.Should().Be(1m);
            response.GatewayConfirmationNumber.Should().Be("A");
            response.TransactionStatusId.Should().Be(1);
        }
Beispiel #2
0
        public void MapEntityToModelList()
        {
            var         mapper = new DALTransactionMapper();
            Transaction item   = new Transaction();

            item.SetProperties(1, 1m, "A", 1);
            List <ApiTransactionServerResponseModel> response = mapper.MapEntityToModel(new List <Transaction>()
            {
                { item }
            });

            response.Count.Should().Be(1);
        }
Beispiel #3
0
        public void MapEntityToModel()
        {
            var         mapper = new DALTransactionMapper();
            Transaction item   = new Transaction();

            item.SetProperties(1, 1m, "A", 1);
            ApiTransactionServerResponseModel response = mapper.MapEntityToModel(item);

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