public void ShouldUpdateOrderItemSkuOnProductSelected() { view.OrderItemsLines = new List <OrderItemLine>(); productService.AddProduct(new Product(1, "1234-56789", "#2 Pencil Pack", 1.99m, null)); OrderItemLine line1 = new OrderItemLine(1, "1234-56789", "#2 Pencil Pack", 1.99m, 10, 19.9m, false); OrderItemLine line2 = new OrderItemLine(2, "9876-54321", "Stencil Pad", .79m, 10, 7.9m, false); view.OrderItemsLines.Add(line1); view.OrderItemsLines.Add(line2); view.EditingOrderItemLine = line1; presenter.OnProductSelected("1234-56789"); Assert.IsTrue(view.SetEditingProductCalled); Assert.AreEqual("1234-56789", view.ShownSku); Assert.AreEqual("#2 Pencil Pack", view.ShownName); Assert.AreEqual(1.99m, view.ShownPrice); }
protected void SelectButton_Click(object sender, EventArgs e) { _presenter.OnProductSelected(searchProductView.SelectedProductSku); searchProductView.ClearView(); }