Exemplo n.º 1
0
        public void MapModelToBO()
        {
            var mapper = new BOLSaleMapper();
            ApiSaleRequestModel model = new ApiSaleRequestModel();

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

            response.IpAddress.Should().Be("A");
            response.Note.Should().Be("A");
            response.SaleDate.Should().Be(DateTime.Parse("1/1/1987 12:00:00 AM"));
            response.TransactionId.Should().Be(1);
        }
Exemplo n.º 2
0
        public void MapModelToBO()
        {
            var mapper = new BOLSaleMapper();
            ApiSaleRequestModel model = new ApiSaleRequestModel();

            model.SetProperties(1m, "A", "A", 1, 1, "A");
            BOSale response = mapper.MapModelToBO(1, model);

            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");
        }
Exemplo n.º 3
0
        public void MapModelToBO()
        {
            var mapper = new BOLSaleMapper();
            ApiSaleRequestModel model = new ApiSaleRequestModel();

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

            response.Amount.Should().Be(1m);
            response.ClientId.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);
        }