Why the coverage code is 0?
global with sharing class OutputControllerMap {
@RemoteAction
global static List<Output__c> findAll() {
return [SELECT Id, Name, Project_Type__c,Beneficiary_Full_Name__c, Commune_del__c, Departement_del__c, Locality__c, GPS__Latitude__s, GPS__Longitude__s
FROM Output__c];
}
}
Test class
@isTest
public class OutputControllerMapTest
{
static testMethod void OutputControllerMapTest()
{
Project__c p = new Project__c();
p.Departement__c = 'OUEST';
p.Project_Name__c = 'Test Mappp';
p.Type_Of_Request__c = 'Collective';
p.Department_FFP__c = 'Agriculture';
insert p;
Milestone_s_Type__c mt = new Milestone_s_Type__c();
mt.Name = 'House';
insert mt;
Milestone__c m = new Milestone__c();
m.Project__c=p.id;
m.MilestoneCategory__c= 'Other';
m.Milestone_s_Type__c = mt.Id;
m.Target_number__c =20;
insert m;
Output__c o = new Output__c();
o.Milestone__c = m.id;
o.Project_Type__c='House';
o.Description__c='hjgjgkjgjhg';
o.Locality__c = 'jklhjlhkjlhjlhkl';
o.Project_Type__c ='House';
o.Departement_del__c ='Ouest';
o.Locality__c ='Leogane';
o.Commune_del__c ='Leogane';
o.GPS__Latitude__s =12.7545;
o.GPS__Longitude__s =-72.54;
Insert o;
Test.setCurrentPageReference(new PageReference('OutputControllerMap'));
OutputController oc = new OutputController();
}
}