Beispiel #1
0
        public void ReportByEmailNoneFound()
        {
            clsOrderCollection FilteredOrder = new clsOrderCollection();

            FilteredOrder.ReportByEmail("xxxxx@xxxxxxxxxxx");
            Assert.AreEqual(0, FilteredOrder.Count);
        }
Beispiel #2
0
        public void ReportByEmailMethodOK()
        {
            clsOrderCollection AllOrder      = new clsOrderCollection();
            clsOrderCollection FilteredOrder = new clsOrderCollection();

            FilteredOrder.ReportByEmail("");
            Assert.AreEqual(AllOrder.Count, FilteredOrder.Count);
        }
Beispiel #3
0
        public void ReportByEmailNotFound()
        {
            //create an instance of the filtered data
            clsOrderCollection FilteredOrders = new clsOrderCollection();

            //apply a category that doesn't exist
            FilteredOrders.ReportByEmail("*****@*****.**");
            //test to see that there are no records
            Assert.AreNotEqual(1, FilteredOrders.Count);
        }
        Int32 DisplayOrders(string EmailFilter)
        {
            clsOrderCollection AllOrders = new clsOrderCollection();

            AllOrders.ReportByEmail(EmailFilter);
            //set the data source to the list of Inventories in the collection
            lstOrders.DataSource = AllOrders.OrderList;
            //set the name of the primary Key
            lstOrders.ValueMember = "OrderId";
            //set the data field to display
            lstOrders.DisplayMember = "AllDetails";


            return(AllOrders.Count);
        }
Beispiel #5
0
        public void ReportByEmailTestDataFound()
        {
            clsOrderCollection FilteredOrder = new clsOrderCollection();
            Boolean            OK            = true;

            FilteredOrder.ReportByEmail("*****@*****.**");
            if (FilteredOrder.Count == 1)
            {
                if (FilteredOrder.OrderList[0].OrderID != 1)
                {
                    OK = false;
                }
                //if (FilteredOrder.OrderList[1].OrderID != 25)
                //{
                //    OK = false;
                //}
            }
            else
            {
                OK = false;
            }
            Assert.IsTrue(OK);
        }