public void FilterByDetailsOK() { clsOrderCollection orders = new clsOrderCollection(); clsOrderCollection filteredOrders = new clsOrderCollection(); filteredOrders.ReportByDetails("xxx"); Assert.AreEqual(2, filteredOrders.orderList.Count); }
protected void ClearBtn_Click(object sender, EventArgs e) { clsOrderCollection orders = new clsOrderCollection(); orders.ReportByDetails(""); lstOrderList.DataSource = orders.orderList; lstOrderList.DataValueField = "OrderId"; lstOrderList.DataTextField = "OrderId"; lstOrderList.DataBind(); }
public void ReportByDetailsTestDataFound() { clsOrderCollection filteredOrders = new clsOrderCollection(); Boolean OK = true; filteredOrders.ReportByDetails("xxx"); if (filteredOrders.orderList.Count == 2) { if (filteredOrders.orderList[0].OrderId == 13 && filteredOrders.orderList[1].OrderId == 14) { OK = true; } } else { OK = false; } Assert.IsTrue(OK); }