示例#1
0
        public void ReportByItemTypeNoneFound()
        {
            clsItemCollection FilteredItems = new clsItemCollection();

            FilteredItems.ReportByItemType("xxxxxxx");
            Assert.AreEqual(0, FilteredItems.Count);
        }
示例#2
0
        public void ReportByItemTypeMethodOK()
        {
            clsItemCollection AllItems      = new clsItemCollection();
            clsItemCollection FilteredItems = new clsItemCollection();

            FilteredItems.ReportByItemType("");
            Assert.AreEqual(AllItems.Count, FilteredItems.Count);
        }
示例#3
0
    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();
    }
示例#4
0
        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);
        }