示例#1
0
 public void TestTypeOfEventFound()
 {
     //create an instance of the class we want to create
      clsEvent AEvent = new clsEvent();
      //boolean varibale to store the result of the validation
      Boolean Found = false;
      //boolean variable to store the result of the search
      Boolean OK = true;
      //create some test data to use with the method
      Int32 EventCode = 1;
      //invoke the method
      Found = AEvent.Find(EventCode);
      //check the event code
      if (AEvent.TypeOfEvent != "Conference")
      {
          OK = false;
      }
      //test to see that the result is correct
      Assert.IsFalse(OK);
 }
示例#2
0
 public void FindMethodOK()
 {
     //create an instance of the class we want to create
      clsEvent AEvent = new clsEvent();
      //boolean varibale to store the result of the validation
      Boolean Found = false;
      //create some test data to use with the method
      Int32 EventCode = 1;
      //invoke the method
      Found = AEvent.Find(EventCode);
      //test rto see that the result is correct
      Assert.IsTrue(Found);
 }
示例#3
0
 public void TestStartDateFound()
 {
     //create an instance of the class we want to create
      clsEvent AEvent = new clsEvent();
      //boolean varibale to store the result of the validation
      Boolean Found = false;
      //boolean variable to store the result of the search
      Boolean OK = true;
      //create some test data to use with the method
      Int32 EventCode = 1;
      //invoke the method
      Found = AEvent.Find(EventCode);
      //check the event code
      if (AEvent.StartDate != Convert.ToDateTime("22/03/2016"))
      {
          OK = false;
      }
      //test to see that the result is correct
      Assert.IsTrue(OK);
 }