public void ReportByItemTypeNoneFound() { clsItemCollection FilteredItems = new clsItemCollection(); FilteredItems.ReportByItemType("xxxxxxx"); Assert.AreEqual(0, FilteredItems.Count); }
public void ReportByItemTypeMethodOK() { clsItemCollection AllItems = new clsItemCollection(); clsItemCollection FilteredItems = new clsItemCollection(); FilteredItems.ReportByItemType(""); Assert.AreEqual(AllItems.Count, FilteredItems.Count); }
protected void btnApply_Click(object sender, EventArgs e) { clsItemCollection Items = new clsItemCollection(); Items.ReportByItemType(txtFilter.Text); lstStockList.DataSource = Items.ItemList; lstStockList.DataValueField = "ItemID"; lstStockList.DataTextField = "ItemName"; lstStockList.DataBind(); }
public void ReportByItemTypeDataFound() { clsItemCollection FilteredItems = new clsItemCollection(); Boolean OK = true; FilteredItems.ReportByItemType("Mouse"); if (FilteredItems.Count == 2) { if (FilteredItems.ItemList[0].ItemID != 1) { OK = false; } if (FilteredItems.ItemList[1].ItemID != 11) { OK = false; } } else { OK = false; } Assert.IsTrue(OK); }