@isTest
private class ConsumEquipmentRentalResponseCtrlTest {
    static testMethod void testCoverUp() {
        ConsumEquipmentRentalResponseController.test();
    }

    static testMethod void test1() {
        System.Test.startTest();
        Consum_Apply__c ca = new Consum_Apply__c();
        ca.Name = 'test_test';
        ca.DataMigration_Flag__c = true;
        insert ca;
        PageReference page = new PageReference('/apex/ConsumEquipmentRentalResponse?raid=' + ca.id + '&type=response2center');
        System.Test.setCurrentPage(page);
        ConsumEquipmentRentalResponseController consumReassignPage = new ConsumEquipmentRentalResponseController();
        consumReassignPage.init();
        consumReassignPage.cc.ResponseNew__c = '123';
        consumReassignPage.saveBtn();
        System.Test.stopTest();
    }

    static testMethod void test2() {
        System.Test.startTest();
        Consum_Apply__c ca = new Consum_Apply__c();
        ca.Name = 'test_test';
        ca.DataMigration_Flag__c = true;
        ca.Person_In_Charge__c = UserInfo.getUserId();
        ca.ApplyUser__c = UserInfo.getUserId();
        ca.Consum_Assistant__c = UserInfo.getUserId();
        ca.Consum_Assistant2__c = UserInfo.getUserId();
        ca.Consum_Assistant3__c = UserInfo.getUserId();
        ca.Loaner_centre_mail_address__c = 'ocm_asset@olympus.com.cn';
        insert ca;
        PageReference page = new PageReference('/apex/ConsumEquipmentRentalResponse?raid=' + ca.id + '&type=response2user');
        System.Test.setCurrentPage(page);
        ConsumEquipmentRentalResponseController consumReassignPage = new ConsumEquipmentRentalResponseController();
        consumReassignPage.init();
        consumReassignPage.cc.ResponseNew__c = '123';
        consumReassignPage.cc.BuchangApprovalManagerSales__c = UserInfo.getUserId();
        consumReassignPage.cc.ZongjianApprovalManager__c = UserInfo.getUserId();
        consumReassignPage.saveBtn();
        System.Test.stopTest();
    }

    static testMethod void test3() {
        System.Test.startTest();
        Consum_Apply__c ca = new Consum_Apply__c();
        ca.Name = 'test_test';
        ca.DataMigration_Flag__c = true;
        ca.Person_In_Charge__c = UserInfo.getUserId();
        ca.ApplyUser__c = UserInfo.getUserId();
        ca.Loaner_centre_mail_address__c = 'ocm_asset@olympus.com.cn';
        insert ca;
        PageReference page = new PageReference('/apex/ConsumEquipmentRentalResponse?raid=' + ca.id + '&type=response2user');
        System.Test.setCurrentPage(page);
        ConsumEquipmentRentalResponseController consumReassignPage = new ConsumEquipmentRentalResponseController(new ApexPages.StandardController(ca));
        consumReassignPage.init();
        consumReassignPage.cc.ResponseNew__c = '123';
        consumReassignPage.saveBtn();
        System.Test.stopTest();
    }

    static testMethod void test4() {
        System.Test.startTest();
        Consum_Apply__c ca = new Consum_Apply__c();
        ca.Name = 'test_test';
        ca.DataMigration_Flag__c = true;
        insert ca;
        PageReference page = new PageReference('/apex/ConsumEquipmentRentalResponse?raid=' + ca.id + '&type=response2center');
        System.Test.setCurrentPage(page);
        ConsumEquipmentRentalResponseController consumReassignPage = new ConsumEquipmentRentalResponseController(new ApexPages.StandardController(ca));
        consumReassignPage.init();
        consumReassignPage.cc.ResponseNew__c = '123';
        consumReassignPage.saveBtn();
        System.Test.stopTest();
    }

    static testMethod void test5() {
        System.Test.startTest();
        Consum_Apply__c ca = new Consum_Apply__c();
        ca.Name = 'test_test';
        ca.DataMigration_Flag__c = true;
        insert ca;
        ConsumEquipmentRentalResponseController consumReassignPage = new ConsumEquipmentRentalResponseController();
        consumReassignPage.init();
        consumReassignPage.cc = ca;
        consumReassignPage.cc.BuchangApprovalManagerSales__c = UserInfo.getUserId();
        consumReassignPage.cc.ZongjianApprovalManager__c = UserInfo.getUserId();
        consumReassignPage.saveBtn();
        System.Test.stopTest();
    }

    static testMethod void test6() {
        System.Test.startTest();
        Consum_Apply__c ca = new Consum_Apply__c();
        ca.Name = 'test_test';
        ca.DataMigration_Flag__c = true;
        insert ca;
        PageReference page = new PageReference('/apex/ConsumEquipmentRentalResponse?raid=00D6D00000043GHUAY&type=response2center');
        System.Test.setCurrentPage(page);
        ConsumEquipmentRentalResponseController consumReassignPage = new ConsumEquipmentRentalResponseController();
        consumReassignPage.init();
        consumReassignPage.cc = ca;
        consumReassignPage.saveBtn();
        System.Test.stopTest();
    }
}