public void FilterByGameTitleNoneFound()
        {
            clsStockCollection FilterGameTitle = new clsStockCollection();

            FilterGameTitle.FilterByGameTitle("Superman 64");

            Assert.AreEqual(0, FilterGameTitle.Count);
        }
Пример #2
0
    protected void btnApply_Click(Object sender, EventArgs e)
    {
        clsStockCollection StockCollection = new clsStockCollection();

        StockCollection.FilterByGameTitle(txtGameTitle.Text);

        lstStockCollection.DataSource = StockCollection.StockList;

        lstStockCollection.DataValueField = "productId";

        lstStockCollection.DataTextField = "GameTitle";

        lstStockCollection.DataBind();
    }
        public void FilterByGameTitleFound()
        {
            clsStockCollection FilterGameTitle = new clsStockCollection();

            Boolean Ok = true;

            FilterGameTitle.FilterByGameTitle("Crash Bandicoot");

            if (FilterGameTitle.Count == 1)
            {
                if (FilterGameTitle.StockList[0].productId != 61)
                {
                    Ok = false;
                }
            }
            else
            {
                Ok = false;
            }

            Assert.IsTrue(Ok);
        }