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
Sahba Shabrokh 3Sahba Shabrokh 3 

Comment out this apex class

Trying to comment out this entire class getting this issue: Unexpected token '<EOF>'.

Any Ideas?
/*
private class TestUpdateAccountTeamMembers {
     static testMethod void validateAccountTeamMembers() {
     
        Profile p = [SELECT Id FROM Profile WHERE Name='Standard User']; 
        User u = new User(Alias = 'standt', 
                            Email='standarduser@testorg.com', 
                            EmailEncodingKey='UTF-8', 
                            LastName='Testing', 
                            LanguageLocaleKey='en_US', 
                            LocaleSidKey='en_US', 
                            ProfileId = p.Id, 
                            TimeZoneSidKey='America/Los_Angeles', 
                            UserName='testUserForTestUpdateAccountTeamMembers@testorg.com');
        insert u;
        User u2 = new User(Alias = 'standt2', 
                            Email='standarduser2@testorg.com', 
                            EmailEncodingKey='UTF-8', 
                            LastName='Testing2', 
                            LanguageLocaleKey='en_US', 
                            LocaleSidKey='en_US', 
                            ProfileId = p.Id, 
                            TimeZoneSidKey='America/Los_Angeles', 
                            UserName='testUserForTestUpdateAccountTeamMembers2@testorg.com');
        insert u2;
         
        Account a = [SELECT Id, Name, Account_Manager_1__c FROM Account LIMIT 1];
        Account a2 = [SELECT Id, Name, Account_Manager_1__c FROM Account where Id != :a.id LIMIT 1];
        
        a.Account_Manager_1__c = u2.Id;
        a.Website_Currency__c = 'GBP';
        update a;
        
        a2.Account_Manager_1__c = u.Id;
        
        a2.Account_Manager_1__c = null;
    }*/
}
Best Answer chosen by Sahba Shabrokh 3
Raj VakatiRaj Vakati
Try like this
private class TestUpdateAccountTeamMembers {
	/*
     static testMethod void validateAccountTeamMembers() {
     
        Profile p = [SELECT Id FROM Profile WHERE Name='Standard User']; 
        User u = new User(Alias = 'standt', 
                            Email='standarduser@testorg.com', 
                            EmailEncodingKey='UTF-8', 
                            LastName='Testing', 
                            LanguageLocaleKey='en_US', 
                            LocaleSidKey='en_US', 
                            ProfileId = p.Id, 
                            TimeZoneSidKey='America/Los_Angeles', 
                            UserName='testUserForTestUpdateAccountTeamMembers@testorg.com');
        insert u;
        User u2 = new User(Alias = 'standt2', 
                            Email='standarduser2@testorg.com', 
                            EmailEncodingKey='UTF-8', 
                            LastName='Testing2', 
                            LanguageLocaleKey='en_US', 
                            LocaleSidKey='en_US', 
                            ProfileId = p.Id, 
                            TimeZoneSidKey='America/Los_Angeles', 
                            UserName='testUserForTestUpdateAccountTeamMembers2@testorg.com');
        insert u2;
         
        Account a = [SELECT Id, Name, Account_Manager_1__c FROM Account LIMIT 1];
        Account a2 = [SELECT Id, Name, Account_Manager_1__c FROM Account where Id != :a.id LIMIT 1];
        
        a.Account_Manager_1__c = u2.Id;
        a.Website_Currency__c = 'GBP';
        update a;
        
        a2.Account_Manager_1__c = u.Id;
        
        a2.Account_Manager_1__c = null;
    }*/
}

 

All Answers

Raj VakatiRaj Vakati
Try like this
private class TestUpdateAccountTeamMembers {
	/*
     static testMethod void validateAccountTeamMembers() {
     
        Profile p = [SELECT Id FROM Profile WHERE Name='Standard User']; 
        User u = new User(Alias = 'standt', 
                            Email='standarduser@testorg.com', 
                            EmailEncodingKey='UTF-8', 
                            LastName='Testing', 
                            LanguageLocaleKey='en_US', 
                            LocaleSidKey='en_US', 
                            ProfileId = p.Id, 
                            TimeZoneSidKey='America/Los_Angeles', 
                            UserName='testUserForTestUpdateAccountTeamMembers@testorg.com');
        insert u;
        User u2 = new User(Alias = 'standt2', 
                            Email='standarduser2@testorg.com', 
                            EmailEncodingKey='UTF-8', 
                            LastName='Testing2', 
                            LanguageLocaleKey='en_US', 
                            LocaleSidKey='en_US', 
                            ProfileId = p.Id, 
                            TimeZoneSidKey='America/Los_Angeles', 
                            UserName='testUserForTestUpdateAccountTeamMembers2@testorg.com');
        insert u2;
         
        Account a = [SELECT Id, Name, Account_Manager_1__c FROM Account LIMIT 1];
        Account a2 = [SELECT Id, Name, Account_Manager_1__c FROM Account where Id != :a.id LIMIT 1];
        
        a.Account_Manager_1__c = u2.Id;
        a.Website_Currency__c = 'GBP';
        update a;
        
        a2.Account_Manager_1__c = u.Id;
        
        a2.Account_Manager_1__c = null;
    }*/
}

 
This was selected as the best answer
Raj VakatiRaj Vakati
try this 
 
public class TestUpdateAccountTeamMembers {
	/*
     static testMethod void validateAccountTeamMembers() {
     
        Profile p = [SELECT Id FROM Profile WHERE Name='Standard User']; 
        User u = new User(Alias = 'standt', 
                            Email='standarduser@testorg.com', 
                            EmailEncodingKey='UTF-8', 
                            LastName='Testing', 
                            LanguageLocaleKey='en_US', 
                            LocaleSidKey='en_US', 
                            ProfileId = p.Id, 
                            TimeZoneSidKey='America/Los_Angeles', 
                            UserName='testUserForTestUpdateAccountTeamMembers@testorg.com');
        insert u;
        User u2 = new User(Alias = 'standt2', 
                            Email='standarduser2@testorg.com', 
                            EmailEncodingKey='UTF-8', 
                            LastName='Testing2', 
                            LanguageLocaleKey='en_US', 
                            LocaleSidKey='en_US', 
                            ProfileId = p.Id, 
                            TimeZoneSidKey='America/Los_Angeles', 
                            UserName='testUserForTestUpdateAccountTeamMembers2@testorg.com');
        insert u2;
         
        Account a = [SELECT Id, Name, Account_Manager_1__c FROM Account LIMIT 1];
        Account a2 = [SELECT Id, Name, Account_Manager_1__c FROM Account where Id != :a.id LIMIT 1];
        
        a.Account_Manager_1__c = u2.Id;
        a.Website_Currency__c = 'GBP';
        update a;
        
        a2.Account_Manager_1__c = u.Id;
        
        a2.Account_Manager_1__c = null;
    }*/
}