示例#1
0
        public void FilterByDetailsOK()
        {
            clsOrderCollection orders = new clsOrderCollection();

            clsOrderCollection filteredOrders = new clsOrderCollection();

            filteredOrders.ReportByDetails("xxx");

            Assert.AreEqual(2, filteredOrders.orderList.Count);
        }
示例#2
0
    protected void ClearBtn_Click(object sender, EventArgs e)
    {
        clsOrderCollection orders = new clsOrderCollection();

        orders.ReportByDetails("");

        lstOrderList.DataSource = orders.orderList;

        lstOrderList.DataValueField = "OrderId";

        lstOrderList.DataTextField = "OrderId";

        lstOrderList.DataBind();
    }
示例#3
0
        public void ReportByDetailsTestDataFound()
        {
            clsOrderCollection filteredOrders = new clsOrderCollection();

            Boolean OK = true;

            filteredOrders.ReportByDetails("xxx");

            if (filteredOrders.orderList.Count == 2)
            {
                if (filteredOrders.orderList[0].OrderId == 13 && filteredOrders.orderList[1].OrderId == 14)
                {
                    OK = true;
                }
            }
            else
            {
                OK = false;
            }

            Assert.IsTrue(OK);
        }