public void PartRequiredMinPlusOne() { //create instance clsCarRepairs AnCarRepair = new clsCarRepairs(); //boolean variable to store the result of search Boolean OK = false; //Create some test data to use with the method. string DaysInForRepair = "30"; string DeadlineDate = DateTime.Now.Date.ToString(); string PartPrice = "12.99"; string PartRequired = "AA"; string CarID = "1023"; string StaffID = "1"; //Invoke the method OK = AnCarRepair.Valid(DaysInForRepair, DeadlineDate, PartPrice, PartRequired, CarID, StaffID); //Test to see that the result is correct. Assert.IsTrue(OK); }
public void DeadlineDateInvalidData() { //create instance clsCarRepairs AnCarRepair = new clsCarRepairs(); //boolean variable to store the result of search Boolean OK = false; //Create some test data to use with the method. string DaysInForRepair = "10"; string PartPrice = "12.99"; string PartRequired = "Some part"; string CarID = "1023"; string StaffID = "1"; //Enter type that is not a date string DeadlineDate = "Invalid data"; //Invoke the method OK = AnCarRepair.Valid(DaysInForRepair, DeadlineDate, PartPrice, PartRequired, CarID, StaffID); //Test to see that the result is correct. Assert.IsFalse(OK); }