public void FilterByItemDescriptionNoneFound() { clsOrderCollection AllOrders = new clsOrderCollection(); clsOrderCollection FilteredOrders = new clsOrderCollection(); FilteredOrders.FilterByItemDescription("xxxxxxx"); Assert.AreEqual(0, FilteredOrders.Count); }
public void FilterByItemDescriptionMethodOK() { clsOrderCollection AllOrders = new clsOrderCollection(); clsOrderCollection FilteredOrders = new clsOrderCollection(); FilteredOrders.FilterByItemDescription(""); Assert.AreEqual(AllOrders.Count, FilteredOrders.Count); }
protected void btnApply_Click(object sender, EventArgs e) { clsOrderCollection Orders = new clsOrderCollection(); Orders.FilterByItemDescription(txtFilter.Text); lstOrder.DataSource = Orders.OrderList; lstOrder.DataValueField = "OrderNo"; lstOrder.DataTextField = "ItemDescription"; lstOrder.DataBind(); }
public void FilterByItemDescriptionTestDataFound() { clsOrderCollection FilteredOrders = new clsOrderCollection(); Boolean OK = true; FilteredOrders.FilterByItemDescription("Racing"); if (FilteredOrders.Count == 1) { if (FilteredOrders.OrderList[0].OrderNo != 4) { OK = false; } } else { OK = false; } Assert.IsTrue(OK); }