コード例 #1
0
        public void ConditionMaxPlusOne()
        {
            //create an instance of the Method we want to create
            clsStock TheStock = new clsStock();
            //boolean variable to store the result of the validation
            Boolean CondtionOK = false;
            //create some test data to assign to the property
            string SomeCondition = "qwertyuiopa";

            //invoke the method
            CondtionOK = TheStock.ConditionValid(SomeCondition);
            //test to see that the result is correct
            Assert.IsFalse(CondtionOK);
        }
コード例 #2
0
        public void ConditionExtremeMax()
        {
            //create an instance of the Method we want to create
            clsStock TheStock = new clsStock();
            //boolean variable to store the result of the validation
            Boolean CondtionOK = false;
            //create some test data to assign to the property
            string SomeCondition = "";

            //pad thew string with a characters
            SomeCondition = SomeCondition.PadRight(500, 'a');
            //invoke the method
            CondtionOK = TheStock.ConditionValid(SomeCondition);
            //test to see that the result is correct
            Assert.IsFalse(CondtionOK);
        }