APEX Scheduled Class -- 2
€30-250 EUR
Pagado a la entrega
REQUIREMENTS
1) Write an Apex class checkLeadAutoKillStatus which:
1.1) can be scheduled to run every DAY
1.2) selects all Leads with (Age__c>90 AND Last_activity_age__c>30) and sets the field Lead.ToBeKilled__c=True
2) Write an Apex class checkContactAutoKillStatus which:
2.1) can be scheduled to run every DAY
2.2) selects all Contacts with (Age__c>90 AND Last_activity_age__c>30) and sets the field Contact.ToBeKilled__c=True
Trigger will have to work with bulk changes (tested with 200 changes) and be fully tested (100% coverage).
TEST CLASSES
checkLeadAutoKillStatusTest
checkContactAutoKillStatusTest
TRIGGER CLASSES
checkLeadAutoKillStatus (100% coverage required)
checkContactAutoKillStatus (100% coverage required)
OTHER ITEMS:
XXXXXXX
TEST CASES
1) generate a database with 10000 leads and 10000 contacts
2) 1000 leads have to have last activity age = 29 and age = 88
3) 2000 leads have to have last activity age = 29 and age = 91
4) 3000 leads have to have last activity age = 31 and age = 89
5) 4000 leads have to have last activity age = 31 and age = 91
6) 1000 contacts have to have last activity age = 29 and age = 88
7) 2000 contacts have to have last activity age = 29 and age = 91
8) 3000 contacts have to have last activity age = 31 and age = 89
9) 4000 contacts have to have last activity age = 31 and age = 91
10) run the scheduled apex classes checkLeadAutoKillStatusTest
11) the number of leads with ToBeKilled__c=true has to be 4000
12) run the scheduled apex classes checkContactAutoKillStatusTest
13) the number of contacts with ToBeKilled__c=true has to be 4000
14) wait one day
15) run the scheduled apex classes checkLeadAutoKillStatusTest
16) the number of leads with ToBeKilled__c=true has to be 9000
17) run the scheduled apex classes checkContactAutoKillStatusTest
18) the number of contacts with ToBeKilled__c=true has to be 9000
19) wait one day
20) run the scheduled apex classes checkLeadAutoKillStatusTest
21) the number of leads with ToBeKilled__c=true has to be 10000
22) run the scheduled apex classes checkContactAutoKillStatusTest
23) the number of contacts with ToBeKilled__c=true has to be 10000
Nº del proyecto: #6650068