+ Start a Discussion
baby prasanthi pattapubaby prasanthi pattapu 

Create a unit test for a simple Apex class, for this challenge when iam trying to create apex class VerifyData it is giving error not a legal name

Mahesh DMahesh D
Hi Prasanthi,

Please provide your existing class and test class so that we will help you.

Regards,
​Mahesh
Han Phyo AungHan Phyo Aung
Hi,
Use this code to win the challenge.

@isTest
public class TestVerifyDate {
    @isTest static void testCheckDate(){
        date d1=VerifyDate.CheckDates(system.today(),system.today().addDays(10));
        System.assertEquals(system.today().addDays(10),d1);
        
        date d2=VerifyDate.CheckDates(system.today(),system.today().addDays(78));
        System.assertEquals(system.today(),d2);
    }
}
Christophe_         LereverendChristophe_ Lereverend
Thanks @Han Phyo Aung

Works Perfectly!