public void FindMethodOK() { //create an instance of the class we want to create clsInvoice AInvoice = new clsInvoice(); //string variable to store any error message Boolean Found = false; //create some test data to pass to method Int32 SomeInvoiceNo = 1; //invoke the method Found = AInvoice.Find(SomeInvoiceNo); //test to see that the result is correct Assert.IsTrue(Found); }
public void TestOrderNoFound() { //create an instance of the class we want to create clsInvoice AInvoice = new clsInvoice(); //string variable to store any error message Boolean Found = false; //boolean variable to record if data is OK Boolean OK = true; //create some test data to pass to method Int32 InvoiceNo = 1; //invoke the method Found = AInvoice.Find(InvoiceNo); //check property on if (AInvoice.OrderNo != 1) { OK = false; } Assert.IsTrue(OK); }