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, ""); }
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, ""); }
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, ""); }