Skip to content

Instantly share code, notes, and snippets.

@jaspreetsidhu
Created September 14, 2019 19:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jaspreetsidhu/73eb534f0037382cbcec1331561c8cf2 to your computer and use it in GitHub Desktop.
Save jaspreetsidhu/73eb534f0037382cbcec1331561c8cf2 to your computer and use it in GitHub Desktop.
@isTest
private class TestVerifyDate{
@isTest static void testCheckDates(){
Date d2 = system.today();
Date d1 = d2.addDays(10);
Date dt = VerifyDate.CheckDates(d1, d2);
Date testDate = Date.newInstance(2019, 9, 30);
System.assertEquals(dt, testDate);
}
@isTest static void testDateWithin30Days(){
Date d1 = system.today();
Date d2 = d1.addDays(10);
Date dt = VerifyDate.CheckDates(d1, d2);
System.assertEquals(dt, d2);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment