• Vijayakumar Dhanasekaran
  • NEWBIE
  • 15 Points
  • Member since 2015

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 1
    Replies
I've been working on the Getting Started with Apex Unit Tests  and have run into a speed bump on the challenge. I have 91% coverage and have one last line to figure out. I've tried various combinations of assert. without any success.

The error message is:
Error: Method does not exist or incorrect signature: VerifyDate.SetEndOfMonthDate(Datetime) 

The bold section of code has the issue. I'm not sure how to assert the method properly, if that is even the way to do it. The class/methods do exists.

@istest 
private class TestVerifyDate {
@isTest static void testCheckDates() {
    datetime dteDate1 = VerifyDate.CheckDates(Date.newInstance(2015, 1, 1), Date.newInstance(2015, 1, 10));
        if(VerifyDate.DateWithin30Days(Date.newInstance(2015, 1, 1),Date.newInstance(2015, 1, 10))) {
            System.assertEquals(Date.newInstance(2015, 1, 10),Date.newInstance(2015, 1, 10));
        } else {
           System.assert(VerifyDate.SetEndOfMonthDate(dteDate1));
        }    
}


Any thoughts or direction someone could point me in? Thanks.