buli
2022-05-14 ead4df22dca33a867279471821ca675f91dec760
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
@isTest
private class ContactTriggerHandlerTest {
 
    static testMethod void myUnitTest() {
        List<RecordType> rectIE = [select Id from RecordType where IsActive = true and SobjectType = 'Account' and Name = 'Customer IE'];
        
        User user = new User();
        user.LastName = 'test02';
        user.FirstName = 'test';
        user.Alias = 'test02';
        user.Email = 'test@test02.com';
        user.Username = 'test111@test3222.com';
        user.CommunityNickname = 'test1111';
        user.IsActive = true;
        user.EmailEncodingKey = 'ISO-2022-JP';
        user.TimeZoneSidKey = 'Asia/Tokyo';
        user.LocaleSidKey = 'ja_JP';
        user.LanguageLocaleKey = 'ja';
        user.ProfileId = System.Label.SystemAdmin;
        insert user;
        
        Account acc = new Account();
        acc.Name = '*';
        acc.DivisionName__c = 'DivisionName__c';
        acc.FacilityName__c = 'FacilityName__c';
        acc.PostCode__c='000000';
        acc.stautesD__c= 'Pass';
        insert acc;
        
        Contact con = new Contact();
        con.LastName = 'test';
        con.AccountId = acc.Id;
        con.MobilePhone = 'MobilePhoneD__c';
        con.OtherPhone = 'OtherPhoneD__c';
        con.Fax = 'FaxD__c';
        con.Email = 'EmailD__c@test.com';
        con.Phone = 'PhoneD__c';
        con.Title = 'TitleD__c';
        con.Address1__c = 'Address1D__c';
        con.Address2__c = 'Address2D__c';
        con.Address3__c = 'Address3D__c';
        con.Postcode__c = '100111';
        con.ContactStatus__c = 'ContactStatusD__c';
        con.CancelReason__c = 'CancelReasonD__c';
        con.StatusD__c = 'Pass';
        
        insert con;
        
        con.MobilePhone = 'MobilePhone';
        con.OtherPhone = 'OtherPhone';
        con.Fax = 'Fax';
        con.Email = 'Email@test.com';
        con.Phone = 'Phone';
        con.Title = 'Title';
        con.Address1__c = 'Address1__c';
        con.Address2__c = 'Address2__c';
        con.Address3__c = 'Address3__c';
        con.Postcode__c = '100222';
        con.ContactStatus__c = 'ContactStatus__c';
        con.CancelReason__c = 'CancelReason__c';
        
        update con;
        
        con.MobilePhoneD__c = 'MobilePhoneD__c';
        con.OtherPhoneD__c = 'OtherPhoneD__c';
        con.FaxD__c = 'FaxD__c';
        con.EmailD__c = 'EmailD__c@test.com';
        con.PhoneD__c = 'PhoneD__c';
        con.TitleD__c = 'TitleD__c';
        con.Address1D__c = 'Address1D__c';
        con.Address2D__c = 'Address2D__c';
        con.Address3D__c = 'Address3D__c';
        con.PostcodeD__c = '100111';
        con.ContactStatusD__c = 'ContactStatusD__c';
        con.CancelReasonD__c = 'CancelReasonD__c';
        
        update con;
        
        con.StatusD__c = 'Completed';
        update con;
        con.StatusD__c = 'Submit';
        update con;
        con.StatusD__c = 'Pass';
        update con;
        
        con.StatusD__c = 'Reject';
        update con;
        
    }
}