public void FilterByCarMakeTestDataFound()
        {
            //create an instance of the filtered data
            clsCarCollection FilteredCars = new clsCarCollection();
            //var to store outcome
            Boolean OK = true;

            //apply a post code that doesn't exist
            FilteredCars.FilterByCarMake2("yyy yyy");
            //check that the correct number of records are found
            if (FilteredCars.Count == 2)
            {
                //check that the first record is ID 1
                if (FilteredCars.CarList[0].CarNo != 1)
                {
                    OK = false;
                }
                //check that the second record is ID 2
                if (FilteredCars.CarList[1].CarNo != 2)
                {
                    OK = false;
                }
            }
            else
            {
                OK = true;
            }
            //test to see that there are no records
            Assert.IsTrue(OK);
        }
        public void FilterByCarMakeNoneFound()
        {
            //create an instance of the filtered data
            clsCarCollection FilteredCars = new clsCarCollection();

            //apply a Car Make that doesn't exist
            FilteredCars.FilterByCarMake2("jkjkjk");
            //test to see that there are no records
            Assert.AreEqual(0, FilteredCars.Count);
        }
        public void FilterByPostCodeMethodOK()
        {
            //create an instance of the class containing unfiltered results
            clsCarCollection AllCars = new clsCarCollection();
            //create an instance of the filtered data
            clsCarCollection FilteredCars = new clsCarCollection();

            //apply a blank string (should return all records);
            FilteredCars.FilterByCarMake2("");
            //test to see that the two values are the same
            Assert.AreEqual(AllCars.Count, FilteredCars.Count);
        }