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
// Asserts fail for the following | |
///////////////////////////////// | |
DateTime dt = DateTime.now(); // VARIABLE_ASSIGNMENT dt = 2013-10-03T05:35:37.373Z | |
System.assertEquals(String.valueOf(dt), String.valueOf((Object) dt)); | |
// Assertion Failed: Expected: 2013-10-02 22:35:37, Actual: 2013-10-03 05:35:37 | |
Date d = Date.today(); // VARIABLE_ASSIGNMENT d = 2013-10-02T00:00:00.000Z | |
System.assertEquals(String.valueOf(d), String.valueOf((Object) d)); | |
// Assertion Failed: Expected: 2013-10-02, Actual: 2013-10-02 00:00:00 |
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
@Grab(group='com.force.sdk', module='force-connector', version='22.0.9-BETA') | |
import com.force.sdk.connector.ForceConnectorConfig | |
import com.force.sdk.connector.ForceServiceConnector | |
import com.sforce.soap.partner.PartnerConnection | |
import com.sforce.soap.metadata.FileProperties | |
import com.sforce.soap.metadata.ListMetadataQuery | |
import java.net.URLEncoder |
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
<?php | |
class DescribeMetadataResultFileParser { | |
const BOUNDARY = '************************************************************'; | |
const XML_NAME_MARKER = 'XMLName: '; | |
const DIR_NAME_MARKER = 'DirName: '; | |
const SUFFIX_MARKER = 'Suffix: '; | |
const HAS_META_FILE_MARKER = 'HasMetaFile: '; | |
const IN_FOLDER_MARKER = 'InFolder: '; | |
const CHILD_OBJECTS_MARKER = 'ChildObjects: '; |
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 ScheduleUtil { | |
global static String cronExpression(DateTime dt) { | |
return dt.format('s m H d M ? yyyy'); | |
} | |
static testMethod void testCronExpression() { | |
DateTime dt = DateTime.now(); | |
String expected = dt.second() + ' ' + dt.minute() + ' ' + dt.hour() + ' ' + dt.day() + ' ' + dt.month() + ' ? ' + dt.year(); | |
NewerOlder