You need to sign in to do that
Don't have an account?
Patrick Lawson
Need code coverage to depoy, but cannot test.
No Tests to Run: Add test methods to your test class
@isTest private class ListViewControllerTest { /**This is the list which will be passed to Visualforce Page and in turn passed to Flow from Visualforce**/ public List<Matching_Facility__c> LstSelectedFacilities { get; set; } public ListViewControllerTest(ApexPages.StandardSetController listcontroller) { Set<Id> facilitySelectedIds = new Set<Id>(); LstSelectedFacilities = new List<Matching_Facility__c>(); for (Matching_Facility__c f : (Matching_Facility__c[])listcontroller.getSelected()) { facilitySelectedIds.add(f.Id); } /**Querying on the Selected records and fetching fields which are required in Flow **/ LstSelectedFacilities = [SELECT Id, Client_Search__c FROM Matching_Facility__c WHERE Id IN :facilitySelectedIds]; } }
Need code coverage to depoy, but cannot test.
Here is an example of a test method you could add to your ListViewControllerTest class to achieve some code coverage:
If you find this answer helpful, Please mark it as the best answer.
Based on the code snippet you provided, the ListViewControllerTest class seems to be a constructor with parameters, rather than a test class with test methods.
To add test methods, you can create a separate test class that will create an instance of ListViewControllerTest and test its functionality.
Please try with the below and let me know if you face any difficulties :
If this helps , please mark this as Best Answer.
Thank you.