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
@isTest | |
public class contactUpdateFromScheduleClassTest { | |
@isTest static void contactUpdateTest_Schedule() { | |
Contact cont = new Contact(FirstName ='First Name', LastName ='Last Name', Email='sakthi@theblogreaders.com'); | |
insert cont; | |
// Seconds Minutes Hours Day_of_month Month Day_of_week optional_year | |
String CRON_EXP = '0 6 * * * ?'; |
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
String yourFilesContent = 'TheBlogReaders.com File upload content'; | |
ContentVersion conVer = new ContentVersion(); | |
conVer.ContentLocation = 'S'; // to use S specify this document is in Salesforce, to use E for external files | |
conVer.PathOnClient = 'testing.txt'; // The files name, extension is very important here which will help the file in preview. | |
conVer.Title = 'Testing Files'; // Display name of the files | |
conVer.VersionData = EncodingUtil.base64Decode(yourFilesContent); // converting your binary string to Blog | |
insert conVer; //Insert ContentVersion | |
OlderNewer