protected void OrderItemContainerDataSource_Deleted(object sender, ObjectContainerDataSourceStatusEventArgs e) { UpdateRowIfInEditMode(); List <OrderItemLine> lines = new List <OrderItemLine>(); lines.Add((OrderItemLine)e.Instance); _presenter.OnDeleteOrderItemLines(lines); SetLastRowToEditMode(); }
public void ShouldDeleteAndShowRemainingOrderItemLinesOnDelete() { List <OrderItemLine> lines = new List <OrderItemLine>(); OrderItemLine orderItemLine = new OrderItemLine(); view.OrderItemsLines.Add(orderItemLine); lines.Add(orderItemLine); presenter.OnDeleteOrderItemLines(lines); Assert.IsTrue(view.OrderItemsLinesShown); Assert.AreEqual(0, view.OrderItemsLines.Count); }