Exemplo n.º 1
0
        public void FilterByCustomerAddressMethodOK()
        {
            clsOrderCollection AllOrders      = new clsOrderCollection();
            clsOrderCollection FilteredOrders = new clsOrderCollection();

            FilteredOrders.FilterByCustomerAddress("");
            Assert.AreEqual(AllOrders.Count, FilteredOrders.Count);
        }
Exemplo n.º 2
0
        public void FilterByCustomerAddressNoneFound()
        {
            clsOrderCollection AllOrders      = new clsOrderCollection();
            clsOrderCollection FilteredOrders = new clsOrderCollection();

            FilteredOrders.FilterByCustomerAddress("xxxxxxxxxx");
            Assert.AreEqual(0, FilteredOrders.Count);
        }
Exemplo n.º 3
0
    protected void btnApply_Click(object sender, EventArgs e)
    {
        clsOrderCollection Orders = new clsOrderCollection();

        Orders.FilterByCustomerAddress(txtFilter.Text);
        lstOrder.DataSource     = Orders.OrderList;
        lstOrder.DataValueField = "OrderID";
        lstOrder.DataTextField  = "CustomerAddress";
        lstOrder.DataBind();
    }
Exemplo n.º 4
0
        public void FilterByCustomerAddressTestDataFound()
        {
            clsOrderCollection FilteredOrders = new clsOrderCollection();
            Boolean            OK             = true;

            FilteredOrders.FilterByCustomerAddress("37");
            if (FilteredOrders.Count == 1)
            {
                if (FilteredOrders.OrderList[0].OrderID != 6)
                {
                    OK = false;
                }
            }
            else
            {
                OK = false;
            }
            Assert.IsTrue(OK);
        }