Skip to content

Instantly share code, notes, and snippets.

View Feldstrom's full-sized avatar

Emily Feldstrom

View GitHub Profile
@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;
@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';
@isTest
public class CasePBTestClass{
@isTest
static void record_is_pcf_collection(){
Case firstCase = new Case();
insert firstCase;
Contact relatedContact = new Contact();
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;
@Feldstrom
Feldstrom / PSTDate2UTC_New.java
Last active November 4, 2019 18:38
Unix2Date_New
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);