public void DateExtremeMax() { //create an instance of the class we want to create clsMaintenance AMaitenance = new clsMaintenance(); //boolean variable to store the results of the vaildation string Error = ""; string TestDescription = "a"; string TestCost = ""; //create the variable DateTime TestDate; //set the date today TestDate = DateTime.Now.Date; //change the to less than 100 years ago TestDate = TestDate.AddYears(100); //convert the date varialbe to string varibale string Date = TestDate.ToString(); //invoke the method Error = AMaitenance.Valid(TestDescription, TestCost, Date); //test to see that the result iss correct Assert.AreNotEqual(Error, ""); }