Exemplo n.º 1
0
        public void CountyMinLessOne()
        {
            //create an instance of the class we want to create
            clsCounty ACounty = new clsCounty();
            //create a string variable to store the result of the validation
            String Error = "";
            //create some test data to test the method
            string SomeCounty = "";

            //invoke the method
            Error = ACounty.Valid(SomeCounty);
            //test to see that the result is NOT OK i.e there should be an error message
            Assert.AreNotEqual(Error, "");
        }
Exemplo n.º 2
0
        public void CountyMinBoundary()
        {
            //create an instance of the class we want to create
            clsCounty ACounty = new clsCounty();
            //create a string variable to store the result of the validation
            String Error = "";
            //create some test data to test the method
            string SomeCounty = "a";

            //invoke the method
            Error = ACounty.Valid(SomeCounty);
            //test to see that the result is OK i.e there was no error message returned
            Assert.AreEqual(Error, "");
        }
Exemplo n.º 3
0
        public void CountyEtremeMax()
        {
            //create an instance of the class we want to create
            clsCounty ACounty = new clsCounty();
            //create a string variable to store the result of the validation
            String Error = "";
            //create some test data to test the method
            string SomeCounty = "";

            //pad the string with characters
            SomeCounty = SomeCounty.PadRight(500, 'a');
            //invoke the method
            Error = ACounty.Valid(SomeCounty);
            //test to see that the result is NOT OK i.e there should be an error message
            Assert.AreNotEqual(Error, "");
        }