I'm trying to run the test cases in a test class that I created but I'm getting the error:
Unexpected token 'private Class TestCreate'.
Here is the test class:
@isTest
private Class TestCreate{
private static testMethod void runPositiveTestCases(){
//Initial test to verify that all three available mailings are selected to be used to create campaigns
System.debug('Verifying available mailings ');
List<Available_Mailings__c> availMailings = CreateCampaign.getAvailableMailings();
Integer origIdsCount = availMailings.size();
List<Available_Mailings__c> testAvailMailings = [SELECT Id , Create_Campaign__c , Name, Mailing_Type__c, Frequency__c FROM Available_Mailings__c WHERE Create_Campaign__c = TRUE];
Integer testIdsCount = testAvailMailings.size();
for(Available_Mailings__c amc_t : testAvailMailings){
for(Available_Mailings__c amc : availMailings){
if(amc.Id == amc_t.Id){
--origIdsCount;
--testIdsCount;
}
}
}
System.assertEquals(origIdsCount, 0);
System.assertEquals(testIdsCount, 0);
//To test campaigns inserted, manually derive column (mailing_id+ _ + campaigin_key)
//and check against the variable Campaign_Key__c in the campaign model
System.debug('Verifying campaign creation');
CreateCampaign.upsertCampaigns();
List<Campaign> campaigns = [SELECT Id , Campaign_Key__c FROM Campaign WHERE Campaign_Key__c <> ''];
origIdsCount = availMailings.size();
for(Available_Mailings__c amc : availMailings){
for(Campaign cmp : campaigns){
if(amc.Campaign_Key == cmp.Campaign_Key__c){
--origIdsCount;
}
}
}
System.assertEquals(origIdsCount, 0);
//Test if the campaign members were added to the appropriate campaigns
System.debug('Verifying addition of campaign members to campaigns');
List<CampaignMember> members = CreateCampaign.addCampaignMembers();
Integer numMembers = members.size();
for(Mailings__C mc : members){
for(Campaign cmp : campaigns){
if(cmp.Mailing_ID__c == mc.Available_Mailing__C){
numMembers--;
}
}
}
System.assertEquals(numMembers, 0);
}
}
What could be causing the issue?