Ejemplo n.º 1
0
 public void AppointmentDateMax()
 {
     //create an instance of the paymentmethod
     clsAppointments AnAppointment = new clsAppointments();
     //boolean variable to store the result of the validation
     Boolean OK = false;
     //create some test data to pass to the method
     string AppointmentLocation = "Loughborough";
     //create a variable to store the test date data
     DateTime TestDate;
     //set todays date
     TestDate = DateTime.Now.Date;
     //change the date to whatever the date is less 100 years
     TestDate = TestDate.AddYears(100);
     //convert the date to a string variable
     string AppointmentDate = TestDate.ToString();
     //invoke the method
     OK = AnAppointment.Valid(AppointmentLocation, AppointmentDate);
     //test to see that result is correct
     Assert.IsTrue(OK);
 }
Ejemplo n.º 2
0
 public void AppointmentValidMethodOK()
 {
     //create an instance of the class we want to create
     clsAppointments AnAppointment = new clsAppointments();
     //Boolean variable to store the result of the validation
     Boolean OK = false;
     //create some test data to use with the method
     String AppointmentLocation = "Office";
     //create a variable to store the test date data
     DateTime TestDate;
     //set todays date
     TestDate = DateTime.Now.Date;
     //convert the date to a string variable
     string AppointmentDate = TestDate.ToString();
     //invoke the method
     OK = AnAppointment.Valid(AppointmentLocation, AppointmentDate);
     //test to see if the result is correct
     Assert.IsTrue(OK);
 }
Ejemplo n.º 3
0
 public void AppointmentIDMaxBoundary()
 {
     clsAppointments TestAppointmentID = new clsAppointments();
     Boolean OK = TestAppointmentID.Valid(2147483647);
     Assert.IsTrue(OK);
 }
Ejemplo n.º 4
0
 public void AppointmentIDMid()
 {
     clsAppointments TestAppointmentID = new clsAppointments();
     Boolean OK = TestAppointmentID.Valid(1013741824);
     Assert.IsTrue(OK);
 }
Ejemplo n.º 5
0
 public void AppointmentIDMaxMinusOne()
 {
     clsAppointments TestAppointmentID = new clsAppointments();
     Boolean OK = TestAppointmentID.Valid(2147483646);
     Assert.IsTrue(OK);
 }
Ejemplo n.º 6
0
 public void AppointmentIDMinPlusOne()
 {
     clsAppointments TestAppointmentID = new clsAppointments();
     Boolean OK = TestAppointmentID.Valid(2);
     Assert.IsTrue(OK);
 }
Ejemplo n.º 7
0
 public void AppointmentIDMinBoundary()
 {
     clsAppointments TestAppointmentID = new clsAppointments();
     Boolean OK = TestAppointmentID.Valid(1);
     Assert.IsTrue(OK);
 }
Ejemplo n.º 8
0
 public void AppointmentIDMinusOne()
 {
     clsAppointments TestAppointmentID = new clsAppointments();
     Boolean OK = TestAppointmentID.Valid(-1);
     Assert.IsFalse(OK);
 }
Ejemplo n.º 9
0
 public void AppointmentIDExtremeMin()
 {
     clsAppointments TestAppointmentID = new clsAppointments();
     Boolean OK = TestAppointmentID.Valid(-2147483647);
     Assert.IsFalse(OK);
 }