1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
@isTest
public with sharing class ImgPreviewVFControllerTest {
    @TestSetup
    static void makeData(){
        List<String> strList= new List<String>();
        strList.add('Document');
        TestDataUtility.CreatePIPolicyConfigurations(strList);
    }
    static testMethod void testMethod1() {
        Test.startTest();
        PageReference ref =  new PageReference('/apex/ImgPreviewVFController?key=1&name=2&type=3');
        Test.setCurrentPage(ref);
        Document doc = new Document();
        ApexPages.StandardController con =  new ApexPages.StandardController(doc);
        ImgPreviewVFController controller = new ImgPreviewVFController(con);
        Test.stopTest();
    }
}