Hi, I'm getting the same error on all the code I try for the Trailhead Challenge 'Create a unit test for a simple Apex Class'.The error I get is: Method does not exist or incorrect signature: void CheckDates(Date, Date) from the type VerifyDateI have tried the following:@isTestprivate class TestVerifyDate { static testMethod void TestVerifyDates() { VerifyDate.CheckDates(system.today(),system.today().addDays(10)); VerifyDate.CheckDates(system.today(),system.today().addDays(78)); }}Also:@isTestpublic class TestVerifyDate { @isTest static void testVerifyDate(){ date date1=VerifyDate.CheckDates(system.today(),system.today().addDays(10)); System.assertEquals(system.today().addDays(10),date1); date date2=VerifyDate.CheckDates(system.today(),system.today().addDays(78)); System.assertEquals(system.today(),date2); }}Also:@isTestprivate class TestVerifyDate{ @isTest static void testDt1GtrDt2(){ Date d2 = system.today(); Date d1 = d2.addDays(10); Date dt = VerifyDate.CheckDates(d1, d2); Date testDt = Date.newInstance(2017, 7, 31); System.assertEquals(dt, testDt); } @isTest static void testDt2Within30dayOfDt1(){ Date d1 = system.today(); Date d2 = d1.addDays(10); Date dt = VerifyDate.CheckDates(d1, d2); System.assertEquals(dt, d2); }}This is the code for the Class itself:public class VerifyDate {//method to handle potential checks against two datespublic static Date CheckDates(Date date1, Date date2) {//if date2 is within the next 30 days of date1, use date2. Otherwise use the end of the monthif(DateWithin30Days(date1,date2)) {return date2;} else {return SetEndOfMonthDate(date1);}}//method to check if date2 is within the next 30 days of date1private static Boolean DateWithin30Days(Date date1, Date date2) {//check for date2 being in the pastif( date2 < date1) { return false; }//check that date2 is within (>=) 30 days of date1Date date30Days = date1.addDays(30); //create a date 30 days away from date1if( date2 >= date30Days ) { return false; }else { return true; }}//method to return the end of the month of a given dateprivate static Date SetEndOfMonthDate(Date date1) {Integer totalDays = Date.daysInMonth(date1.year(), date1.month());Date lastDay = Date.newInstance(date1.year(), date1.month(), totalDays);return lastDay;}}Can anyone point me to what I am doing wrong please?Thanks!
Thanks everyone. Weirdly when I checked the challenge it passed so there was clearly some kind of glitch. This is one of the reasons I find Trailhead a bit difficult!