//used to test the presence of the valid method public void PriceValidOK() { //create and instance of the class clsStockItem AStockItem = new clsStockItem(); Boolean OK; //test to see if the valid method exists OK = AStockItem.PriceValid("10.10"); Assert.IsTrue(OK); }
//used to test the presence of the valid method public void PriceMinLessOne() { //create and instance of the class clsStockItem AStockItem = new clsStockItem(); Boolean OK; //test to see if the valid method exists OK = AStockItem.PriceValid("-0.01"); Assert.IsFalse(OK); }