public void AppointmentDeleteMethodOK()
        {
            //create an instance of the class we wantto create
            clsAppointmentCollection AllAppointments = new clsAppointmentCollection();
            //create an item for tests data
            clsAppointments TestItem = new clsAppointments();
            //var to store the primary key
            Int32 PrimaryKey = 0;

            //set its props
            //TestItem.StaffNo = 0;
            TestItem.AppointmentTitle = "TestAddMethodAppointmentTitle";
            TestItem.ClientNo         = 5;
            TestItem.StaffNo          = 7;
            TestItem.Location         = "TestAddBirminghamOffice";
            TestItem.BookingDate      = DateTime.Now.Date;
            TestItem.Status           = "Pending";
            //Set this staff to the test data
            AllAppointments.ThisAppointment = TestItem;
            //add the record
            PrimaryKey = AllAppointments.Add();
            //set the primary key of the test data
            TestItem.AppointmentNo = PrimaryKey;
            //find the recird
            AllAppointments.ThisAppointment.Find(PrimaryKey);
            //delete the record
            AllAppointments.Delete();
            //now find the record
            Boolean Found = AllAppointments.ThisAppointment.Find(PrimaryKey);

            //test to see that the record was not found
            Assert.IsFalse(Found);
        }
        public void AppointmentAddMethodOK()
        {
            //create an instance of the class we wantto create
            clsAppointmentCollection AllAppointments = new clsAppointmentCollection();
            //create an item for tests data
            clsAppointments TestItem = new clsAppointments();
            //var to store the primary key
            Int32 PrimaryKey = 0;

            //set its props
            //TestItem.AppointmentNo = 0;
            TestItem.AppointmentTitle = "TestAddMethodAppointmentTitle";
            TestItem.ClientNo         = 5;
            TestItem.StaffNo          = 7;
            TestItem.Location         = "TestAddBirminghamOffice";
            TestItem.BookingDate      = DateTime.Now.Date;
            TestItem.Status           = "Pending";
            //Set this appointment to the test data
            AllAppointments.ThisAppointment = TestItem;
            //add the record
            PrimaryKey = AllAppointments.Add();
            //set the primary key of the test data
            TestItem.AppointmentNo = PrimaryKey;
            //find the recird
            AllAppointments.ThisAppointment.Find(PrimaryKey);
            //test to see that the two values are the same
            Assert.AreEqual(AllAppointments.ThisAppointment, TestItem);
        }