/// <summary>
        /// Initializes a new instance of the <see cref="DeleteCartTest"/> class.
        /// </summary>
        public DeleteCartTest()
        {
            this.visitorId = Guid.NewGuid();
            this.cart      = new Cart {
                ExternalId = this.visitorId.ToString()
            };
            this.request = new DeleteCartRequest(this.cart);
            this.result  = new CartResult();
            this.args    = new ServicePipelineArgs(this.request, this.result);

            this.client = Substitute.For <ICartsServiceChannel>();

            var clientFactory = Substitute.For <ServiceClientFactory>();

            clientFactory.CreateClient <ICartsServiceChannel>(Arg.Any <string>(), Arg.Any <string>()).Returns(this.client);

            this.processor = new DeleteCart {
                ClientFactory = clientFactory
            };
        }
Beispiel #2
0
    protected void Page_Load(object sender, EventArgs e)
    {
        //  g_id = Convert.ToInt16(Request.QueryString["pid"]);
        //  Session.Add("g_id",g_id);
        total_price       = 0;
        price             = 0;
        isCartEmpty       = false;
        CartEmpty.Visible = false;

        if (Session["userid"] == null)
        {
            Response.Redirect("~/Login.aspx");
        }
        //  Session.Remove("Page");
        //Session.Remove("pageadder");
        Session.Remove("platform");

        CalculatePrice();
        cart = new DeleteCart();
        Session.Add("url", "Cart.aspx");
    }