Skip to main content
Alexander Rocha (Inpulso) 님이 #Apex에 질문했습니다

Hi everyone,

I'm having a problem here.

I'm trying to test my class, and I can't test "Site.login()" function.

I have a code like this:

logado = Site.login(username, password, null);              

if(logado != null){

    //Some code here

}

No matter which values I pass in the parameters, it always returns null. There's a way to this return true in a apex test class?

Thank you for your attention.

Sorry my bad english.

Alexander Rocha
답변 2개
  1. 2015년 3월 2일 오후 2:59
    Hi Tejpal,

    That doesn't work.

    controller.login() returns a null value.

    Thank you for your attention

    Alexander Santos Rocha