Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @isTest
- public class TestVerifyDate {
- @isTest static void testWithin30Days() {
- Date d = VerifyDate.CheckDates(date.today(),date.today().addDays(20));
- System.assertEquals(date.today().addDays(20), d);
- }
- @isTest static void testMoreThan30Days() {
- Date d = VerifyDate.CheckDates(date.today(),date.today().addDays(40));
- System.assertEquals(date.newinstance(2018,12,31), d);
- }
- @isTest static void testDateInPast() {
- Date d = VerifyDate.CheckDates(date.today(),date.today().addDays(-1));
- System.assertEquals(date.newinstance(2018,12,31), d);
- }
- }
Add Comment
Please, Sign In to add comment