I have a class
public with sharing class myCurrentController {
public PageReference myNewPage() {
return Network.communitiesLanding();
}
}
My test class is
public with sharing class myCurrentControllerTest {
@isTest
public static PageReference testMyNewPage() {
return Network.communitiesLanding();
}
}
The code here doesn't cover anything.
I have tried a few other things, like adding
system.assertEquals(myCurrentControllerTest.testMyNewPage(), myCurrentController.myNewPage());
But I get an error message:
Non static method cannot be referenced from a static context.
I am still very new to Apex tests so any help would be greatly appreciated.