Example #1
0
 public void CustUserNameFound()
 {
     //create an instance of the class we want to create
     clsCustomer ACustomer = new clsCustomer();
     //Boolean variable to store the result of the validation
     Boolean Found = false;
     //boolean variable to record if data is OK (assume it is)
     Boolean OK = true;
     //create some test data to use with the method
     Int32 CustomerNo = 21;
     //invoke the mothod
     Found = ACustomer.Find(CustomerNo);
     //chech the address no
     if (ACustomer.UserName != "TestUserName")
     {
         OK = false;
     }
     //test to see if the result is correct
     Assert.IsTrue(OK);
 }
Example #2
0
 public void CustFindMethodOK()
 {
     //create an instance of the class we want to create
     clsCustomer ACustomer = new clsCustomer();
     //Boolean variable to store the result of the validation
     Boolean Found = false;
     //create some test data to use with the method
     Int32 CustomerNo = 21;
     //invoke the mothod
     Found = ACustomer.Find(CustomerNo);
     //test to see if the result is correct
     Assert.IsTrue(Found);
 }