public void OnLoadPage_LoadsOrder()
 {
     _viewMock.OrderIdQs = _testOrder.Id.ToString();
     _presenter.OnLoadPage();
     Assert.AreEqual(_testOrder.Id, _viewMock.OrderId);
     Assert.AreEqual(_testOrder.CustomerName, _viewMock.CustomerName);
     Assert.AreEqual(_testOrder.CustomerPostAddress, _viewMock.CustomerPostAddress);
     Assert.AreEqual(1, _viewMock.Products.Count);
     Assert.AreEqual(2, _viewMock.AllProducts.Count);
 }
Beispiel #2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            OrderIdQs                = Request.QueryString["orderId"];
            ProductIdQs              = Request.QueryString["productId"];
            ProductPanel.Visible     = ProductIdQs != null || OrderIdQs == null;
            btnAddNewProduct.Visible = !ProductPanel.Visible;
            if (Page.IsPostBack)
            {
                return;
            }

            _presenter.OnLoadPage();
            dropdownProduct.DataSource = AllProducts;
            dropdownProduct.DataBind();

            gridProduts.DataSource = Products;
            gridProduts.DataBind();
        }