Skip to content

Commit

Permalink
Fixed test failures due to (intentionally) missing triggers from package
Browse files Browse the repository at this point in the history
#3
65
  • Loading branch information
Andrew Fawcett authored and Andrew Fawcett committed May 28, 2017
1 parent 7d1bef5 commit c361bc4
Show file tree
Hide file tree
Showing 3 changed files with 64 additions and 0 deletions.
16 changes: 16 additions & 0 deletions rolluptool/src/classes/RollupScheduledCalculateControllerTest.cls
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@ private class RollupScheduledCalculateControllerTest {
@IsTest
private static void testCronHelperDefault() {

// Test supported?
if(!TestContext.isSupported())
return;

// Between Task and Account
LookupRollupSummary__c rollupSummaryAccount = new LookupRollupSummary__c();
rollupSummaryAccount.Name = 'Test Rollup';
Expand Down Expand Up @@ -61,6 +65,10 @@ private class RollupScheduledCalculateControllerTest {
@IsTest
private static void testCronHelperDefaultWithUniqueName() {

// Test supported?
if(!TestContext.isSupported())
return;

// Between Task and Account
LookupRollupSummary__c rollupSummaryAccount = new LookupRollupSummary__c();
rollupSummaryAccount.Name = 'Test Rollup';
Expand Down Expand Up @@ -93,6 +101,10 @@ private class RollupScheduledCalculateControllerTest {
@IsTest
private static void testCronHelperError() {

// Test supported?
if(!TestContext.isSupported())
return;

// Between Task and Account
LookupRollupSummary__c rollupSummaryAccount = new LookupRollupSummary__c();
rollupSummaryAccount.Name = 'Test Rollup';
Expand Down Expand Up @@ -126,6 +138,10 @@ private class RollupScheduledCalculateControllerTest {
@IsTest
private static void testCronHelperCustomised() {

// Test supported?
if(!TestContext.isSupported())
return;

// Between Task and Account
LookupRollupSummary__c rollupSummaryAccount = new LookupRollupSummary__c();
rollupSummaryAccount.Name = 'Test Rollup';
Expand Down
16 changes: 16 additions & 0 deletions rolluptool/src/classes/RollupServiceTest5.cls
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@ private class RollupServiceTest5 {
@IsTest
private static void testPolymorphicRelationshipsRealtime() {

// Test supported?
if(!TestContext.isSupported())
return;

// Polymorphic lookup between Task and Account
LookupRollupSummary__c rollupSummaryA = new LookupRollupSummary__c();
rollupSummaryA.Name = 'Test Rollup';
Expand Down Expand Up @@ -86,6 +90,10 @@ private class RollupServiceTest5 {
@IsTest
private static void testPolymorphicRelationshipsScheduled() {

// Test supported?
if(!TestContext.isSupported())
return;

// Polymorphic lookup between Task and Account
LookupRollupSummary__c rollupSummaryAccount = new LookupRollupSummary__c();
rollupSummaryAccount.Name = 'Test Rollup';
Expand Down Expand Up @@ -149,6 +157,10 @@ private class RollupServiceTest5 {
@IsTest
private static void testPolymorphicRelationshipsScheduledIgnoreBadScheduleItems() {

// Test supported?
if(!TestContext.isSupported())
return;

// Setup parent test records
Account accountParent = new Account(Name = 'Test Account');
insert accountParent;
Expand Down Expand Up @@ -546,6 +558,10 @@ private class RollupServiceTest5 {
@IsTest
private static void testCheckboxRollupWithNoChildren() {

// Test supported?
if(!TestContext.isSupported())
return;

// Lookup between Task and Opportunity
LookupRollupSummary__c rollupSummaryOpp = new LookupRollupSummary__c();
rollupSummaryOpp.Name = 'Test Rollup';
Expand Down
32 changes: 32 additions & 0 deletions rolluptool/src/classes/RollupServiceTest6.cls
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@ private class RollupServiceTest6 {
@IsTest
private static void testAccountHierarchySumNumberOfEmployees() {

// Test supported?
if(!TestContext.isSupported())
return;

LookupRollupSummary__c rollupSummaryA = new LookupRollupSummary__c();
rollupSummaryA.Name = 'Test Rollup';
rollupSummaryA.ParentObject__c = 'Account';
Expand Down Expand Up @@ -121,6 +125,10 @@ private class RollupServiceTest6 {
@IsTest
private static void testParentIdsVaryOnlyByCaseTolerated() {

// Test supported?
if(!TestContext.isSupported())
return;

// Between Task and Account
LookupRollupSummary__c rollupSummaryAccount = new LookupRollupSummary__c();
rollupSummaryAccount.Name = 'Test Rollup';
Expand Down Expand Up @@ -163,6 +171,10 @@ private class RollupServiceTest6 {
@IsTest
private static void testHistoricBeforeV2ScheduleItemsAreTolerated() {

// Test supported?
if(!TestContext.isSupported())
return;

// Setup parent test records
Account accountParent = new Account(Name = 'Test Account');
insert accountParent;
Expand Down Expand Up @@ -227,6 +239,10 @@ private class RollupServiceTest6 {
@IsTest
private static void selfRollupInsert() {

// Test supported?
if(!TestContext.isSupported())
return;

LookupRollupSummary__c rollupSummaryA = new LookupRollupSummary__c();
rollupSummaryA.Name = 'Test Rollup';
rollupSummaryA.ParentObject__c = 'Opportunity';
Expand Down Expand Up @@ -257,6 +273,10 @@ private class RollupServiceTest6 {
@IsTest
private static void selfRollupDelete() {

// Test supported?
if(!TestContext.isSupported())
return;

LookupRollupSummary__c rollupSummaryA = new LookupRollupSummary__c();
rollupSummaryA.Name = 'Test Rollup';
rollupSummaryA.ParentObject__c = 'Opportunity';
Expand Down Expand Up @@ -383,6 +403,10 @@ private class RollupServiceTest6 {
@IsTest
private static void testAccountMergeAsParent() {

// Test supported?
if(!TestContext.isSupported())
return;

LookupRollupSummary__c rollupSummaryA = new LookupRollupSummary__c();
rollupSummaryA.Name = 'Test Rollup';
rollupSummaryA.ParentObject__c = 'Account';
Expand Down Expand Up @@ -442,6 +466,10 @@ private class RollupServiceTest6 {
@IsTest
private static void testAccountMergeAsParentWithoutParentTriggerDeployed() {

// Test supported?
if(!TestContext.isSupported())
return;

LookupRollupSummary__c rollupSummaryA = new LookupRollupSummary__c();
rollupSummaryA.Name = 'Test Rollup';
rollupSummaryA.ParentObject__c = 'Account';
Expand Down Expand Up @@ -497,6 +525,10 @@ private class RollupServiceTest6 {
@IsTest
private static void testContactMergeAsChild() {

// Test supported?
if(!TestContext.isSupported())
return;

LookupRollupSummary__c rollupSummaryA = new LookupRollupSummary__c();
rollupSummaryA.Name = 'Total Opportunities greater than 200 into Annual Revenue on Account';
rollupSummaryA.ParentObject__c = 'Account';
Expand Down

0 comments on commit c361bc4

Please sign in to comment.