public void ReportByCustAddressNoneFound()

        {
            clsAccountCollection filteredAccount = new clsAccountCollection();

            filteredAccount.ReportByCustAddress("yyy yyy");

            Assert.AreEqual(0, filteredAccount.count);
        }
Example #2
0
    protected void btnApply_Click(object sender, EventArgs e)
    {
        clsAccountCollection Account = new clsAccountCollection();

        Account.ReportByCustAddress(txtSearch.Text);
        lstResult.DataSource     = Account.AccountList;
        lstResult.DataValueField = "CustID";
        lstResult.DataValueField = "CustAddress";
        lstResult.DataBind();
    }
        public void ReportByCustAddressMethodOK()

        {
            clsAccountCollection allAccount = new clsAccountCollection();

            clsAccountCollection filteredAccount = new clsAccountCollection();

            filteredAccount.ReportByCustAddress("");

            Assert.AreEqual(allAccount.count, filteredAccount.count);
        }
        public void ReportByCustAddressTestDataFound()

        {
            clsAccountCollection FilteredAccount = new clsAccountCollection();
            Boolean OK = true;

            FilteredAccount.ReportByCustAddress("LE30DS");
            if (FilteredAccount.count == 2)
            {
                if (FilteredAccount.AccountList[0].CustID != 3)
                {
                    OK = false;
                }
                if (FilteredAccount.AccountList[1].CustID != 4)
                {
                    OK = false;
                }
            }
            else
            {
                OK = false;
            }
            Assert.IsTrue(OK);
        }