I have a Controller, roughly as follows:
global with sharing class MyController extends OtherController {
public static List<Task> getTaskList() {
//SOME LOGIC
}
}
And a unit test for that controller:
@isTest
private class MyControllerTest{
@isTest
static void testGetTaskList() {
Test.startTest();
try {
List<Task> myTask = MyController.getTaskList();
System.assert(false, 'Did not do it's job);
} catch (Exception ex) {
System.assertEquals('Error', ex.getTypeName());
}
Test.stopTest();
}
}
When I try and save my test class, I get the following error:
Save error: Method does not exist or incorrect signature: MyController.getTaskList()
I really can't see what the issue is here at all, can anyone help me out??