コード例 #1
0
        public void FilterByItemDescriptionNoneFound()
        {
            clsOrderCollection AllOrders      = new clsOrderCollection();
            clsOrderCollection FilteredOrders = new clsOrderCollection();

            FilteredOrders.FilterByItemDescription("xxxxxxx");
            Assert.AreEqual(0, FilteredOrders.Count);
        }
コード例 #2
0
        public void FilterByItemDescriptionMethodOK()
        {
            clsOrderCollection AllOrders      = new clsOrderCollection();
            clsOrderCollection FilteredOrders = new clsOrderCollection();

            FilteredOrders.FilterByItemDescription("");
            Assert.AreEqual(AllOrders.Count, FilteredOrders.Count);
        }
コード例 #3
0
    protected void btnApply_Click(object sender, EventArgs e)
    {
        clsOrderCollection Orders = new clsOrderCollection();

        Orders.FilterByItemDescription(txtFilter.Text);
        lstOrder.DataSource     = Orders.OrderList;
        lstOrder.DataValueField = "OrderNo";
        lstOrder.DataTextField  = "ItemDescription";
        lstOrder.DataBind();
    }
コード例 #4
0
        public void FilterByItemDescriptionTestDataFound()
        {
            clsOrderCollection FilteredOrders = new clsOrderCollection();
            Boolean            OK             = true;

            FilteredOrders.FilterByItemDescription("Racing");
            if (FilteredOrders.Count == 1)
            {
                if (FilteredOrders.OrderList[0].OrderNo != 4)
                {
                    OK = false;
                }
            }
            else
            {
                OK = false;
            }
            Assert.IsTrue(OK);
        }