public void ReoprtByPartDescription() { clsStockCollection allStock = new clsStockCollection(); clsStockCollection FilteredStock = new clsStockCollection(); FilteredStock.ReoprtByPartDescription(""); Assert.AreEqual(allStock.Count, FilteredStock.Count); }
protected void btnApply_Click(object sender, EventArgs e) { clsStockCollection stock = new clsStockCollection(); stock.ReoprtByPartDescription(txtFilter.Text); lstStockList.DataSource = stock.StockList; lstStockList.DataValueField = "PartNo"; lstStockList.DataTextField = "PartDescription"; lstStockList.DataBind(); }
public void ReoprtByPartDescriptionTestDataFound() { clsStockCollection FilteredStock = new clsStockCollection(); Boolean OK = true; FilteredStock.ReoprtByPartDescription("xxxxxxxxxxxxxxx"); if (FilteredStock.Count == 2) { if (FilteredStock.StockList[0].PartNo != 36) { OK = false; } if (FilteredStock.StockList[1].PartNo != 37) { OK = false; } else { OK = false; } Assert.IsTrue(OK); } }