public void GetCustomersByFirstName()
        {
            string          FirstName;
            CustomerBO      customerBO = new CustomerBO();
            List <Customer> customers  = new List <Customer>();

            // 1 from last name
            FirstName = "Fred";

            customers = customerBO.GetCustomersByFirstName(FirstName);

            Assert.AreEqual(customers.Count, 1);

            // 1 from last name
            FirstName = "re";

            customers = customerBO.GetCustomersByFirstName(FirstName);

            Assert.AreEqual(customers.Count, 0);

            // 0 from last name
            FirstName = "";

            customers = customerBO.GetCustomersByFirstName(FirstName);

            Assert.AreEqual(customers.Count, 0);

            // 0 from last name
            FirstName = null;

            customers = customerBO.GetCustomersByFirstName(FirstName);

            Assert.AreEqual(customers.Count, 0);
        }
Example #2
0
        public List <Customer> GetCustomersByFirstName(string FirstName)
        {
            CustomerBO customerBO = new CustomerBO();

            List <Customer> customers = customerBO.GetCustomersByFirstName(FirstName);

            return(customers);
        }