public void ValidMethodOK() { //create an instance of the class we want to create clsTown ATown = new clsTown(); //string variable to store any error message String Error = ""; string SomeTown = "Leicester"; //assign the data of the property Error = ATown.Valid(SomeTown); //test to see the results are ok Assert.AreEqual(Error, ""); }
public void TownMinPlusOne() { //create an instance of the class we want to create clsTown ATown = new clsTown(); //string variable to store any error message String Error = ""; //create some test data to pass the method string SomeTown = "aa"; //Invoke the method Error = ATown.Valid(SomeTown); //test to see the result is correct Assert.AreEqual(Error, ""); }
public void TownExtremeMax() { //create an instance of the class we want to create clsTown ATown = new clsTown(); //string variable to store any error message String Error = ""; //create some test data to pass the method string SomeTown = ""; SomeTown = SomeTown.PadRight(500, 'a'); Error = ATown.Valid(SomeTown); //test to see the result is correct Assert.AreNotEqual(Error, ""); }
public void TownMaxLessOne() { //create an instance of the class we want to create clsTown ATown = new clsTown(); //string variable to store any error message String Error = ""; //create some test data to pass the method string SomeTown = ""; //pad the string with characters SomeTown = SomeTown.PadRight(49, 'a'); //Invoke the method Error = ATown.Valid(SomeTown); //test to see the result is correct Assert.AreEqual(Error, ""); }