高章伟
2022-02-18 8b5f4c6c281cfa548f92de52c8021e37aa81901e
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
@isTest
private class RepairAgainAnHandlerTest {
    static testMethod void testmethod_1(){
        RepairAgainAn__c ra = new RepairAgainAn__c();
        ra.Name = 'TestRa';
        ra.Dectect_Picture1__c = '<img src="http://www.google.co.jp/img1" />';
        ra.Dectect_Picture2__c = '<img src="http://www.google.co.jp/img2" />';
        ra.OSH_Dectect_Picture1__c = '<img src="http://www.google.co.jp/img3" />';
        ra.OSH_Dectect_Picture2__c = '<img src="http://www.google.co.jp/img4" />';
        ra.OSH_Dectect_Picture3__c = '<img src="http://www.google.co.jp/img5" />';
        ra.OSH_Dectect_Picture4__c = '<img src="http://www.google.co.jp/img6" />';
        insert ra;
 
        ra = [select Dectect_Picture1_URL__c, Dectect_Picture2_URL__c, OSH_Dectect_Picture1_URL__c, OSH_Dectect_Picture2_URL__c, 
                OSH_Dectect_Picture3_URL__c, OSH_Dectect_Picture4_URL__c from RepairAgainAn__c where Id = :ra.Id];
        System.assertNotEquals(null, ra.Dectect_Picture1_URL__c);
        System.assertNotEquals(null, ra.Dectect_Picture2_URL__c);
        System.assertNotEquals(null, ra.OSH_Dectect_Picture1_URL__c);
        System.assertNotEquals(null, ra.OSH_Dectect_Picture2_URL__c);
        System.assertNotEquals(null, ra.OSH_Dectect_Picture3_URL__c);
        System.assertNotEquals(null, ra.OSH_Dectect_Picture4_URL__c);
    }
}