You need to sign in to do that
Don't have an account?
Moritz Mueller
Custom list view test class
Hi,
Am struggling to get a test class for the following custom list view and hoping for some input here, apex;
Now my test class looks as follows;
I am just not sure what method to look for and what to test really.
Any direction/input is highly appreciated!
Am struggling to get a test class for the following custom list view and hoping for some input here, apex;
public with sharing class RecentTechnicalBulletinsHomePage { @AuraEnabled public static List<Knowledge__kav> getArticles(){ return [Select Id, Title, LastModifiedDate From Knowledge__kav Where RecordTypeId = '0121k000000CipgAAC' ORDER BY LastModifiedDate DESC LIMIT 10]; } }
Now my test class looks as follows;
@isTest public class RecentTechnicalBulletinsHomePageTest { @testSetup static void createArticle(){ List<Knowledge__kav> testArt = new List<Knowledge__kav>(); for(Integer i=0;i<10;i++) { testArt.add(new Knowledge__kav(Title = 'TestArt'+i)); } insert testArt; } public static testMethod void getListView(){ } }
I am just not sure what method to look for and what to test really.
Any direction/input is highly appreciated!
Mark as best answer, If it resloves !!
class
Test class
Mark as resloved if it helps :) :)
Thanks,
Bhanu Prakash
visit ForceLearn.com
All Answers
Mark as best answer, If it resloves !!
class
Test class
Mark as resloved if it helps :) :)
Thanks,
Bhanu Prakash
visit ForceLearn.com