public void FilterByPriceNoneFound()
        {
            clsStockCollection FilterPrice = new clsStockCollection();

            FilterPrice.FilterByPrice(1);

            Assert.AreEqual(0, FilterPrice.Count);
        }
        public void FilterByPriceOk()
        {
            clsStockCollection StockCollection = new clsStockCollection();

            clsStockCollection FilterPrice = new clsStockCollection();

            FilterPrice.FilterByPrice(100);

            Assert.AreEqual(StockCollection.Count, FilterPrice.Count);
        }
        public void FilterByPriceFound()
        {
            clsStockCollection FilterPrice = new clsStockCollection();

            Boolean Ok = true;

            FilterPrice.FilterByPrice(11);

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

            Assert.IsTrue(Ok);
        }
    protected void btnApplyPrice_Click(Object sender, EventArgs e)
    {
        try
        {
            Int32 FilteredPrice = Convert.ToInt32(txtPrice.Text);

            clsStockCollection StockCollection = new clsStockCollection();

            StockCollection.FilterByPrice(FilteredPrice);

            lstStockCollection.DataSource = StockCollection.StockList;

            lstStockCollection.DataValueField = "productId";

            lstStockCollection.DataTextField = "GameTitle";

            lstStockCollection.DataBind();
        }
        catch
        {
            lblError.Text = "Please enter a Number";
        }
    }