Пример #1
0
        public void ReportByGenreNoneFound()
        {
            clsProductCollection FilteredProducts = new clsProductCollection();

            FilteredProducts.ReportByGenre("HotDog Sales");
            Assert.AreEqual(0, FilteredProducts.Count);
        }
Пример #2
0
        public void ReportByGenreTestDataFound()
        {
            clsProductCollection FilteredProducts = new clsProductCollection();
            Boolean OK = true;

            FilteredProducts.ReportByGenre("Role-playing");
            //check that the correct number of records are found
            if (FilteredProducts.Count == 2)
            {
                //check that the first record product_id is 000003
                if (FilteredProducts.ProductList[0].Product_ID != 000003)
                {
                    OK = true;
                }
                //check that the first record product_id is 000004
                if (FilteredProducts.ProductList[0].Product_ID != 000004)
                {
                    OK = false;
                }
                else
                {
                    OK = false;
                }
                //test to see that there are no records
                Assert.IsTrue(OK);
            }
        }
Пример #3
0
        public void ReportByGenreMethodOK()
        {
            clsProductCollection AllProducts      = new clsProductCollection();
            clsProductCollection FilteredProducts = new clsProductCollection();

            FilteredProducts.ReportByGenre("");
            Assert.AreEqual(AllProducts.Count, FilteredProducts.Count);
        }