• Alan Flores
  • NEWBIE
  • 20 Points
  • Member since 2017

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 3
    Questions
  • 4
    Replies
Dear All:

I create a test class with Test Generator APP help, but I got some issues. Mainly, the code left me what I assume were junk characters, I tried to fix them but now I got Error: Compile Error: Method does not exist or incorrect signature: void ClientAccountSummary(List<CP_AccountSummary.ClientAccountSummary>) from the type CP_PieChartHelper at line 9 column 23.

Can you help me to figure out what's wrong? I'm very new in Test Classes. There is the code:
 
@isTest
 
private class CP_PieChartHelper_Test{
 
  static testMethod void test_ClientAccountSummary_UseCase1(){
 
    CP_PieChartHelper obj01 = new CP_PieChartHelper();
 
    CP_PieChartHelper.ClientAccountSummary (new List<CP_AccountSummary.ClientAccountSummary>());
 
  }
 
  static testMethod void test_AssetSummary_UseCase1(){
 
    CP_PieChartHelper obj01 = new CP_PieChartHelper();
 
    CP_PieChartHelper.AssetSummary (new List<CP_AccountSummary.AssetSummary>());
 
  }
 
  static testMethod void test_ApproachSummary_UseCase1(){
 
    CP_PieChartHelper obj01 = new CP_PieChartHelper();
 
    CP_PieChartHelper.ApproachSummary (new List<CP_AccountSummary.ApproachSummary>());
 
  }
 
  static testMethod void test_getAllPieChartsData_UseCase1(){
 
    CP_PieChartHelper obj01 = new CP_PieChartHelper();
 
    CP_PieChartHelper.getAllPieChartsData(new CP_ClientSummary(),new CP_AccountSummary());
 
  }
 
}

 
Hello dear collages, I wan to know if someone can help me to create a test class for this apex code:

public class SP_AS
{
    @AuraEnabled
    public String recentMonthEndDate;
 
    Class HistoricalData{
        @AuraEnabled
        public String asOfDate;
       
        @AuraEnabled
        public Decimal marketValue;
    }
   
    public Class ClientAccountSummary{
        @AuraEnabled
        public String clientAccountName;
       
        @AuraEnabled
        public Decimal marketValue;
       
   }
   
}

I'm very new in salesforce and I don't have idea about how to do this. Thanks in advance.
 

Hi everyone! I hope you can help me with this:

I was requested to create test class for some custom controllers I made, the problems is that I don't understand very well the test class examples I found here in trailhead and another blogs, since they are very specific examples and none of those use queries. So, my code is this:

 

public class AccountListController{

    public AccountListController(ApexPages.StandardController controller) {

    }

//It creates a list from Session__c called "accList"
    public list<Session__c> accList{get;set;}
    public AccountListController (){

//This query fills the list "accList" with the requested files from Session__c
        accList = [select Training__c, Date__c, Start_Time__c, End_Time__c, Training__r.Name, Name, id from Session__c];
    }

}

Thanks in advance for your help :)
Dear All:

I create a test class with Test Generator APP help, but I got some issues. Mainly, the code left me what I assume were junk characters, I tried to fix them but now I got Error: Compile Error: Method does not exist or incorrect signature: void ClientAccountSummary(List<CP_AccountSummary.ClientAccountSummary>) from the type CP_PieChartHelper at line 9 column 23.

Can you help me to figure out what's wrong? I'm very new in Test Classes. There is the code:
 
@isTest
 
private class CP_PieChartHelper_Test{
 
  static testMethod void test_ClientAccountSummary_UseCase1(){
 
    CP_PieChartHelper obj01 = new CP_PieChartHelper();
 
    CP_PieChartHelper.ClientAccountSummary (new List<CP_AccountSummary.ClientAccountSummary>());
 
  }
 
  static testMethod void test_AssetSummary_UseCase1(){
 
    CP_PieChartHelper obj01 = new CP_PieChartHelper();
 
    CP_PieChartHelper.AssetSummary (new List<CP_AccountSummary.AssetSummary>());
 
  }
 
  static testMethod void test_ApproachSummary_UseCase1(){
 
    CP_PieChartHelper obj01 = new CP_PieChartHelper();
 
    CP_PieChartHelper.ApproachSummary (new List<CP_AccountSummary.ApproachSummary>());
 
  }
 
  static testMethod void test_getAllPieChartsData_UseCase1(){
 
    CP_PieChartHelper obj01 = new CP_PieChartHelper();
 
    CP_PieChartHelper.getAllPieChartsData(new CP_ClientSummary(),new CP_AccountSummary());
 
  }
 
}

 
Hello dear collages, I wan to know if someone can help me to create a test class for this apex code:

public class SP_AS
{
    @AuraEnabled
    public String recentMonthEndDate;
 
    Class HistoricalData{
        @AuraEnabled
        public String asOfDate;
       
        @AuraEnabled
        public Decimal marketValue;
    }
   
    public Class ClientAccountSummary{
        @AuraEnabled
        public String clientAccountName;
       
        @AuraEnabled
        public Decimal marketValue;
       
   }
   
}

I'm very new in salesforce and I don't have idea about how to do this. Thanks in advance.
 

Hi everyone! I hope you can help me with this:

I was requested to create test class for some custom controllers I made, the problems is that I don't understand very well the test class examples I found here in trailhead and another blogs, since they are very specific examples and none of those use queries. So, my code is this:

 

public class AccountListController{

    public AccountListController(ApexPages.StandardController controller) {

    }

//It creates a list from Session__c called "accList"
    public list<Session__c> accList{get;set;}
    public AccountListController (){

//This query fills the list "accList" with the requested files from Session__c
        accList = [select Training__c, Date__c, Start_Time__c, End_Time__c, Training__r.Name, Name, id from Session__c];
    }

}

Thanks in advance for your help :)
hi all,

I urgently need to edit/delete a post made by me on this discussion forum...But its not allowing me to do so and pops up
saying that 'you cant delete this question as others are interested in it'.
There are no likes and no comments on it still i am unable  to delete it
Any help would be highly appreciated

Its very urgent,
Thanks,