Ejemplo n.º 1
0
 public void InstanceOK()
 {
     //create an instance of the class we want to create
     clsAppointmentCollection AllAppointments = new clsAppointmentCollection();
     //test to see that it exists
     Assert.IsNotNull(AllAppointments);
 }
Ejemplo n.º 2
0
 public void ThisAppointmentPropertyOK()
 {
     //create an instance of the class that we want to create 
     clsAppointmentCollection AllAppointments = new clsAppointmentCollection();
     //create sometest data to assign to the property
     clsAppointments TestAppointment = new clsAppointments();
     //set the properties of the test object
     TestAppointment.AppointmentID = 1;
     TestAppointment.AppointmentLocation = "Office";
     TestAppointment.AppointmentDate = DateTime.Now;
     TestAppointment.AppointmentTime = DateTime.Now;
     //assign the data to the property
     AllAppointments.ThisAppointment = TestAppointment;
     //test to see that the two values are the same
     Assert.AreEqual(AllAppointments.ThisAppointment, TestAppointment);
 }
Ejemplo n.º 3
0
 public void AppointmentListAndCountOK()
 {
     //create an instance of the class that we want to create 
     clsAppointmentCollection AllAppointments = new clsAppointmentCollection();
     //create sometest data to assign to the property
     List<clsAppointments> TestList = new List<clsAppointments>();
     //add an itm to the list
     //create the item of test data
     clsAppointments TestItem = new clsAppointments();
     //set the properties
     TestItem.AppointmentID = 1;
     TestItem.AppointmentLocation = "Office";
     TestItem.AppointmentDate = DateTime.Now;
     TestItem.AppointmentTime = DateTime.Now;
     //add the item to the test list
     TestList.Add(TestItem);
     //assign the data to the property
     AllAppointments.AppointmentList = TestList;
     //test to see that the two values are the same
     Assert.AreEqual(AllAppointments.Count, TestList.Count);
 }