public void AddressMinLessOne() { //create an instance of the class we want to create clsInvoice AInvoice = new clsInvoice(); //boolean variable to store the result of the validation Boolean OK = false; //create some test data to assign to the property string SomeAddress = ""; //invoke the method OK = AInvoice.Valid(SomeAddress); //test to see that the result is correct Assert.IsFalse(OK); }
public void AddressExtremeMax() { //create an instance of the class we want to create clsInvoice AInvoice = new clsInvoice(); //boolean variable to store the result of the validation Boolean OK = false; //create some test data to assign to the property string SomeAddress = ""; //pad the string with a character SomeAddress = SomeAddress.PadRight(500, 'a'); //invoke the method OK = AInvoice.Valid(SomeAddress); //test to see that the result is correct Assert.IsFalse(OK); }