public void ReportByCustomerIdDataFound()
        {
            var filteredPolicies = new clsPolicyCollection();
            var OK = true;

            filteredPolicies.ReportByCustomerId("26");
            if (filteredPolicies.Count == 3)
            {
                if (filteredPolicies.PolicyList[0].PolicyId != 14)
                {
                    OK = false;
                }
                if (filteredPolicies.PolicyList[1].PolicyId != 23)
                {
                    OK = false;
                }
                if (filteredPolicies.PolicyList[2].PolicyId != 36)
                {
                    OK = false;
                }
            }
            else
            {
                OK = false;
            }

            Assert.IsTrue(OK);
        }
    protected void btnApply_Click(object sender, EventArgs e)
    {
        var Policies = new clsPolicyCollection();

        Policies.ReportByCustomerId(txtCustomerId.Text);
        lstPolicyList.DataSource     = Policies.PolicyList;
        lstPolicyList.DataValueField = "PolicyId";
        lstPolicyList.DataTextField  = "CustomerId";
        lstPolicyList.DataBind();
    }
        public void ReportByCustomerIdNoneFound()
        {
            //filtered data instance
            var filteredPolicies = new clsPolicyCollection();

            //apply blank string (all records)
            filteredPolicies.ReportByCustomerId("000");
            //test to see that there are no record
            Assert.AreEqual(0, filteredPolicies.Count);
        }
        public void ReportByCustomerIdOk()
        {
            //instance of class
            var allPolicies = new clsPolicyCollection();
            //filtered data instance
            var filteredPolicies = new clsPolicyCollection();

            //apply blank string (all records)
            filteredPolicies.ReportByCustomerId("");
            //test if same
            Assert.AreEqual(allPolicies.Count, filteredPolicies.Count);
        }