Esempio n. 1
0

        
Esempio n. 2
0
        public Customer GetCustomerByCustomerID(int customerID)
        {
            CustomerBO customerBO = new CustomerBO();

            Customer customer = customerBO.GetCustomerByCustomerID(customerID);

            return(customer);
        }
Esempio n. 3
0
        private void GetCustomerSQL(int CustomerID)
        {
            CustomerBO customerBO = new CustomerBO();

            customer = customerBO.GetCustomerByCustomerID(CustomerID);

            DisplayCustomerSQL();
        }
Esempio n. 4
0
        public void GetCustomerByCustomerID()
        {
            int        customerID;
            CustomerBO customerBO = new CustomerBO();
            Customer   customer;

            customerID = -1;

            customer = customerBO.GetCustomerByCustomerID(customerID);

            Assert.IsNull(customer);


            customerID = 0;

            customer = customerBO.GetCustomerByCustomerID(customerID);

            Assert.IsNull(customer);


            customerID = 1;

            customer = customerBO.GetCustomerByCustomerID(customerID);

            Assert.IsNotNull(customer);
            Assert.AreEqual(customer.CustomerID, customerID);


            customerID = 2;

            customer = customerBO.GetCustomerByCustomerID(customerID);

            Assert.IsNotNull(customer);
            Assert.AreEqual(customer.CustomerID, customerID);


            customerID = 3;

            customer = customerBO.GetCustomerByCustomerID(customerID);

            Assert.IsNotNull(customer);
            Assert.AreEqual(customer.CustomerID, customerID);
        }