public void ReportByGenreNoneFound() { clsProductCollection FilteredProducts = new clsProductCollection(); FilteredProducts.ReportByGenre("HotDog Sales"); Assert.AreEqual(0, FilteredProducts.Count); }
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); } }
public void ReportByGenreMethodOK() { clsProductCollection AllProducts = new clsProductCollection(); clsProductCollection FilteredProducts = new clsProductCollection(); FilteredProducts.ReportByGenre(""); Assert.AreEqual(AllProducts.Count, FilteredProducts.Count); }