Created
June 7, 2012 00:00
-
-
Save capeterson/2885596 to your computer and use it in GitHub Desktop.
Replication of an issue with enum quality after summer12 salesforce upgrade.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
global class LolEnums implements Database.batchable<sObject>, Database.Stateful{ | |
public enum Places {FIRST, SECOND, THIRD} | |
public Places val; | |
global Database.QueryLocator start(Database.BatchableContext bc) { | |
val = Places.FIRST; | |
return Database.getQueryLocator('SELECT id FROM User'); | |
} | |
global void execute(Database.BatchableContext BC, List<sObject> work){ | |
System.assertEquals(val,Places.FIRST); | |
} | |
global void finish(Database.BatchableContext BC){ | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment