Example #1
0
        public void MapClientResponseToRequest()
        {
            var mapper = new ApiTransactionModelMapper();
            var model  = new ApiTransactionClientResponseModel();

            model.SetProperties(1, 1m, "A", 1);
            ApiTransactionClientRequestModel response = mapper.MapClientResponseToRequest(model);

            response.Should().NotBeNull();
            response.Amount.Should().Be(1m);
            response.GatewayConfirmationNumber.Should().Be("A");
            response.TransactionStatusId.Should().Be(1);
        }
        public void MapClientResponseToRequest()
        {
            var mapper = new ApiTransactionModelMapper();
            var model  = new ApiTransactionClientResponseModel();

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

            response.Should().NotBeNull();
            response.Amount.Should().Be(1m);
            response.ArtistId.Should().Be(1);
            response.DateCreated.Should().Be(DateTime.Parse("1/1/1987 12:00:00 AM"));
            response.StripeTransactionId.Should().Be("A");
        }