コード例 #1
0
 //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);
 }
コード例 #2
0
        //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);
        }