@isTest
public without sharing class OFSCalendarControllerTest {
    static testMethod void testMethod1() {
        OFSCalendarController.testI();
    }
    static testMethod void testMethod_2(){
    	ControllerUtil.EscapeNFM001Trigger = true;
        ControllerUtil.EscapeMaintenanceContractAfterUpdateTrigger = true;
        StaticParameter.EscapeNFM001Trigger = true;
        StaticParameter.EscapeNFM001AgencyContractTrigger = true;
        StaticParameter.EscapeNFM001AgencyContractTrigger2 = true;
        StaticParameter.EscapeMaintenanceContractAfterUpdateTrigger = true;

        
        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];
        
        Account acc = new Account();
        acc.RecordTypeId = rectCo.Id;
        acc.Name = 'HP test1';
        acc.Assume_Change__c = true;
        insert acc;
    	String str = '123';
    	User u = new User();
    	Daily_Report__c dr1 = new Daily_Report__c();
        dr1.Reporter__c = UserInfo.getUserId();
        dr1.Reported_Date__c = date.today().addDays(-2);
        dr1.Status__c = '申請中';
        insert dr1;
    	u.Id = UserInfo.getUserId();
    	Event__c event = new Event__c();
        event.ActivityDate__c = date.today().addDays(-2);
        event.Daily_Report__c = dr1.Id;
        event.StartDateTime__c = Datetime.newInstance(2021, 8, 17, 10, 0, 0);
        event.EndDateTime__c = Datetime.newInstance(2021, 8, 17, 17, 0, 0);
        insert event;
        Event e = new Event();
        e.StartDateTime = Datetime.newInstance(2021, 8, 17, 10, 0, 0);
        e.EndDateTime = Datetime.newInstance(2021, 8, 17, 17, 0, 0);
        //TODO sunbridge_ga テーブル名（漢字）と req.photoType （漢字） にする可能性が高い 2016.10.20
        e.Subject = '拍摄了的照片';
        e.WS_flg__c = false;
        insert e;
        Event eve = new Event();
        eve.OwnerId = UserInfo.getUserId();
        eve.ActivityDate = date.today();
        eve.StartDateTime = Datetime.now();
        eve.EndDateTime = Datetime.now().addMinutes(15);
        //TODO sunbridge_ga テーブル名（漢字）と req.photoType （漢字） にする可能性が高い 2016.10.20
        eve.Subject = '拍摄了的照片';
        eve.WS_flg__c = false;
        eve.whatid__c = acc.Id;
        // if(objectName == 'Rental_Apply__c'){
        // 	Rental_Apply__c ra = [select account__c,account__r.name from Rental_Apply__c where id=:req.id][0];
        // 	e.Location = ra.account__r.name;
        // 	e.whatid__c = ra.account__c;
        // 	//e.Location = [select account__r.name from Rental_Apply__c where id=:req.id][0].account__r.name;
        // } else if (objectName == 'Repair__c'){
        // 	Repair__c rp = [select account__c,account__r.name from Repair__c where id=:req.id][0];
        // 	e.whatid__c = rp.account__c;
        // 	e.whatid__c = rp.account__c;
        // 	//e.Location = [select account__r.name from Repair__c where id=:req.id][0].account__r.name;
        // } else if (objectName == 'Asset'){
        // 	Asset ast = [select account.id,account.name from Asset where id=:req.id][0];
        // 	e.Location = ast.account.name;
        // 	e.whatid__c = ast.account.id;
        // 	//e.Location = [select account.name from Asset where id=:req.id][0].account.name;
        // }
        insert eve;
    	// upsert u;
    	OFSCalendarController ofsc = new OFSCalendarController();
    	ofsc.loginUser = u;
    	ofsc.init();
    	ofsc.getShowDayAllUrl();
    	ofsc.getDayViewUrl();
    	ofsc.getWeekViewUrl();
    	ofsc.getChangeDayUrl();
    	ofsc.getPrevUrl();
    	ofsc.getNextUrl();
    	// ofsc.testI();
    	// OFSCalendarController.campaignInfo weekCalendarInfo = new OFSCalendarController.campaignInfo();
    	// OFSCalendarController.WeekCalendarInfo weekCalendarInfo = new OFSCalendarController.WeekCalendarInfo();
    	// String str = '';
        // OFSCalendarController.WeekCalendarInfo info = new OFSCalendarController.WeekCalendarInfo(str);
        // info.at2Css(str);
    	// OFSCalendarController.WeekCalendarInfo info = OFSCalendarController.campaignInfo;
    	// OFSCalendarController.campaignInfo;



		// weekCalendarInfo.at2Css();
    	// ofsc.addEvent(e,str);
    	// OFSCalendarController.WeekCalendarInfo wci = new OFSCalendarController().WeekCalendarInfo();
    	// wci.getDayEventInfoList();
    }
}