public void EndDateOfContractExtremeMax() { //create an instance of the class we want to create clsContract AContract = new clsContract(); //string variable to store the results of the validation String OK = ""; //set the date totaldays date DateTime SomeDate; //set test date as todays daye SomeDate = DateTime.Now.Date; //change to date the whatever date is 100 years in the future SomeDate = SomeDate.AddYears(+100); //Convert data to a string variable string EndDateOfContract = SomeDate.ToString(); EndDateOfContract = Convert.ToString(SomeDate); //invoke the method OK = AContract.Valid(ContractNo, CustomerNo, PhoneID, ContractType, StartDateOfContract, EndDateOfContract); //test to see that the result is correct Assert.AreNotEqual(OK, ""); }
public void BookingsDateBookedExtremeMax() { //create an instance of new class we want to create clsBookings ABookings = new clsBookings(); //string variable to store the results of the validation string OK = ""; //create some test data to assign to property string PaymentType = "12345"; string Ammount = "23.50"; //vaiable to store test date data DateTime SomeDate; //set test date as todays daye SomeDate = DateTime.Now.Date; //change to date the whatever date is 100 years in the future SomeDate = SomeDate.AddYears(+100); //Convert data to a string variable string DateBooked = SomeDate.ToString(); //invoke the method OK = ABookings.Valid(Ammount, DateBooked, PaymentType); //test to see if result correct Assert.AreNotEqual(OK, ""); }