Exemplo n.º 1
0
        public void FilterByDateCreatedTestDataFound()
        {
            //create an instance of the filtered data
            clsOrderCollection FilteredOrders = new clsOrderCollection();
            //var to store outcome
            Boolean OK = true;

            //apply a post code that doesn't exist
            FilteredOrders.FilterByDateCreated("2018/02/01");
            if (FilteredOrders.Count == 5)
            {
                //check that the first record is ID 1
                if (FilteredOrders.OrderList[0].OrderNo != 33)
                {
                    OK = false;
                }
                if (FilteredOrders.OrderList[1].OrderNo != 34)
                {
                    OK = false;
                }
            }
            else
            {
                OK = false;
            }
            //test to see that there are no records
            Assert.IsTrue(OK);
        }
Exemplo n.º 2
0
        public void FilterByDateCreatedMethodOK()
        {
            //create an instance of the class we want to create
            clsOrderCollection AllOrders = new clsOrderCollection();
            //create an instance of the filtered data
            clsOrderCollection FilteredOrders = new clsOrderCollection();

            //apply a blank string (should return all records)
            FilteredOrders.FilterByDateCreated("2018/02/01");
            //test to see ThisTutor matches the test data
            Assert.AreEqual(5, FilteredOrders.Count);
        }