public void ValidMethodOK() { //create insatance of class clsServiceOrder AnOrder = new clsServiceOrder(); //boolean value to store result of validation., which is intitialised to false Boolean OK = false; //create some test data to assign to property string SomeService = "CPU Repair"; //invoke the methoid OK = AnOrder.Valid(SomeService); //test to see if result is ok Assert.IsTrue(OK); }
public void ServiceExtremeMax() { //create insatance of class clsServiceOrder AnOrder = new clsServiceOrder(); //boolean value to store result of validation., which is intitialised to false Boolean OK = false; //create some test data to assign to property string SomeService = ""; //pad the data with characters.PadRight is a built in method that allows us to pad out an existing string with a set number of a specific character. SomeService = SomeService.PadRight(129, 'a'); //invoke the methoid OK = AnOrder.Valid(SomeService); //test to see if result is ok Assert.IsFalse(OK); }
public void ServiceMaxPlusOne() { //create insatance of class clsServiceOrder AnOrder = new clsServiceOrder(); //boolean value to store result of validation., which is intitialised to false Boolean OK = false; //create some test data to assign to property string SomeService = "abcdefghijklmnopqrstu"; //invoke the methoid OK = AnOrder.Valid(SomeService); //test to see if result is ok Assert.IsFalse(OK); }