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 | |
private class customlookupcontroller_test { | |
static testMethod void customlookupcontrollermethod() { | |
//create campaign | |
Campaign camp = new Campaign(); | |
camp.Name = 'test camp'; | |
camp.StartDate = Date.today().addDays(-10); | |
camp.EndDate = Date.today(); | |
camp.Channel__c = 'Direct Sales'; | |
camp.IsActive = true; |
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 CasePBTestClass{ | |
//New Retention Created | |
//This should stamp the date/time a new Retention case type is created as well as mark Open_Retention_Case__c as true on the associated Contact | |
@isTest | |
static void new_retention_created(){ | |
//assemble | |
Contact retentionContact = new Contact(); | |
retentionContact.lastName = 'Stacy'; |
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 CasePBTestClass{ | |
@isTest | |
static void record_is_pcf_collection(){ | |
Case firstCase = new Case(); | |
insert firstCase; | |
Contact relatedContact = new Contact(); |
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
public class Global_TestStub { | |
//code coverage workaround for web service classes generated by WSDL | |
public static void test_stub1() { | |
integer i=0; | |
i+=1; | |
i+=1; | |
i+=1; | |
i+=1; | |
i+=1; | |
i+=1; |
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
public static Date PSTDate2UTC_New( Date dtDate) { | |
if(dtDate==null) return null; | |
SimpleDateFormat sdfPST= new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); | |
sdfPST.setTimeZone(TimeZone.getTimeZone("PST8PDT")); | |
LocalDateTime localtDateAndTime = LocalDateTime.parse(sdfPST.format(dtDate), DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")); | |
ZoneId oZoneId = ZoneId.of("America/Los_Angeles"); | |
ZonedDateTime zdt = ZonedDateTime.of(localtDateAndTime, oZoneId ); | |
System.out.println("Unconverted date and time in PST: " + zdt); |