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

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

            response.Should().NotBeNull();
            response.CustomerId.Should().Be(1);
            response.Date.Should().Be(DateTime.Parse("1/1/1987 12:00:00 AM"));
        }
Example #2
0
        public void MapClientResponseToRequest()
        {
            var mapper = new ApiSaleModelMapper();
            var model  = new ApiSaleClientResponseModel();

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

            response.Should().NotBeNull();
            response.IpAddress.Should().Be("A");
            response.Notes.Should().Be("A");
            response.SaleDate.Should().Be(DateTime.Parse("1/1/1987 12:00:00 AM"));
            response.TransactionId.Should().Be(1);
        }
Example #3
0
        public void MapClientResponseToRequest()
        {
            var mapper = new ApiSaleModelMapper();
            var model  = new ApiSaleClientResponseModel();

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

            response.Should().NotBeNull();
            response.Amount.Should().Be(1m);
            response.CutomerId.Should().Be(1);
            response.Note.Should().Be("A");
            response.PetId.Should().Be(1);
            response.SaleDate.Should().Be(DateTime.Parse("1/1/1987 12:00:00 AM"));
            response.SalesPersonId.Should().Be(1);
        }
        public void MapClientResponseToRequest()
        {
            var mapper = new ApiSaleModelMapper();
            var model  = new ApiSaleClientResponseModel();

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

            response.Should().NotBeNull();
            response.Amount.Should().Be(1m);
            response.FirstName.Should().Be("A");
            response.LastName.Should().Be("A");
            response.PaymentTypeId.Should().Be(1);
            response.PetId.Should().Be(1);
            response.Phone.Should().Be("A");
        }