public void FindMethodOK() { //create an instance of the class we want to create clsContactUs TestItem = new clsContactUs(); //boolean variable to store the result of the validisation Boolean Found = false; //create some test data to use the method Int32 ContactId = 2000; //Invoke the method Found = TestItem.Find(ContactId); //test to see if it exists Assert.IsTrue(Found); }
public void TestMessageFound() { //create a new instance of the class we want to create clsContactUs AContact = new clsContactUs(); //string variable to store result of validation Boolean Found = false; //create some test data to assign to property Int32 ContactId = 2000; //invoke method Found = AContact.Find(ContactId); //check the Customer ID if (AContact.Message != "Nice Restaurant") { Found = false; } //test to see if it exists Assert.IsTrue(Found); }