Exemplo n.º 1
0
        public void Create_Order_simple()
        {
            using (var db = new Entities())
            {
                var sut = _createSut();
                var address = new CreateOrderRequest.Address {
                    Address1 = "Address1",
                    Address2 = "Address2",
                    City = "City",
                    CountryId = "at",
                    Email = "*****@*****.**",
                    Firstname = "Firstname",
                    Lastname = "Lastname",
                    Salutation = "Salut",
                    Zip = "1234"
                };
                var request = new CreateOrderRequest
                {
                    DeliveryAddress = address,
                };

                AssertChangedBy(db.Orders, () =>
                {
                    var order = sut.CreateOrder(3, request);
                    Assert.IsNotNull(order);
                });
            }
        }
Exemplo n.º 2
0
 /// <summary>
 /// CTR
 /// </summary>
 public CheckoutIndex()
 {
     LineItems = new LineItem[] { };
     Countries = new Country[] { };
     DeliveryAddress = new CreateOrderRequest.Address();
     var url = new UrlHelper(HttpContext.Current.Request.RequestContext);
     CheckoutShippingCostsUrl = url.Action(MVC.Store.Checkout.VariableCosts());
 }