function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion

Campaign Member Summary using Google Charts



I want to add the Campaign Member Summary using Google Charts item on my campaign page. But I'm getting an error when saving the test class:


unexpected token: 'testMethod' in line 1


What do I need to change to get it working?



static testMethod void testVFController_Sidebar_Summary() {
        // Create Campaign
        Campaign c = new Campaign();
        c.Name = 'Test Campaign';
        insert c;
        // Create Lead
        Lead l = new Lead();
        l.LastName = 'Last Name';
        l.Company = 'Company';
        insert l;
        // Create Campaign Member
        CampaignMember cms = new CampaignMember();
        cms.CampaignId =;
        cms.LeadId =;
        insert cms;
        ApexPages.StandardController sc = new ApexPages.StandardController(c);
        VFController_CampaignMemberStatusChart controller = new VFController_CampaignMemberStatusChart(sc);
        String s1 = controller.getChartData();