Ejemplo n.º 1
0
        public void ReportByDeliveryAddressNoneFound()
        {
            clsOrderCollection FilteredOrders = new clsOrderCollection();

            FilteredOrders.ReportByDeliveryAddress("xxx xxx");
            Assert.AreEqual(0, FilteredOrders.Count);
        }
Ejemplo n.º 2
0
        public void ReportByDeliveryAddressMethodOK()
        {
            clsOrderCollection AllOrders      = new clsOrderCollection();
            clsOrderCollection FilteredOrders = new clsOrderCollection();

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

        Orders.ReportByDeliveryAddress(txtFilter.Text);
        lstOrders.DataSource     = Orders.OrderList;
        lstOrders.DataValueField = "orderID";
        lstOrders.DataTextField  = "deliveryAddress";
        lstOrders.DataBind();
    }
Ejemplo n.º 4
0
        public void ReportByDeliveryAddressTestDataFound()
        {
            clsOrderCollection FilteredOrders = new clsOrderCollection();
            Boolean            OK             = true;

            FilteredOrders.ReportByDeliveryAddress("Test address");
            if (FilteredOrders.Count == 2)
            {
                if (FilteredOrders.OrderList[0].orderID != 12)
                {
                    OK = false;
                }
                if (FilteredOrders.OrderList[1].orderID != 20)
                {
                    OK = false;
                }
            }
            else
            {
                OK = false;
            }
            Assert.IsTrue(OK);
        }