| | |
| | | @isTest |
| | | private class CampaignMemberServiceControllerTest { |
| | | |
| | | @testSetup static void testSetupMethod() { |
| | | @testSetup |
| | | static void makeData(){ |
| | | TestDataUtility.CreatePIPolicyConfiguration('Contact'); |
| | | } |
| | | static void testSetupMethod() { |
| | | RecordType rectCo = [select Id from RecordType where IsActive = true and SobjectType = 'Account' and DeveloperName = 'Hp']; |
| | | List<RecordType> rectDpt = [select Id from RecordType where IsActive = true and SobjectType = 'Account' and DeveloperName IN ('Department_GI', 'Department_BF') order by DeveloperName desc]; |
| | | |
| | |
| | | depart2.Department_Class__c = dept[1].Id; |
| | | depart2.Hospital__c = acc.Id; |
| | | insert new Account[] {depart1, depart2}; |
| | | Test.startTest(); |
| | | |
| | | Contact con = new Contact(); |
| | | con.LastName = 'lastname2'; |
| | | con.FirstName = 'firstname2'; |
| | |
| | | |
| | | |
| | | upsert cmList; |
| | | Test.stopTest(); |
| | | |
| | | |
| | | } |
| | | @isTest static void test_method_one() { |
| | | |
| | | testSetupMethod(); |
| | | list<Campaign> camlist = [select id from campaign]; |
| | | Campaign cam = camlist[0]; |
| | | PageReference page = new PageReference('/apex/CampaignMemberService?id=' + cam.Id); |
| | |
| | | } |
| | | |
| | | @isTest static void test_method_two() { |
| | | testSetupMethod(); |
| | | list<Campaign> camlist = [select id from campaign]; |
| | | Campaign cam1 = camlist[0]; |
| | | RecordType rectCA = [select Id from RecordType where IsActive = true and SobjectType = 'Campaign' |